Quantcast
Channel: MultiTech Developer Resources » All Posts
Viewing all articles
Browse latest Browse all 7111

mDot running out of memory after around 800 frames

$
0
0

I’m using the ARM mbed IDE to code my mDot, and in my project I am using libmDot-mbed5 v2.0.15 with mbed-os v5.1.5. I was content with how my code worked and decided to run some endurance tests. The tests revealed the following bug: after sending around 800 frames (FCnt varies from 2af to 588 in various tests) with 13 bytes of payload and ACKs set to 1, I always get the following error just before sending:
Operator new[] out of memory
after which the mDot stops.

I started checking whether my payload vector of uint8_t might be the cause, but it was not. Why I’m sure: I clear it before each send, even tried using std::vector<uint8_t>(payload).swap(payload); (error still persists), and a final test of looping my send method 1000+ times without actually sending anything gave no errors.

So my question is as follows:
Does libmDot store data that is sent or received (frames) in some vector? If not, what else could be the cause of the mDot running out of memory? The only way out right now seems to do a soft reset every 600 or so frames, but this isn’t really a good solution =/.

mDot output:
Just before the error:

[INFO] Configure radio for TX
[INFO] Time-on-air for 13 byte: 164
[INFO] Preparing frame
[INFO] Configure radio for TX
[INFO] Configure radio for TX
[INFO] Rx Window 1
[INFO] RxDone 12 bytes RSSI: -66 dB SNR: 77 cB
[INFO] Packet for 00000003
[INFO] Packet Received : Port: 0 FCnt: 0000046e Size: 0 ACK: 1 DUP: 0
[INFO] Packet RSSI: -66 dB SNR: 77 cB
[INFO] successfully sent data to gateway
[INFO] Time to next TX: 675

Error:

[INFO] Configure radio for TX
[INFO] Time-on-air for 13 byte: 164
[INFO] Preparing frame
Operator new[] out of memory

Viewing all articles
Browse latest Browse all 7111

Trending Articles