Heltec v2 LORA to TTN working on Arduino not on RIOT

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?

UPDATE:

I made an experiment. On Arduino I used the following mapping

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)
    .dio = {/*dio0*/ 26} // test for consitency with RIOT implementation      
};

In such way I do not set DIO1 and DIO2. It works, namely it can send a single message and stop.

**Output on Arduino with only DIO0 set, namely .dio = {/dio0/ 26} // test for consitency with RIOT implementation **

ttn-otaa
Starting
Packet queued
3576: EV_JOINING
126755: Unknown event
447803: EV_JOINED
447828: Unknown event

**Output on Arduino with DIO0,1 and 2 set, namely .dio = {/dio0/ 26, /dio1/ 35, /dio2/ 34} **

In this case it works as expected sending periodic messages

ttn-otaa
Starting
Packet queued
3490: EV_JOINING
351787: Unknown event
672836: EV_JOINED
672861: Unknown event
1053510: EV_TXCOMPLETE (includes waiting for RX windows)
2428536: Unknown event
Packet queued
2809184: EV_TXCOMPLETE (includes waiting for RX windows)
4184208: Unknown event
Packet queued
4564855: EV_TXCOMPLETE (includes waiting for RX windows)

on TTN