HelTecAutomation / CubeCell-Arduino

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

Example "LoRaWan_OnBoardGPS_Air530.ino" stops working after some time #247

Closed 505222621 closed 2 years ago

505222621 commented 2 years ago

Board: CubeCell HTCC-AB02S GPS Example: LoRaWan_OnBoardGPS_Air530 After running for a few minutes in the open field, the code gets stuck in the GPS segment

Mr-HaleYa commented 2 years ago

are you using battery power?

505222621 commented 2 years ago

are you using battery power?

no,using USB power

rodri16 commented 2 years ago

Same problem here...

hkicko commented 2 years ago

This is because it constantly starts and stops the GPS and there is a memory leak bug in the GPS.end() function that is fixed with this commit: https://github.com/HelTecAutomation/CubeCell-Arduino/commit/85c0c7542b4496658624e578f45d187c321bc8ad

505222621 commented 2 years ago

This is because it constantly starts and stops the GPS and there is a memory leak bug in the GPS.end() function that is fixed with this commit: 85c0c75

yes,GPS.begin -> serial-begin : malloc(buf),no free(buf),change to global variable or serial-end :free(buf)

olman011 commented 1 year ago

In case anyone is still having this problem, in PlatformIO the solution is to change the platform in the platformio.ini file. If you choose the Cubecell GPS board when starting a project it will default to "platform = asrmicro650x". This platform is deprecated and must be manually changed to "platform = heltec-cubecell". Once this is done the GPS functionality will work correctly.