maxyclu
Posts: 4
Joined: Wed Aug 05, 2015 2:07 am

scantest works on raspberry pi 2 but not on pi 3

Tue Dec 12, 2017 9:14 am

I download and run the scantest code found in the link https://github.com/carsonmcdonald/bluez ... scantest.c
It works on raspberry pi 2 but only report once for any specific BLE device on raspberry pi 3. I have localize the problem to be the following statement:
read(current_hci_state.device_handle, buf, sizeof(buf))

It only picks up one BLE packet from a BLE device on raspberry pi 3. The same program can pick up all the packets from a BLE device.

The configuration of my raspberry pi 2:
Linux rpi1 4.1.21-v7+ #2 SMP Tue Apr 26 13:37:54 CST 2016 armv7l GNU/Linux
bluez 5.23

The configuration of my raspberry pi 3:
Linux rpi3 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
bluez 5.23

Any help will be greatly appreciated.
Max Lu

maxyclu
Posts: 4
Joined: Wed Aug 05, 2015 2:07 am

Re: scantest works on raspberry pi 2 but not on pi 3

Tue Jan 02, 2018 3:06 am

By using another Bluetooth dongle, I have localized the problem being the on-board Bluetooth module of the raspberry pi 3. It apparently has
a bug handling mis-formed Bluetooth packets that hangs its data pipe. Any suggestion on how I report this problem to any authority?
Max Lu

User avatar
DougieLawson
Posts: 33847
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: scantest works on raspberry pi 2 but not on pi 3

Tue Jan 02, 2018 6:30 am

Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

maxyclu
Posts: 4
Joined: Wed Aug 05, 2015 2:07 am

Re: scantest works on raspberry pi 2 but not on pi 3

Sat Jan 06, 2018 8:35 am

Thank you very much for the suggestion. However, it's working lately without receiving mis-formed packets. I will leave it for now because the problem can't be reproduced without mis-formed packets.
Max Lu

Return to “C/C++”

Who is online

Users browsing this forum: No registered users and 5 guests