What is the new lora-query command for adding nodes in MTCAP
Home › Forums › Conduit: AEP Model › What is the new lora-query command for adding nodes in MTCAP
Tagged: lora-query, MTCAP
- This topic has 10 replies, 2 voices, and was last updated 6 years, 6 months ago by Jason Reiss.
-
AuthorPosts
-
April 6, 2018 at 10:38 am #23031dibya mohantyParticipant
Hi,
The process I was following to register a device to the gateway was –
“lora-query -a <NET-ADDR> [CLASS] <AppEUI> <DevEUI> <AppKey>”
After a firmware upgrade somehow this does not work any more to register the devices to the gateway. I also tried out the new lora-query utility to figure out how it works following the page here –
Here it mentions to issue curl commands to register the devices.
curl 127.0.0.1/api/loraNetwork/whitelist/devices -X POST –data ‘{“deveui”:”<DevEUI>”,”appeui”:”<AppEUI>”,”class”:”C”,”appkey”:”<AppKey>”}’ -H “Content-Type: application/json”
I am using the OTAA join method and in the link above it is mentioned to use this curl command to register a device.
Using this curl command I get a success status code 200 but somehow when I try to do a device list as follows it does not list the device –
lora-query -x device listUsing the “lora-query -x device add” also fails with the arguments of deveui, appeui and appkey.
The documentation is really confusing and it is hard to register devices and communicate to the gateway
Can anyone please provide me with the right steps to add devices to the gateway and start communication?
- This topic was modified 6 years, 7 months ago by dibya mohanty.
April 6, 2018 at 10:42 am #23033Jason ReissKeymasterThe LoRaWAN > Key Management page can be use to enter end-devices and appkeys.
AppKeys are longer stored in the network-server database so the lora-query cannot be used to add them.
They can be added to the API on AEP or the lora-network-server.conf file for mLinux.
The network-server must be restarted after keys have been added to take affect.
The OTA device will not appear in the device list until it has joined the Conduit.
April 6, 2018 at 2:56 pm #23035dibya mohantyParticipantI cannot use the UI for registration since i have to automate the process.
I have an AEP, so that means the curl command is the right way to register?
Restarting the network server everytime adds an additional overhead now.
April 6, 2018 at 4:18 pm #23037Jason ReissKeymasterRestart is only needed after all keys have been added.
You will also want persist the keys over reset.Issues API save
$ curl 127.0.0.1/api/command/save -X POST –data “”April 9, 2018 at 6:35 am #23043dibya mohantyParticipantThanks a lot. I was able to add a node using the curl commands and also list then using the curl get command. Now i want to delete a specific node using the curl delete command. How can i do that ?
April 9, 2018 at 7:40 am #23047Jason ReissKeymasterDelete by array index is supported
$ curl 127.0.0.1/api/loraNetwork/whitelist/devices/0 -X DELETE –data “”April 9, 2018 at 7:47 am #23048dibya mohantyParticipantThis is a bit strange… Can i at least GET a particular node based on deveui or does that also work by array index?
May 3, 2018 at 4:47 am #23354dibya mohantyParticipantHi Jason,
I was able to add all the keys based on the curl commands. Now when i see the LoraWan > Key Management i find my device and the keys associated to it.Now i fail to connect but in the log i find –
2018-05-03T11:57:26.094224+02:00 mtcap lora-network-server: GW:00-80-00-00-00-01-09-78|FRAME-RX|Parsing 1 packets
2018-05-03T11:57:26.095330+02:00 mtcap lora-network-server: GW:00-80-00-00-00-01-09-78|FRAME-RX|CRC-ERRORCan you help me out with what is going wrong here?
May 3, 2018 at 7:25 am #23358Jason ReissKeymasterCRC-ERROR is probably not caused by your device.
See Network Communications > Possible Issues section of the linked troubleshooting guide.
http://www.multitech.net/developer/wp-content/plugins/download-monitor/download.php?id=44May 4, 2018 at 10:22 am #23365dibya mohantyParticipantsomehow this link does not solve my problem. Is there some way i can debug this?
May 4, 2018 at 11:25 am #23366Jason ReissKeymasterPlease open a support ticket at support.multitech.com and provide full configuration and log info.
-
AuthorPosts
- You must be logged in to reply to this topic.