Go Down

Topic: Lora LoraLib with SX1278 ... Bug with Null Character (Read 874 times) previous topic - next topic


Long Story short  This library for lora
Is awesome

It is the 3rd lora lib I'm tring and it is really feature rich , well coded and well documented compared to the other ones

But I've try To add AES Encription on top of it , And found a small bug ( or is it ? )

Sometime AES encription spit back null character as encrypted Data ( ie \0)

This is an issue because as soon as the transmit feature stumble
on it, it assume it is at the end of the data buffer , ( or it behave like so)

To simply demonstrate that, I'm using the Basic TX-RX demo and only doing one modification

Code: [Select]

  int state = lora.transmit("Hello World!");

Is now this
Code: [Select]

   char TXbuffer[64] = "012345678901234567890123456789012345678901234567890123456789" ;     
  //TXbuffer[2]=0;                                                           // uncomment to test
  int state = lora.transmit(TXbuffer,64);       

And as you can see on the Screenshoot,
I'm spying the RF with a SDR , and the burst are proportionaly smaller when introducting the TXbuffer[2]=0;

I've been looking into this for 3 days now , and I'v dig as deep as I could into the library , but didnt found anything looking bad

Any suggestions ?

Ho well

Just found that if using Byte instead of Char , the problem disappere

Type conversions issue I guess

Will have to investigate more , But the loralib is probably not the issue here
Going to bed

Go Up