Can I ask about your cordova-ble plugin here?
It's a very cool plugin. Thanks for making it. I don't have much experience (any) with IOS-development, but quite a lot with Android, so I have a dumb question.
I'd like to make an app which listens for BLE-events in the background, and brings up the screen/app when it receives a message. Possibly also just log the event without bringing up the app. Is this suitable to do with Cordova, or is it a better option to go native alltogether?
Best regards,
Lars
Question about your Cordova-BLE plugin
Re: Question about your Cordova-BLE plugin
Hi Lars,
Many thanks for asking about the BLE plugin. Will look into the how running BLE in the background works on Android and iOS. This seems to be a hot topic, many people want to monitor BLE devices in the background and take some action when a device comes in range or updates its status.
On Android I would guess you can configure Cordova to run the app in the background, if it does not work out-of-the-box. On iOS, i know there are new APIs for using iBeacons in the background, not sure about BLE in general. Let me look into this a bit more.
Very best regards, Micke
Many thanks for asking about the BLE plugin. Will look into the how running BLE in the background works on Android and iOS. This seems to be a hot topic, many people want to monitor BLE devices in the background and take some action when a device comes in range or updates its status.
On Android I would guess you can configure Cordova to run the app in the background, if it does not work out-of-the-box. On iOS, i know there are new APIs for using iBeacons in the background, not sure about BLE in general. Let me look into this a bit more.
Very best regards, Micke
Re: Question about your Cordova-BLE plugin
Not sure this is the right place for Cordova-BLE plugin questions but I'm also interested in doing proximity notification/data exchange with the Cordova-BLE plugin.
Another question:
Have had some success with using the plugin to work with RFduino but I had to use 128bit UUID's for services and characteristics. Also, for standard services like heart rate, I haven't been able to read the services and characteristics regardless of UUID length after connecting. The heart rate service uuid, for example, is 0x180D (or '0000180D-0000-1000-8000-00805f9b34fb'). Get an error trying to read either form.
With RFduino the service is 0x220 and this doesn't work with the plugin but '00002220-0000-1000-8000-00805f9b34fb' does. Any clue?
Another question:
Have had some success with using the plugin to work with RFduino but I had to use 128bit UUID's for services and characteristics. Also, for standard services like heart rate, I haven't been able to read the services and characteristics regardless of UUID length after connecting. The heart rate service uuid, for example, is 0x180D (or '0000180D-0000-1000-8000-00805f9b34fb'). Get an error trying to read either form.
With RFduino the service is 0x220 and this doesn't work with the plugin but '00002220-0000-1000-8000-00805f9b34fb' does. Any clue?
Re: Question about your Cordova-BLE plugin
Hi,
Regarding your 2nd question: My understanding is that there is currently no support for standard services & profiles defined by Bluetooth SIG such as e.g. Battery level, Heart rate Sensor etc, but the RFduino team is looking into this. If you are a member on Rfduino forum here is a link addressing this : http://forum.rfduino.com/index.php?topi ... 38#msg1638. I also copy in a response to one of the questions in this forum:
"RFduino only provides access to predefined services, you can not define any new ones or change the ones provided.
Here are the services provided -
2220 - Service UUID
2221 - Receive UUID
2222 - Send UUID
2223 - Disconnect UUID
If you want more than that you will need to use the Nordic tools AND you will no longer be able to program the device using the Arduino IDE."
Regarding your 2nd question: My understanding is that there is currently no support for standard services & profiles defined by Bluetooth SIG such as e.g. Battery level, Heart rate Sensor etc, but the RFduino team is looking into this. If you are a member on Rfduino forum here is a link addressing this : http://forum.rfduino.com/index.php?topi ... 38#msg1638. I also copy in a response to one of the questions in this forum:
"RFduino only provides access to predefined services, you can not define any new ones or change the ones provided.
Here are the services provided -
2220 - Service UUID
2221 - Receive UUID
2222 - Send UUID
2223 - Disconnect UUID
If you want more than that you will need to use the Nordic tools AND you will no longer be able to program the device using the Arduino IDE."
Re: Question about your Cordova-BLE plugin
Thanks for the info. As it turns out, the cordova-ble plugin currently seems to like 128 bit UUID's with lowercase alpha characters, at least when using easy-ble.js. That's all I had to change. I got confused because some other ble libraries accept the short forms (180d or even 180D for the heart rate service). So the Polar H7 is working great with the evothings cordova-ble plugin. Just used '0000180d-0000-1000-8000-00805f9b34fb' for the service uuid.
Re: Question about your Cordova-BLE plugin
Hi,
I made a quick search on this topic and found following: "Software generating the hexadecimal representation of a UUID shall not use upper case letters."
This I found here: http://www.itu.int/rec/T-REC-X.667-201210-I/en
I made a quick search on this topic and found following: "Software generating the hexadecimal representation of a UUID shall not use upper case letters."
This I found here: http://www.itu.int/rec/T-REC-X.667-201210-I/en
Re: Question about your Cordova-BLE plugin
@mobilars
Hi Lars,
Regarding your question about background using BLE in the background, I think it works out-of-the-box on Android, and on iOS there are Xcode settings to experiment with.
If you go to the "Capabilities" tab in Xcode, there is a section called "Background Modes", try to turn it ON, then check "Uses Bluetooth LE Accessories".
You could try to do this for the Evothings Client Xcode project, for example, and see if BLE runs in the background.
Here is the Apple documentation page on the subject:
https://developer.apple.com/library/ios ... 57-CH7-SW1
Regards, Micke
Hi Lars,
Regarding your question about background using BLE in the background, I think it works out-of-the-box on Android, and on iOS there are Xcode settings to experiment with.
If you go to the "Capabilities" tab in Xcode, there is a section called "Background Modes", try to turn it ON, then check "Uses Bluetooth LE Accessories".
You could try to do this for the Evothings Client Xcode project, for example, and see if BLE runs in the background.
Here is the Apple documentation page on the subject:
https://developer.apple.com/library/ios ... 57-CH7-SW1
Regards, Micke
Return to “Questions and answers”
Who is online
Users browsing this forum: No registered users and 15 guests