Giter Site home page Giter Site logo

Comments (13)

GrumpyOldPizza avatar GrumpyOldPizza commented on August 17, 2024

from arduinocore-stm32l0.

BoelD avatar BoelD commented on August 17, 2024

from arduinocore-stm32l0.

GrumpyOldPizza avatar GrumpyOldPizza commented on August 17, 2024

from arduinocore-stm32l0.

BoelD avatar BoelD commented on August 17, 2024

It does a little bit more than that. I experimented with it today and found out that you have to disable the channels before every package you send. If you don't, channels are activated again along the run. Also, it's a good idea to disable channels before joining, so that no time is wasted sending join messages on channels that aren't listened to by the single channel gateway.

Code below worked reliable for me.

void setup( void )
{
    LoRaWAN.begin(EU868);

    for (unsigned int x = 1; x <=15; x++)
 {  
    LoRaWAN.disableChannel(x);
 }

   // LoRaWAN.setADR(false);
    LoRaWAN.setDataRate(0);
    LoRaWAN.setTxPower(10);
    LoRaWAN.setSubBand(2); // for TTN

    LoRaWAN.joinOTAA(appEui, appKey, devEui);

}

void loop( void )
{
    delay(10000);

    if (!LoRaWAN.busy() && LoRaWAN.joined())
    {
        for (unsigned int x = 1; x <=15; x++)
        {  
        LoRaWAN.disableChannel(x);
        }
        LoRaWAN.beginPacket();
        LoRaWAN.write(0xef);
        LoRaWAN.write(0xbe);
        LoRaWAN.write(0xad);
        LoRaWAN.write(0xde);
        LoRaWAN.endPacket();
    }
}

from arduinocore-stm32l0.

GrumpyOldPizza avatar GrumpyOldPizza commented on August 17, 2024

from arduinocore-stm32l0.

GrumpyOldPizza avatar GrumpyOldPizza commented on August 17, 2024

Single Channel Gateways are not supported via hackery on the node side. To be region compliant your gateway needs to send it's proper channel mask post joinOTAA(). There is no way to override the gateways channel mask, as every downlink could change that. The modified LoRaMac-node code in use allows ADR without DR/TX_POWER change to change the channel mask if ADR is disabled. Again, the code for that is implemented. If you use joinABP(), then the node needs to enable/disable the proper channels.

from arduinocore-stm32l0.

nalberto avatar nalberto commented on August 17, 2024

How do you show which channel / frequency is being used to try to join the gateway in the serial console?
I would want to debug but not sure how to display that?

from arduinocore-stm32l0.

GrumpyOldPizza avatar GrumpyOldPizza commented on August 17, 2024

from arduinocore-stm32l0.

nalberto avatar nalberto commented on August 17, 2024

from arduinocore-stm32l0.

GrumpyOldPizza avatar GrumpyOldPizza commented on August 17, 2024

from arduinocore-stm32l0.

nalberto avatar nalberto commented on August 17, 2024

from arduinocore-stm32l0.

GrumpyOldPizza avatar GrumpyOldPizza commented on August 17, 2024

from arduinocore-stm32l0.

nalberto avatar nalberto commented on August 17, 2024

from arduinocore-stm32l0.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.