usb-bt4le disconnection in Linux


#1

It is Fedora19
It started happening today, every once in a while I have to issue ‘hciconfig hci1 up’ or it does not see the device.
Also only today more than one people are working with the same divece through terminal.


#2

Hello,

Thank you for contacting us about your bluetooth adapter. I’m sorry to hear you are having some troubles with the adapter in Fedora.

We have not had the chance to test the Bluetooth adapter in Fedora, but it should work properly.

If you go back to a single terminal, do you still experience the same problem?

Also, is more than one person trying to access the Bluetooth adapter from their own terminal?

Does it disconnect each time a different terminal tries to access it?

Thank you,

David
Plubable support


#3

David,

It is not exactly reproducable, but yes two people were trying to use same device from own terminal (but communicate with different devices).
Also dmesg does not show anything wierd.

I am going to get another dongle to see if sharing is what is causing the problem.

dashesy


#4

Dashesy,

Thank you for your reply. It will be interesting to see what happens when each terminal accesses its own dongle. I suspect that Fedora does not like to have to have more than one terminal access the same Bluetooth device.

David


#5

The problem now is sporadic and shows even on a single terminal. Need to do ‘hciconfig hci1 up’ every once in a while.

I am beginning to wonder if this has something to do with multiple users and not multiple terminals. Since root user is different from normal user, ‘sudo’ to perform ‘sudo hcitool lescan’ will change the user and show this problem.


#6

That would make sense. But does using sudo log in another user as root, or just give root-level privileges to the already logged in user?

I imagine you could find out with ‘sudo who’. I’m going to try it on my Debian Mint box.

So if you have only one user logged in, and don’t use sudo, the adapter never needs to be reset with hciconfig hci1 up?

Thanks for working on this!

David


#7

‘sudo whoami’ says root here
The problem started to happen after few days, and I have a machine with updated BlueZ libraries from source, not in official repo too. I really need to test this on a more normal machine.
If the driver could print to dmesg that would be helpful I think, right now I may need ‘hciconfig hci1 up’ in one open terminal, while it seems to be working on the other, then it stops working there too.

thanks


#8

David,
It usually is working fine . Only after some time, sporadically it goes to a mode that I can connect and send packets, but recv does not work!

Then I have to unplug and plug back again for it to work. It might also have somethigng to do with many BLE devices laying around here.

Do you know how I can debug this?


#9

David,

I wonder if this has anything to do with LINGER or REUSEADDR socket properties.


#10

I figured out, while connection succeeds, socket send does not send the packets but it returns no error and sets no errno.
Any hint as how I can debug this is appreciated.


#11