mDot_LoRa_Connect_Example join problem

Home Forums mDot/xDot mDot_LoRa_Connect_Example join problem

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #12559
    Bernaud Benjamin
    Participant

    Hello,

    In the 1st time I used the AT command to work on the mdot_lora.
    Now I want to use the mDot_LoRa_Connect_Example.

    In the 1st case (with AT command) the join and the send are available
    Now (with the example), I don’t receive join accepts. My programme is blocked in the dot->joinNetwork().

    But, when I subscribe at all topics with mosquitto I can see the same message:
    Lora/xxxx/packet_recv {…}
    Lora/xxxx/joined (null)
    Lora/xxxx/packet_sent {…}

    And in the gateway I log in max (100). I check the behaviour (tail -f /var/log/Lora-network-server.log). In the AT case the server understands the request, but not in the mDot_LoRa_Connect_Example case.

    So, I’ve a join request, but I don’t receive the join accepts. What is the problem?

    Thanks,
    BERNAUD Benjamin

    #12560
    Bryan Tran
    Moderator

    Hi Bernaud,

    1. Which firmware version do you have on the Conduit ? Make sure you have upgrade them to a latest firmware.

    http://www.multitech.net/developer/downloads/

    For the mLinux: Download and install the following:

    – Download Lora Network Server 1.0.8 (Changelog | Upgrade Instructions)
    – Download Lora Packet Forwarder 1.4.1-r9 (Upgrade Instructions)
    – Download Lora Query Utility 1.0.2

    For the AEP: Please, download and install the following:

    – Download version 1.1.2 (Changelog | Upgrade Instructions)
    – Download Lora Network Server 1.0.8 (Changelog | Upgrade Instructions)

    2. Which firmware version do you have on the mDot ? Make sure you have a latest firmware on it.

    http://www.multitech.net/developer/downloads/

    The AT command firmware is:

    – Download version 1.0.8 (Changelog | Upgrade Instructions)

    For the mBed online/off line version:

    – libmDot-1.0.8-1

    3. If after upgrade them and you are still having a problem, please post the configuration of both mDot and Conduit.

    a. ssh into the Conduit and do the command:

    cat /var/config/lora/lora-network-server.conf

    /opt/lora/lora-network-server –version

    opkg list | grep lora

    b. For the mDot:

    With AT command firmware, do:

    ATI

    AT&V

    With mBed online firmware, we need the output of the function:

    logInfo(“version: %s”, dot->getId().c_str());

    static std::string config_network_name = “xxxx”;
    static std::string config_network_pass = “xxxxx”;
    static uint8_t config_frequency_sub_band = x;

    Thanks,

    BT

    #12593
    Bernaud Benjamin
    Participant

    Hi Bryan,

    I use mLinux and mBed online.
    I take this libmDot 1.0.8-1:
    https://developer.mbed.org/teams/MultiTech/code/libmDot/rev/5fddfa2b85aa

    In my gateway the problem is resolved. It understands the request and resend the accepts. But I always blocked in the join Network function.

    Thanks for your help.
    Benjamin.

    Information:

    /************************************************
    * tail -f /var/log/lora-networkserver.log
    *************************************************/

    8:29:22:978|INFO| Parsing 1 rx packets
    8:29:22:979|INFO| Received join request
    8:29:22:982|INFO| Device found in DB, assigning address: 6000001
    8:29:22:987|INFO| Queue join response 33 bytes
    8:29:23:5|INFO| Send Join Accept – EUI: 00-80-00-00-00-00-a1-c7 ADDR: 06000001
    8:29:23:5|INFO| Schedule TX Time on air: 997 ms
    8:29:23:6|WARNING| Duty cycle limit met – Band: 1 Time off air: 8157 ms
    8:29:24:732|INFO| Frame transmitted to 06:00:00:01 via GW (00:80:00:00:00:00:a0:76 Chan LC2 127.0.0.1:33090) Seq# 0
    8:29:24:738|INFO| Band: 2 Time off air: 18100 ms
    8:29:24:738|INFO| Transmit UDP message to Gateway 209 bytes

    /************************************************
    * info gateway Multitech, mLinux Conduit
    *************************************************/

    cat /var/config/lora/lora-network-server.conf
    {
    “lora”: {
    “netID”: “010203”,
    “frequencyBand”: “868”, /* US=”915″, EU=”868″ */
    “frequencySubBand”: 7,
    “rx1DatarateOffset”: 0,
    “rx2Datarate”: 12,
    “maxTxPower”: 14,
    “frequencyEU”: 867500000
    },
    “udp”: {
    “appPortUp”: 1784,
    “appPortDown”: 1786
    },
    “addressRange”: {
    “start”: “00:00:00:01”,
    “end”: “FF:FF:FF:FE”
    },
    “network”: {
    “public”: false,
    “leasetime”: 0, /* time until mDot join expires (minutes) or 0 for no expiration */
    “name”: “my Name”,
    “passphrase”: “my Pass”
    },
    “log” : {
    “console” : true,
    “syslog” : false,
    “level” : 100,
    “path”: “/var/log/lora-network-server.log”
    },
    “mqtt”: {
    “enabled”: true
    }
    }

    /opt/lora/lora-network-server –version
    MTS Network Server – Version 1.0.8

    opkg list | grep lora
    lora-gateway-dbg – 1.7.0mts-r9.0.0 – lora-gateway version 1.7.0mts-r9.0 – Debugging files LoRa Gateway
    lora-gateway-dev – 1.7.0mts-r9.0.0 – lora-gateway version 1.7.0mts-r9.0 – Development files LoRa Gateway
    lora-gateway-staticdev – 1.7.0mts-r9.0.0 – lora-gateway version 1.7.0mts-r9.0 – Development files (Static Libraries)
    lora-gateway-utils – 1.7.0mts-r9.0.0 – lora-gateway version 1.7.0mts-r9.0 LoRa Gateway library
    lora-gateway-utils-dbg – 1.7.0mts-r9.0.0 – lora-gateway version 1.7.0mts-r9.0 LoRa Gateway library
    lora-network-server – 0.0.4-r0.0 – lora-network-server version 0.0.4-r0 MultiTech LoRa Network Server
    lora-network-server – 1.0.8-r0.0
    lora-network-server-dbg – 0.0.4-r0.0 – lora-network-server version 0.0.4-r0 – Debugging files MultiTech LoRa
    lora-network-server-dev – 0.0.4-r0.0 – lora-network-server version 0.0.4-r0 – Development files MultiTech LoRa
    lora-packet-forwarder – 1.4.1-r8.0 – lora-packet-forwarder version 1.4.1-r8 LoRa Packet Forwarder
    lora-packet-forwarder – 1.4.1-r9.1
    lora-packet-forwarder-dbg – 1.4.1-r8.0 – lora-packet-forwarder version 1.4.1-r8 – Debugging files LoRa Packet
    lora-packet-forwarder-dev – 1.4.1-r8.0 – lora-packet-forwarder version 1.4.1-r8 – Development files LoRa Packet
    lora-query – 0.0.2-r1.0 – lora-query version 0.0.2-r1 LoRa network server query tool
    lora-query – 1.0.2-r1.0
    lora-query-dbg – 0.0.2-r1.0 – lora-query version 0.0.2-r1 – Debugging files LoRa network server query
    lora-query-dev – 0.0.2-r1.0 – lora-query version 0.0.2-r1 – Development files LoRa network server

    /************************************************
    * info AT
    *************************************************/

    ati
    MultiTech mDot
    Firmware: 1.0.8
    Library : 1.0.8

    OK

    at&v

    Device ID: 00:80:00:00:00:00:a1:c7
    Frequency Band: FB_868
    Frequency Sub Band: 7
    Public Network: off
    Start Up Mode: COMMAND
    Network Address: 00000000
    Network ID: a6:8b:7a:0d:34:4e:3a:26
    Network ID Passphrase: my Name
    Network Key: c0.97.85.24.bf.c4.c3.bd.b3.3a.10.1c.d4.a5.99.0e
    Network Key Passphrase: my Pass
    Network Session Key: 00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00
    Data Session Key: 00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00
    Network Join Mode: OTA
    Network Join Retries: 2
    Preserve Session: off
    Join Byte Order: LSB
    Join Delay: 1
    App Port: 1
    Link Check Threshold: off
    Link Check Count: off
    Error Correction: 1 bytes
    ACK Retries: 1
    Packet Repeat: 1
    Encryption: on
    CRC: on
    Adaptive Data Rate: off
    Command Echo: on
    Verbose Response: off
    Tx Frequency: 0
    Tx Data Rate: DR0 – SF12BW125
    Tx Power: 11
    Tx Antenna Gain: 3
    Tx Wait: on
    Tx Inverted Signal: off
    Rx Delay: 1 s
    Rx Inverted Signal: on
    Rx Output Style: HEXADECIMAL
    Debug Baud Rate: 115200
    Serial Baud Rate: 115200
    Serial Flow Control: off
    Serial Clear On Error: on
    Wake Mode: INTERVAL
    Wake Interval: 10 s
    Wake Delay: 100 ms
    Wake Timeout: 20 ms
    Wake Pin: DI8
    Log Level: 4

    OK

    /************************************************
    * info mBed online firmware
    *************************************************/

    static std::string config_network_name = “my Name”;
    static std::string config_network_pass = “my Pass”;
    static uint8_t config_frequency_sub_band = 7;

    version: 1.0.8-1-7ae9ef7

    setting frequency sub band
    setting network name
    setting network password
    setting TX spreading factor
    enabling ACKs
    setting join mode to OTA
    joining network //blocked here

    #12603
    Bryan Tran
    Moderator

    Hi Benjamin,

    The mBed online version is setting – the ‘Public’ mode to True by default. So, try to set your /var/config/lora/lora-network-server.conf on the Conduit to True too and see if it helps.

    ———————————————————————

    “network”: {
    “public”: false, <–Set this to true
    “leasetime”: 0, /* time until mDot join expires (minutes) or 0 for no expiration */
    “name”: “my Name”,
    “passphrase”: “my Pass”
    }

    ….
    ——————————————————————–

    And then do: /etc/init.d/lora-network-server restart

    Thanks,

    BT

    #12619
    Jonathan Pickett
    Participant

    This appears to be a problem with recent versions of mbed-rtos. Use the revision tab in the online compiler to revert the library to revision 111.

    #12623
    Bernaud Benjamin
    Participant

    Hi Bryan,

    It’s successful.
    I changed in public mode, but I must use the appEui and appKey to connect my Mdot and my gateway.
    So I use this code in bed online: https://developer.mbed.org/teams/MultiTech/code/mDot_LoRa_Connect_Example_APP_EUI_KEY/

    Thanks you very much for your help.

    Benjamin.

    #12628
    Bryan Tran
    Moderator

    Hi Benjamin,

    Can you try what Jonathan suggested and let me know if it helps ?

    Thanks,

    BT

    #12633
    Bernaud Benjamin
    Participant

    Hi Jonathan,

    I try your solution with the name and the Passphrase, in private and public stats. The revision doesn’t work. My gateway understand, but not my mdot (version: 1.0.8-1-g7ae9ef7). It’s blocked in join Network ().

    Thanks,

    Benjamin.

    #12644
    Jason Reiss
    Keymaster

    Bernaud,

    What version of mbed-rtos have you tried?
    v111 and v107 are known to work.

    mbed-rtos v117

    [2016-05-23 09:02:07] [INFO] version: 1.0.8-1-g7ae9ef7
    [2016-05-23 09:02:07] [INFO] setting frequency sub band
    [2016-05-23 09:02:07] [INFO] setting network name
    [2016-05-23 09:02:07] [INFO] setting network password
    [2016-05-23 09:02:07] [INFO] setting TX spreading factor
    [2016-05-23 09:02:07] [INFO] enabling ACKs
    [2016-05-23 09:02:07] [INFO] saving config
    [2016-05-23 09:02:07] [INFO] joining network
    [2016-05-23 09:02:07] [INFO] TX Frequency: 868500000 SF: 10 BW: 125 kHz POW: 11 dBm

    mbed-rtos v111

    [2016-05-23 09:04:44] [INFO] version: 1.0.8-1-g7ae9ef7
    [2016-05-23 09:04:44] [INFO] setting frequency sub band
    [2016-05-23 09:04:44] [INFO] setting network name
    [2016-05-23 09:04:44] [INFO] setting network password
    [2016-05-23 09:04:44] [INFO] setting TX spreading factor
    [2016-05-23 09:04:44] [INFO] enabling ACKs
    [2016-05-23 09:04:44] [INFO] saving config
    [2016-05-23 09:04:45] [INFO] joining network
    [2016-05-23 09:04:45] [INFO] TX Frequency: 868100000 SF: 11 BW: 125 kHz POW: 11 dBm
    [2016-05-23 09:04:48] [ERROR] Failed to join network
    [2016-05-23 09:04:48] [ERROR] failed to join network -4:Join Error
    
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.