ronoth / LoStik

LoRaWAN compatible USB test device
MIT License
132 stars 39 forks source link

Lorawan example throws 'ReaderThread' object has no attribute 'read' #15

Closed lolsborn closed 5 years ago

lolsborn commented 5 years ago

Per Bob P.

We ordered a couple of LoSticks from Tindie and tried the example software from the repo, however we cannot get lorawan.py example to work:

python3 lorawan.py --joinmode otaa --appeui "xxxxxx" --appkey "xxxx" --deveui "xxxxx" /dev/tty.usbserial-14120

Running this on a MacOs with python3 and getting the following error:

Connection to LoStik established
mac get appeui
'ReaderThread' object has no attribute 'read'
Lost connection to serial device
Traceback (most recent call last):
File "lorawan.py", line 118, in <module>
with ReaderThread(ser, PrintLines) as protocol:
File "/anaconda3/lib/python3.6/site-packages/serial/threaded/__init__.py", line 250, in __enter__
raise RuntimeError('connection_lost already called')
RuntimeError: connection_lost already called

Do you know what I might be doing wrong? (application key supplied in the argument is changed a bit, but functions as example)

Thank you in advance.

Best Regards, Bob

lolsborn commented 5 years ago

This should be fixed again in ffd36ecc15fc95545216bb15b1c78bc6cfa9063d waiting on access to a Gateway this afternoon to test and confirmation from Bob.

lolsborn commented 5 years ago

Ok, I've tested the latest commit to master and everything seems to be in order.