I have a CSR 4.0 Bluetooth dongle on my Raspberry Pi. When Raspbian starts, hciconfig
shows that the state of hci0 is "UP RUNNING PSCAN".
However, every time I connect to the Pi's Bluetooth serial port (I configured that myself) from my laptop or Android phone, its state changes to "UP RUNNING" and never changes back. Same thing happens when I run cgps
on the Pi to connect to a Bluetooth GPS module.
I checked my Ubuntu laptop, the state of hci0 on my laptop is just "UP RUNNING PSCAN", and is not changed even when I connect it to the Raspberry Pi. I am wondering if I have mis-configured somewhere in Raspbian or something else... However, I am not sure because my laptop uses its built-in Bluetooth adapter, not the CSR 4.0 module.
Updated 7/11/2015:
The following operations will reset the "PSCAN" state:
sudo service bluetooth restart
. Not recommended because this clears my manually created SP service. Same problem happens the next time a device connects to the Pi.- Manually unplug the USB Bluetooth dongle and plug it back in. Same problem happens the next time a device connects to the Pi.
sudo hciconfig hci0 reset
. Same problem happens the next time a device connects to the Pi.sudo hciconfig hci0 pscan
. Surprisingly, the same problem does not happen the next time a device connects to the Pi. Namely, after I manually runsudo hciconfig hci0 pscan
, the "PSCAN" state is kept...- Effect of 4 is NOT kept after hci0 is unplugged and plugged back, but is kept after hci0 is reset by
hciconfig hci0 reset
.
Updated 7/16/2015:
The Raspberry Pi with the described problem runs Raspbian w/ Linux 3.18.11+
I just noticed that the same problem is NOT reproduced on another Raspberry Pi which runs Raspbian w/ Linux 3.10-3-rpi. However, I cannot be sure if this problem is kernel-specific.