HTCC-AB02S Set Lora Datarate / ADR off

Hello.
Cubecell HTCC-AB02S. I switched off the Lorawan ADR because I want to set the datarate myself out of my code.

I tried the following code without success:

void setDR(int8_t datarate) {
MibRequestConfirm_t mibSet;

mibSet.Type = MIB_CHANNELS_DATARATE;
mibSet.Param.ChannelsDatarate = datarate;
LoRaMacMibSetRequestConfirm( &mibSet );
}

I got every message with SF7 defined in LORAWAN_DEFAULT_DATARATE

Is there a way to change the datarate out of my code ?

Thanks for help.

Marc

hi,

we have this function. please git pull.
%E5%9B%BE%E7%89%87

Be aware that if you do a recent pull take a look at the Radio.SetTxConfig() portion of this post:

There were changes to the preamble length, I’m no LoRaWan expert but I’m not sure how it’s supposed to work with preamble other than 8 (RegionUS915)

Seems preamble default may be 12 or I suppose more for LoRa, 8 for LoRaWan?? Not sure of the validity of this but did see this mentioned out in net land.

Works.

Thanks a lot !

Preamble default is 8 for LoRaWan. We modified it to 16 to adapt to our new 2-channels gateway M00.
We have tested that, 16 is working for other gateway.

Perhaps the change from 8 to 14 ( For US195 at least ) works for a new product gateway but it does not appear to be compatible with end node devices AB02, at least this is my experience.

Are you saying preamble length of 14 “does” work for end node joins on RegionUS915?

Wapel,
When you say it works, did you need to do the pull “and” change the preamble length to 8, or did just the pull do the trick?

I’m just trying to understand if I have something amiss at my end.
Thanks