don / cordova-plugin-rfduino

Cordova (PhoneGap) plugin for RFduino
Other
46 stars 16 forks source link

get "disconnected" error when trying to connect #15

Closed batman11111 closed 10 years ago

batman11111 commented 10 years ago

Hi, after about 10 - 13 successful connections I continuously get the error message "disconnected" when trying to run rfduino.connect(uuid, function1, error). Turning bluetooth off and then on again on my phone tends solve the problem for about 10 -13 more times. Any suggestions on how to fix this?

batman11111 commented 10 years ago

updated to version 0.0.3 and the issue has gone away. I still get the "disconnect" error randomly after maybe 30 or so successful connections. any suggestions?

don commented 10 years ago

Are you using Android? The BLE stacks appear more finicky on Android.

Are you seeing anything in the adb log when it disconnects? Are you doing something in your RFduino sketch immediately after connecting?

TBH, disconnects 1 out of 30 times isn't that bad based on my experience.

batman11111 commented 10 years ago

Yes, that was using an android device.

My sketch turns a pin HIGH onConnect, then it goes to low power mode until a button is pressed. Could this be causing any problems?

I set it up to try to connect 3 times before it errors out, that seems to be working pretty well.

I noticed another issue though. I tested the ledbutton example on 2 different ios devices (iPad 4th gen and iPhone 5) and it is crashing every time it tries to connect. It discovers fine, but when you try to connect it crashes and shuts down the app. Any thoughts on that?

UPDATE... I just noticed during the discovery it lists the device.rssi and device.advertising but its blank where the device.uuid should be. Any ideas?

batman11111 commented 10 years ago

sorry, was using ios 6 on both devices. Upgraded to 7.1 and everything works fine.