Hello!
I'm having a problem and a hard time trying to understand what's wrong. Currently, I'm using the SDK 14.2.0, SD 5.0.0 and Segger on macOS 10.14.2.
I'm using the Bluetooth Low Energy example "Relay", from peripheral and central.
I started developing the software on the Development Kit Board (PCA10040), and it's working fine. My application only needs to transmit advertisement packets, with modified manufacturer data (I'm using those bytes). Also, it scans for those packets, that's why I needed the relay example.
The thing is: the firmware is working fine on the Development Kit Board, modifying the data as I need it to, but when I try to program the sparkfun board, it seems to work as usual but some packets have wrong data, always on the same bytes.
It seems an memory issue, but I couldn't fine more resources to fix that.
Here's an example: This is a text file I made to log the packets. It was captured with a Ubertooth One.
The packet with ID 19 has the wrong company ID.
id=18 systime=1548453092 freq=2402 rssi=-35 data=42 14 db f4 1c 3b 85 e7 02 01 04 0a ff 59 00 89 01 41 ea 26 88 01 b3 4f af id=19 systime=1548453092 freq=2402 rssi=-35 data=42 14 db f4 1c 3b 85 e7 02 01 04 0a ff 49 00 8f 01 41 ea 26 8f 01 f1 3c d7 id=20 systime=1548453093 freq=2402 rssi=-41 data=42 14 db f4 1c 3b 85 e7 02 01 04 0a ff 59 00 91 01 41 ea 26
The address of my board is DB:F4:1C:3B:85:E7. This error also happens on the company ID byte, changing to 0xEF or 0xFB.
It happens on a considerable percentage of the packets, like 5%-10%.
Sometimes the error occurs on the first byte of this "data" I'm printing, changing from 0x42 to 0x62.
id=15 systime=1548453091 freq=2402 rssi=-37 data=42 14 db f4 1c 3b 85 e7 02 01 04 0a ff 59 00 81 01 41 ea 26 7b 01 05 53 62 id=16 systime=1548453091 freq=2402 rssi=-41 data=62 14 db f4 1c 3b 85 e7 02 01 04 0a ff 59 00 85 01 41 ea 1e 83 01 f0 73 ab id=17 systime=1548453091 freq=2402 rssi=-41 data=42 14 db f4 1c 3b 85 e7 02 01 04 0a ff 59 00 87 01 41 ea 1e
This is what I'm printing for this data:
int lell_get_data(const lell_packet *pkt, uint8_t *data)
{
int i, length;
length = pkt->length - 6;
for (i = 0; i < length; ++i)
data[i] = pkt->symbols[12 + i];
return length;
}
All configurations are the same as for the DK, and it's working perfectly on the DK.
Thanks in advance,
Danilo.