In one of my current projects, I need:
- to have access to more than 8 kB of RAM (which is not possible when using SoftDevice)
- to have Observer role (which apparently is not implemented in SoftDevice)
Since I don't use any other functionality from the SoftDevice, I decided to implement the Observer and to reimplement the Broadcaster roles. After reading the specification Bluetooth Low Energy Link Layer and nRF51822 RADIO specification I developed a little firmware that makes passive scanning in the advertise channels 37, 38 and 39 using a 1 second scanWindow and 2 seconds scanInterval.
To evaluate my implementation I put BlueZ 5.x to do advertising and I checked with another BlueZ 5.x if the advertising is correct. Then I put my firmware (source code attached) to run. Although the packet are apparently received, their contents are wrong (check the attached log):
- received packets are different in each channel
- CRC check fails
- invalid header fields (PDU type, TxAdd, RxAdd, ...)
- invalid payload (it doesn't contains the advertiser address 00:1B:DC:05:4B:DF)
I tried to put a lot of comments in the source file but english is not my first language, so I apologize in advance for any linguistic mistake.
What can I do to fix my firmware?