HelTecAutomation / CubeCell-Arduino

Heltec CubeCell Series (based on ASR6501, ASR6502 chip) Arduino support.
247 stars 138 forks source link

Example LoRaWan_OnBoardGPS_Air530.ino stops working with HTTC-AB02S after hours #272

Open lyncker opened 1 year ago

lyncker commented 1 year ago

Hi, im trying to run the example (LoRaWan_OnBoardGPS_Air530.ino) from this repo with my GPS CubCell Board HTTC-AB02S. After some hours (usually more then 12) the board stops working, which means it is not sending anything more to the TTN. I also can see that the serial out stalls ...

I found some issues here saying there was some problem with the hardware serial buffer which is not beeing freed correctly , so I veryfied to install the version from this repository using the git command like described in the documenation... So now I should have the latest sources installed , but the problem persists. ... does anyone have an idea how to handle this ?

lyncker commented 1 year ago

Is there nobody who can help me out here? I double checked if I have the right Hardwareserial.cpp from the fix: 85c0c75. And in this file , in the HardwareSerial::end() function I find the line free(_rxbuff[_uart_num].rx_buf); so everything seems to be ok ... But If I am the only one with this problem , maybe I did something else wrong with the checkout ?

As described in your install.md I cloned the repo with my git bash, changed to the new ASR650x-Arduino folder and did a checkout for the fix: git checkout -b fix_branch 85c0c7542b4496658624e578f45d187c321bc8ad

Now I got the changes to the hardwareserial.cpp .. Anything else needed?

I bought the board double to ensure that I dont have any problem here...

Thanks a lot for help !

ScholliYT commented 1 year ago

Strange behavior. Unfortunately, I don't own a GPS board to fully test it. I can only say that I operate several sensors based on the Heltec Cubecell Module Puls which run fine without crashing. Are you able to capture the full serial log for the 12 hours somehow? Maybe that shows what is wrong. Apart from that you can investigate memory leaks using the code from this post if you think that is the problem.

lyncker commented 1 year ago

ok I ran this memcheck function tonight and here are the results after stop working some hours ago: If I start the sketch calling the memceck it prints this:

Heap Start:  0x200016c8, Biggest chunk: 1584
Stack Start: 0x20003fb7, Stack: 0x20003f87, Size: 48

the last printout before stop working was:

Heap Start:  0x200016c8, Biggest chunk: 2132
Stack Start: 0x20003fb7, Stack: 0x20003f87, Size: 48 

I would expect that the biggest chunk gets smaller but it is growing...

jjanderson commented 5 months ago

has anyone got a fix for this / or updated sketch please?