Joshua Lilly

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: CRC Erros and lora-network-server.conf Resets On Start #23555
    Joshua Lilly
    Participant

    Jason, is there a way to set the frame counter on the gateway?

    in reply to: CRC Erros and lora-network-server.conf Resets On Start #23439
    Joshua Lilly
    Participant

    So I may have stumbled across an answer, it looks like the issue is from the AES-128 keys, since I am using ABP. When I unplug the seeeduino I noticed that the issue happens, so on the gateway it looks like I will have to delete the device and re-add it along with adding a session to be able to send and receive the data.

    Not sure if that is the best answer so someone please correct me 😛

    in reply to: OTAA with Seeeduino and MTCAP Join Rejected Issue #23314
    Joshua Lilly
    Participant

    One other interesting thing is that when I issue lora-query -n I receive:
    Dev Addr Dev EUI Class Joined Seq Num Up Down 1st 2nd Dropped RSSI min max avg SNR min max avg PER%
    aa:bb:cc:dd ab-f7-15-88-09-cf-4f-3c A 2018-04-28T03:22:24Z 0 0 0 0 0 0 0 0 0 0 0 0 0

    in reply to: Seeeduino Connection to MTCAP #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.

    in reply to: Seeeduino Connection to MTCAP #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.

Viewing 5 posts - 1 through 5 (of 5 total)