Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credentials settings #4

Open
amontes80 opened this issue Sep 4, 2024 · 1 comment
Open

Credentials settings #4

amontes80 opened this issue Sep 4, 2024 · 1 comment

Comments

@amontes80
Copy link

I try to validate the project with the credentials I use with the Max-Plastix code but I can't get the TTGO to link to the helium network.
I see that the parameterization is for USE_ABP and for helium USE_OTAA is required.
https://github.com/Max-Plastix/tbeam-helium-mapper/blob/main/main/credentials.cpp

Example data:
DevEUI (msb): AABBCCDDEEFEFF
APPEUI (msb): 6081F9BF908E2EA0 APPKEY (msb):
CF4B3E8F8FCB779C8E1CAEE311712AE5

// Note: If all values ​​are zero, the DevEUI will be generated automatically based on the device macaddr [Recommended!]
uint8_t DEVEUI[8] = { / * lsb */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };

// This value is commonly shared between many devices of the same type or server.
const uint8_t PROGMEM APPEUI[8] = { /* lsb */ 0xA0, 0x2E, 0x8E, 0x90, 0xBF, 0xF9, 0x81, 0x60 };

// The key shown here is the Semtech default key. You should probably change it to a lesser-known (random) value const uint8_t PROGMEM APPKEY[16] = { /* msb */ 0xCF, 0x4B, 0x3E, 0x8F, 0x8F, 0xCB, 0x77, 0x9C, 0x8E, 0x1C, 0xAE, 0xE3, 0x11, 0x71, 0x2A, 0xE5 };

I recommend implementing a selector to avoid adjusting the code or performing conversions. For example.

// Only one of these settings must be defined
//#define USE_ABP
#define USE_OTAA

  1. In order to continue and not die trying, please tell me through an example how they should be parameterized within the current variables with the previous format (APPEUI, DEVEUI, APPKEY)

uint64_t joinEUI = RADIOLIB_LORAWAN_JOIN_EUI;
uint64_t devEUI = RADIOLIB_LORAWAN_DEV_EUI;
uint8_t appKey[] = {RADIOLIB_LORAWAN_APP_KEY};

  1. I use the AU915 region, in the "platformio.ini" file I changed the flag to
    -D CFG_au915=1
    In this code, the parameterization is done by
    const LoRaWANBand_t Region = AU915;
    const uint8_t subBand = 1;
    Is this correct?

Thanks, regards!

@designer2k2
Copy link
Owner

Hello,
it requires OTAA, the credentials.h has some comments on where LSB/MSB is needed, also the region switch and subband is inside there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants