-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading characteristics with LightBlue kills reconnecting to the peripheral #54
Comments
Is the iPhone still connected to your Mac (click on BT icon in menubar)? Could you share some screenshots on your iPhone? |
Yes, this happened a few times. I updated my comment after testing on both Mac and Linux. |
So is this an iOS/LightBlue issue as oppose to bleno? |
It's hard to say, it feels very random. Sometimes the peripheral is entirely gone after disconnect, sometimes I get a timeout when I want to reconnect and every now and then it works well. Can you suggest another bluetooth client to figure out what's going on? |
In many cases I have to disable/enable Bluetooth on both the machine and the smartphone to get it working again. |
You could try a CoreBluetooth OS X app instead of bleno: https://github.com/sandeepmistry/osx-ble-peripheral For iOS clients, I haven't tried it myself, but heard good things about BLExplr For Android, I use nRF Master Control Panel (BLE) |
I also faced similar problems. I am running bleno on Debian 7.5 on Oracle Virtual box on Windows 7, and using LightBlue from my iPhone.
nRF Master Control Panel was able to show all the four characteristics. I tried BLExplr as well. But again it was able to display only one characteristic (the static read only one). |
@ksarkar LightBlue caches every peripheral it has previously connected to. So if you later add services or anything to the peripheral, it won't be updated on LightBlue when you connect to that peripheral. Usually turning off and on Bluetooth on my iPhone fixes the issue. |
Aha! I get it now. Today I wrote a separate service with only one characteristic and used LightBlue to read that. That is why when I was next running test.js, it was reading only one characteristics. There was some anomaly in uuids as well. I turned off and on the bluetooth in the linux machine, but it didn't help. After turning off and on the bluetooth on iphone I ran test.js once again. But none of the following iPhone apps - LightBlue, BLExplr, BLE Explorer, BLE Utility, BTLExplorer were able to read the characteristics. However, the dummy service with one characteristics that I wrote was read by all the above apps. |
First of all: I've started using Bleno yesterday and it works great on my Macbook. The BT service is advertised - reading and writing of characteristics works as expected. Awesome.
I use the LightBlue app (https://itunes.apple.com/us/app/lightblue-bluetooth-low-energy/id557428110?mt=8) on my iPhone to read the service and change values from there. As long as I only stay on the top level service overview (after tapping the peripheral name) it works fine. In this case, I can connect to the peripheral, disconnect and reconnect many times.
However, once I dive into one of the characteristics to read or write the value, it will prevent any future reconnects. Reading/writing the characteristic and browsing the service still works fine while you're connected, but once you disconnect you won't be able to go back and will end up with a 'Timeout interrogating the peripheral' error message.
I tried bleno on a Macbook (10.9.3) and a Raspberry Pi (latest raspbian). Same behaviour on both machines. I also tried multiple iPhones running LightBlue.
The text was updated successfully, but these errors were encountered: