Hi this is related to Trying to get the LoRaWAN example to work where I did not find a definitive answer
GOAL: make Heltec v2 LORA running RIOT Lora examples (any e.g. lorawan, pkg_semtech-loramac …) connect to TTN
PROBLEM: join always fail wit the same error as in the post referenced at the beginning
after few MAC timer timout I got join not successfully
BACKGROUND:
The board works perfectly if I use arduino ide with lmic
The setting of the arduino skect are the follwing
const lmic_pinmap lmic_pins = {
.nss = 18,
.rxtx = LMIC_UNUSED_PIN,
.rst = 14,
//.dio = {/*dio0*/ 26, /*dio1*/ 34, /*dio2*/ 35} // working with HELTEC Loro 32 v.2
.dio = {/*dio0*/ 26, /*dio1*/ 35, /*dio2*/ 34} // working with HELTEC Lora 32 v2. (HELTEC Doku)
};
which are indeed consistent with RIOT/board.h at master · RIOT-OS/RIOT · GitHub
except for the fact that
#define SX127X_PARAM_DIO1 GPIO_UNDEF /* GPIO35 has no pulldown, leads to init error */
#define SX127X_PARAM_DIO2 GPIO_UNDEF /* GPIO34 has no pulldown, leads to init error */
Apaprently, the pulldown resistors are set internally on the arduino by
void SX1276IoInit( void )
{
GpioInit( &SX1276.Spi.Nss, RADIO_NSS, OUTPUT, PIN_PUSH_PULL, PIN_PULL_UP, 1 );
GpioInit( &SX1276.DIO0, RADIO_DIO_0, INPUT, PIN_PUSH_PULL, PIN_PULL_UP, 0 );
GpioInit( &SX1276.DIO1, RADIO_DIO_1, INPUT, PIN_PUSH_PULL, PIN_PULL_UP, 0 );
}
GUESS: I think RIOT lora does not work because GPIO34 and GPIO35 have no pulldown resistors. Is there any why to set internal resistor with RIOT?