Update LoRa Network Server config from console
Home › Forums › Conduit: AEP Model › Update LoRa Network Server config from console
- This topic has 5 replies, 3 voices, and was last updated 9 years, 8 months ago by
kiran.
-
AuthorPosts
-
April 4, 2016 at 1:06 pm #12005
kiran
ParticipantI have a Conduit AEP model and would like to make configuration changes from the console. Is it possible to modify LoRa Network Server configuration by modifying “lora-network-server.conf” file?
I tried modifying the “Network EUI and Key” in the conf file but that change did not get reflected on the WebGUI (for verification). If additional steps are needed, can you please provide the necessary commands.
Thanks,
KiranApril 6, 2016 at 7:50 am #12025Jeff Hatch
KeymasterKiran,
The information that you want to modify is in the API configuration file in /var/config/db.json. However, if you modify this file outside of making API requests it is possible that you will see your settings get reverted back by the API. The most effective way to modify these settings outside of the Web UI is to make curl requests to the API. To do this you can use a command like:
curl -s -m 5 -X PUT -H “Content-Type: json/application” -d ‘{ “network” : { “eui”:”UUIDabcdefg”, “key”:”SOME_VALUE” }}’ 127.0.0.1/api/loraNetwork
And then save this change:
curl -i -X POST -H ‘Content-Type: application/json’ -d ‘{}’ http://127.0.0.1/api/command/save
Hope that helps,
Jeff Hatch
April 7, 2016 at 10:52 am #12045kiran
ParticipantJeff,
Thank you. That worked.
Currently, I’m using a Windows machine to access the Serial console. Does the Gateway console work with a Linux machine? If so, can you please guide me through the steps involved. My test requirements would need to access this device from Linux host (Ubuntu 14.04).
Thanks,
KiranApril 7, 2016 at 11:33 am #12047Jeff Hatch
KeymasterKiran,
You’re in luck, I am currently running Ubuntu 14.04 as my workstation. You should be able to just connect your Conduit’s debug console to a USB port on the Ubuntu machine, and the tty should get instantiated in /dev as a /dev/ttyACM*. I use minicom to connect to the debug console tty from a terminal. The terminal program I use is called Terminator.
The minicom program has a man page and a lot of different questions pertaining to its use are on the Internet. To connect with minicom you might have to ‘sudo’ in order to connect to the tty.
Jeff
April 7, 2016 at 11:39 am #12048Mike Fiore
BlockedI believe if you add yourself to the “dialout” group, you won’t have to use sudo when starting minicom.
Cheers,
Mike
April 7, 2016 at 12:59 pm #12049kiran
ParticipantJeff and Mike,
Thank you for the quick response. I can now access the console at /dev/ttyACM0. Assumed it would get instantiated as /dev/ttyUSB*. I use minicom for Serial communication too and have always used ‘sudo’. Will try the “dialout’ group option.
Thanks,
Kiran -
AuthorPosts
- You must be logged in to reply to this topic.