lobaro / util-lorawan-packets

C-Lang LoRaWAN packet parser & encoder
Other
21 stars 8 forks source link

LoRaWAN_UnmarshalPacket #4

Closed bobmorane83 closed 6 years ago

bobmorane83 commented 6 years ago

Hi,

I think that you need to check of UNCONFIRMED and CONFIRMED in LoRaWAN_UnmarshalPacket

if (packet->MHDR.type == MTYPE_CONFIRMED_DATA_UP || packet->MHDR.type == MTYPE_UNCONFIRMED_DATA_UP) {

instead of

if (packet->MHDR.type == MTYPE_UNCONFIRMED_DATA_UP || packet->MHDR.type == MTYPE_UNCONFIRMED_DATA_UP) {

Sorry, no git at hand to commit, BR,

niondir commented 6 years ago

Thanks for finding this. Seems legit, I will have a look.