computenodes / dragino

LoRaWAN implementation in python
GNU Affero General Public License v3.0
27 stars 10 forks source link

test.py has problem reading dragino.ini file #9

Closed mariusfassa closed 3 years ago

mariusfassa commented 3 years ago

Hello,

I'm having a problem with the test.py. I'm using pi 3 B+ and dragino lora hat v1.4 with raspbian. Here is what it tells me:


pi@raspi:~/dragino-master $ ./test.py Mode <- SLEEP Mode <- FSK_STDBY Mode <- SLEEP Mode <- FSK_STDBY Mode <- SLEEP 2021-04-17 11:48:24,532 - Dragino - 58 - DEBUG - Nonce = [133, 179] 2021-04-17 11:48:24,534 - DraginoConfig - 357 - CRITICAL - Missing required field 'gps_baud_rate' Traceback (most recent call last): File "./test.py", line 13, in D = Dragino("dragino.ini", logging_level=logging.DEBUG) File "/home/pi/dragino-master/dragino/dragino.py", line 67, in init self.config = DraginoConfig(config_filename, logging_level) File "/home/pi/dragino-master/dragino/dragino.py", line 358, in init raise DraginoError(err) from None dragino.dragino.DraginoError: 'gps_baud_rate'

I haven't modified dragino.ini.default except to put my TTN keys for ABP. But it seems to have a problem at the first line. (second if you don't count "#GPS configuration".

Thanks Marius

ediiiiiiii commented 3 years ago

If you open test.py you will see that it looks for a config file named dragino.ini (not dragino.ini.default)

mariusfassa commented 3 years ago

Thx for the answer. I'm ashamed it was something like that. I had already passed over the possibility as I remembered having tried changing the name already but I did it again and it worked. I need to verify everything twice or thrice...