Seeeduino Connection to MTCAP

Home Forums General Seeeduino Connection to MTCAP

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #23244
    Joshua Lilly
    Participant

    I recently bought a MultiConnect Conduit AP and I am trying to add a new end device that is a seeeduino. I see I can add a new device with:
    lora-query –node-add <NODE-ADDR> [CLASS] <APP-EUI> <DEV-EUI> ([APP-KEY] | [NET-SKEY] [APP-SKEY])

    But I have no idea what most of the things correspond to in the arduino code. Specifically, <NODE-ADDR> <APP-EUI> <DEV-EUI> ([APP-KEY] | [NET-SKEY] [APP-SKEY])

    #23247
    Jason Reiss
    Keymaster

    There is an updated firmware image for the Conduits.
    You should update the unit to the latest version.

    AEP 1.4.16 and mLinux 3.3.24
    http://www.multitech.net/developer/downloads/

    Device registration has changed from using the node-add command through lora query.

    http://www.multitech.net/developer/software/lora/lora-network-server/

    I suppose this is your hardware?
    http://wiki.seeedstudio.com/Seeeduino_LoRAWAN/
    I don’t see a direct link to the application code.
    If you could provide some example of the configuration options we could help to setup the device.

    There are two methods of activation OTAA or ABP for LoRaWAN devices.

    OTA will setup the ABP session using a join process where the DevEUI is shared over the air. ABP will manually associate the DevEUI with the DevAddr and session keys at the network server and end-device.

    OTAA
    DevEUI
    AppKey

    ABP
    DevEUI
    DevAddr
    NetSKey
    AppSKey

    #23266
    Joshua Lilly
    Participant

    Jason, I will update the firmware. That is also the hardware I am trying to get working. I am currently using one of the example sketches, which I have modified slightly, since I am in the US using the 915 band. I also looked up the channels to use through another tutorial and added those, which strike me as one possible issue. There is also an example ABP session join, but I am still not able to get it working correctly. Apologies for the basic nature of the question, I am very new to these technologies

    Here is the code I am working with for OTA:

    #include <LoRaWan.h>

    unsigned char data[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0xA,};
    char buffer[256];

    void setup(void)
    {
    SerialUSB.begin(115200);
    while (!SerialUSB);

    lora.init();

    memset(buffer, 0, 256);
    lora.getVersion(buffer, 256, 1);
    SerialUSB.print(buffer);

    memset(buffer, 0, 256);
    lora.getId(buffer, 256, 1);
    SerialUSB.print(buffer);

    lora.setKey(“2B7E151628AED2A6ABF7158809CF4F3C”, “2B7E151628AED2A6ABF7158809CF4F3C”, “2B7E151628AED2A6ABF7158809CF4F3C”);

    lora.setDeciveMode(LWOTAA);
    lora.setDataRate(DR0, US915);

    lora.setChannel(0, 903.9);
    lora.setChannel(1, 904.1);
    lora.setChannel(2, 904.3);
    lora.setChannel(3, 904.5);
    lora.setChannel(4, 904.7);
    lora.setChannel(5, 904.9);
    lora.setChannel(6, 905.1);
    lora.setChannel(7, 905.3);

    lora.setReceiceWindowFirst(0, 903.9);
    lora.setReceiceWindowSecond(904.1, DR3);

    lora.setDutyCycle(false);
    lora.setJoinDutyCycle(false);

    lora.setPower(14);

    while (!lora.setOTAAJoin(JOIN))
    {
    SerialUSB.println(“trying join”);
    }
    SerialUSB.println(“Join success”);
    }

    void loop(void)
    {
    bool result = false;

    result = lora.transferPacket(“Hello World!”, 10);
    //result = lora.transferPacket(data, 10, 10);

    if (result)
    {
    short length;
    short rssi;

    memset(buffer, 0, 256);
    length = lora.receivePacket(buffer, 256, &rssi);

    if (length)
    {
    SerialUSB.print(“Length is: “);
    SerialUSB.println(length);
    SerialUSB.print(“RSSI is: “);
    SerialUSB.println(rssi);
    SerialUSB.print(“Data is: “);
    for (unsigned char i = 0; i < length; i ++)
    {
    SerialUSB.print(“0x”);
    SerialUSB.print(buffer[i], HEX);
    SerialUSB.print(” “);
    }
    SerialUSB.println();
    }
    }
    }

    Here is the code I was trying for ABP, note this one is a little different since I am trying to use the US915HYBRID as opposed to the US915:

    #include <LoRaWan.h>

    unsigned char data[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0xA,};
    char buffer[256];

    void setup(void)
    {
    SerialUSB.begin(115200);
    while(!SerialUSB);

    lora.init();

    memset(buffer, 0, 256);
    lora.getVersion(buffer, 256, 1);
    SerialUSB.print(buffer);

    memset(buffer, 0, 256);
    lora.getId(buffer, 256, 1);
    SerialUSB.print(buffer);

    lora.setKey(“2B7E151628AED2A6ABF7158809CF4F3C”, “2B7E151628AED2A6ABF7158809CF4F3C”, “2B7E151628AED2A6ABF7158809CF4F3C”);

    lora.setDeciveMode(LWABP);
    lora.setDataRate(DR0, US915HYBRID);

    lora.setChannel(0, 903.9);
    lora.setChannel(1, 904.1);
    lora.setChannel(2, 904.3);
    lora.setChannel(3, 904.5);
    lora.setChannel(4, 904.7);
    lora.setChannel(5, 904.9);
    lora.setChannel(6, 905.1);
    lora.setChannel(7, 905.3);

    lora.setReceiceWindowFirst(0, 903.9);
    lora.setReceiceWindowSecond(904.1, DR3);

    lora.setDutyCycle(false);
    lora.setJoinDutyCycle(false);

    lora.setPower(14);
    }

    void loop(void)
    {
    bool result = false;

    result = lora.transferPacket(“Hello World!”, 10);
    //result = lora.transferPacket(data, 10, 10);

    if(result)
    {
    short length;
    short rssi;

    memset(buffer, 0, 256);
    length = lora.receivePacket(buffer, 256, &rssi);

    if(length)
    {
    SerialUSB.print(“Length is: “);
    SerialUSB.println(length);
    SerialUSB.print(“RSSI is: “);
    SerialUSB.println(rssi);
    SerialUSB.print(“Data is: “);
    for(unsigned char i = 0; i < length; i ++)
    {
    SerialUSB.print(“0x”);
    SerialUSB.print(buffer[i], HEX);
    SerialUSB.print(” “);
    }
    SerialUSB.println();
    }
    }
    }

    Thank you for your assistance.

    #23269
    Jason Reiss
    Keymaster

    Conduit Setting Frequency SubBand : 2 has the following channels.
    This should match your uplink channels.

    Index Frequency DR Max Min On
    0 903900000 3 0 1
    1 904100000 3 0 1
    2 904300000 3 0 1
    3 904500000 3 0 1
    4 904700000 3 0 1
    5 904900000 3 0 1
    6 905100000 3 0 1
    7 905300000 3 0 1
    U 904600000 4 4 1
    R2 923300000 8 8

    The first receive window will depend on uplink channel.
    RX1 – 0,923.3; 1,923.9; 2,924.5; 3,925.1; 4,925.7; 5,926.3; 6,926.9; 7,927.5;
    Default RX2 – 923.3 DR8

    These appear to be misspellings, but looking at other examples they appear to be correct for the library.
    https://zakelijkforum.kpn.com/lora-forum-16/seeeduino-lorawan-on-the-kpn-network-8895
    setDeciveMode
    setReceiceWindowFirst

    Have a look at this project, it appears to setup the channels differently.
    Setting to US915 hybrid should initialize the tx and rx channels.
    https://github.com/toddkrein/OTAA-LoRaWAN-Seeed

    I don’t know what frequencies will be set for hybrid on the end-device, you may want to experiment with Frequency SubBand settings on the Conduit. I would try first with 1 and then 2.

    There are a few other projects to look at on github as well.
    https://github.com/search?utf8=%E2%9C%93&q=seeed+lorawan&type=

    #23312
    Joshua Lilly
    Participant

    Thanks for the info Jason! Sorry for the slow response I just got back around to trying to get this to work.

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