mirror of
https://github.com/srlabs/blue-merle.git
synced 2024-12-22 13:55:00 -05:00
python: debug print reading IMSI
It seems to timeout somewhere and I want to know where.
This commit is contained in:
parent
6ac26e1a33
commit
4a16277ac2
@ -42,7 +42,11 @@ TIMEOUT = 3
|
||||
|
||||
|
||||
def get_imsi():
|
||||
if (verbose):
|
||||
print(f'Obtaining Serial {TTY} with timeout {TIMEOUT}...')
|
||||
with serial.Serial(TTY, BAUDRATE, timeout=TIMEOUT, exclusive=True) as ser:
|
||||
if (verbose):
|
||||
print('Getting IMSI')
|
||||
ser.write(b'AT+CIMI\r')
|
||||
# TODO: read loop until we have 'enough' of what to expect
|
||||
output = ser.read(64)
|
||||
|
Loading…
Reference in New Issue
Block a user