Hi, I’m currently using this SX1262 module from EBYTE and a STM32L152 board, I’m trying to connect it to TTN and using the mbed os example and have no success so far, but I can use the same setting with my SX126X shield. My current mbed_app.json look like this:
{
"config": {
"lora-radio": {
"help": "Which radio to use (options: SX126X, SX1272, SX1276) -- See config/ dir for example configs",
"value": "SX126X"
},
"main_stack_size": { "value": 4096 },
"lora-spi-mosi": { "value": "NC" },
"lora-spi-miso": { "value": "NC" },
"lora-spi-sclk": { "value": "NC" },
"lora-cs": { "value": "NC" },
"lora-reset": { "value": "NC" },
"lora-dio0": { "value": "NC" },
"lora-busy": { "value": "NC" },
"lora-dio1": { "value": "NC" },
"lora-dio2": { "value": "NC" },
"lora-dio3": { "value": "NC" },
"lora-dio4": { "value": "NC" },
"lora-dio5": { "value": "NC" },
"lora-rf-switch-ctl1": { "value": "NC" },
"lora-rf-switch-ctl2": { "value": "NC" },
"lora-txctl": { "value": "NC" },
"lora-rxctl": { "value": "NC" },
"lora-freq-sel": { "value": "NC" },
"lora-dev-sel": { "value": "NC" },
"lora-xtal-sel": { "value": "NC" },
"lora-ant-switch": { "value": "NC" },
"lora-pwr-amp-ctl": { "value": "NC" },
"lora-tcxo": { "value": "NC" }
},
"target_overrides": {
"*": {
"platform.stdio-convert-newlines": true,
"platform.stdio-baud-rate": 9600,
"platform.default-serial-baud-rate": 9600,
"lora.over-the-air-activation": true,
"lora.duty-cycle-on": true,
"lora.phy": "US915",
"lora.device-eui": "{ ....}",
"lora.application-eui": "{ ...... }",
"lora.application-key": "{.....}",
"target.components_add": ["SX126X"]
},
"DISCO_L072CZ_LRWAN1": {
"main_stack_size": 1024,
"lora-radio": "SX1276",
"lora-spi-mosi": "PA_7",
"lora-spi-miso": "PA_6",
"lora-spi-sclk": "PB_3",
"lora-cs": "PA_15",
"lora-reset": "PC_0",
"lora-dio0": "PB_4",
"lora-dio1": "PB_1",
"lora-dio2": "PB_0",
"lora-dio3": "PC_13",
"lora-dio4": "NC",
"lora-dio5": "NC",
"lora-rf-switch-ctl1": "NC",
"lora-rf-switch-ctl2": "NC",
"lora-txctl": "PC_2",
"lora-rxctl": "PA_1",
"lora-ant-switch": "NC",
"lora-pwr-amp-ctl": "PC_1",
"lora-tcxo": "PA_12",
"target.components_add": ["SX1276"]
},
"NUCLEO_L152RE": {
"lora-spi-mosi": "D11",
"lora-spi-miso": "D12",
"lora-spi-sclk": "D13",
"lora-cs": "D7",
"lora-reset": "A0",
"lora-dio1": "D5",
"lora-busy": "D3",
"lora-freq-sel": "A1",
"lora-dev-sel": "A2",
"lora-xtal-sel": "A3",
"lora-ant-switch": "D8"
}
},
"macros": ["MBEDTLS_USER_CONFIG_FILE=\"mbedtls_lora_config.h\""]
}
Edit: I actually forgot to put the error in here
Mbed LoRaWANStack initialized
CONFIRMED message retries : 3
Adaptive data rate (ADR) - Enabled
Connection - In Progress ...
OTAA Failed - Check keys
And yes, I double, triple check DevEUI, AppEUI and AppKey .
On the side of the TTN it look like this
Receive join-request
Send join-request to cluster
Accept join-request
Join-request to cluster local
Successfully processed join-request
Receive join-accept message
Foward join-accept message
Foward join-accept message to Application
Schedule join-accept for trans...
Successfully schedule join-accept ....
Then it repeat back to the first line.
Weird thing is, if I’m using Keil then it send message just fine.
Thank you for reading.