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
bluetoothSerial.connect() not working for Android 5.0.1? #102
Comments
You should continue to use API level 19 with Cordova even when deploying to your Nexus 4 running 5.0.1 (API 21) |
ok, thanx Don! So.... can you tell me if there is an issue then with BluetoothSerial for 5.0.1 or is my problem something else? |
I haven't seen problems with 5.0. See if you're getting errors in |
I don't totally trust my cordova install right now. To go back to API 19 means I need to reinstall everything from scratch again or else nothing at all works. Right now, the mish-mash of crap I have at least finds the pics and CSS and it looks ok, except I don't get a connect. However, amongst the infinite output from logcat I see: E/BluetoothSerialService(18603): java.io.IOException: read failed, socket might closed or timeout, read ret: -1 |
ok, I just rebuilt everything from scratch again. This is what I see in logcat: |
hmmm....so I wanted to conclusively prove that this was a problem with Android 5.0.1, so I installed my App on an old farty clunky Samsung GT-P7500R running 4.0.3, which your notes say your stuff works on (or a close enough model/version). But, I got the same issue of not being able to connect to Bluetooth (I used connectInsecure() this time based on what you said/did in another Issue posted 'Pairing problem with Android #8'. I did try connect() as well and did not get asked for the PIN, but I never seen this happen with 4.4.4 either). This would make me suspect my Adafruit EZ-Link shield is now busted, but that's an amazing coincidence that it fried the same evening as my Android upgrade. I can also still pair to the device, see it, etc. So, I'm suspicious of my EZ-Link shield right now, but still not totally convinced. |
I'd use connect() rather than connectInsecure() where possible. The Adafruit Bluefruit EZ-Link doesn't ask for a password. I'd expect the bluetooth radio is just in a bad state rather than broken, you should be able to get it working again. |
d'oh!! Problem solved. This is really embarrassing - it was a coding error in pattern matching and combination of chance events where I was trying to connect to the wrong Bluetooth MAC address. |
I'm glad you got it working! |
My App that was working fine for Android 4.4.4 no longer works for Android 5.0.1
I can't be sure if this is a cordova problem of insisting on using API-19 (4.4.2) when I want it to use API-21 (5.0.1) or if the problem is here in this plugin. It fails in bluetoothSerial.connect()
This is on my LG Nexus 4 that just got upgraded to 5.0.1.
The phone can pair to my Arduino Adafruit EZ-Link shield, the App can verify Bluetooth is enabled, get the Bluetooth device list and successfully search for the device name and get the MAC, but it can no longer connect.
I also tried bluetoothSerial.connectInsecure() with the same results.
The text was updated successfully, but these errors were encountered: