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: ,

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #23031
    dibya mohanty
    Participant

    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 –

    LoRa Network Server

    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 list

    Using 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.
    #23033
    Jason Reiss
    Keymaster

    The 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.

    #23035
    dibya mohanty
    Participant

    I 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.

    #23037
    Jason Reiss
    Keymaster

    Restart 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 “”

    #23043
    dibya mohanty
    Participant

    Thanks 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 ?

    #23047
    Jason Reiss
    Keymaster

    Delete by array index is supported
    $ curl 127.0.0.1/api/loraNetwork/whitelist/devices/0 -X DELETE –data “”

    #23048
    dibya mohanty
    Participant

    This is a bit strange… Can i at least GET a particular node based on deveui or does that also work by array index?

    #23354
    dibya mohanty
    Participant

    Hi 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-ERROR

    Can you help me out with what is going wrong here?

    #23358
    Jason Reiss
    Keymaster

    CRC-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=44

    #23365
    dibya mohanty
    Participant

    somehow this link does not solve my problem. Is there some way i can debug this?

    #23366
    Jason Reiss
    Keymaster

    Please open a support ticket at support.multitech.com and provide full configuration and log info.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.