- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Has anyone tried connecting multiple wiced senses to one Android device? Comments in the Android app source code (see SensorManager.java) include:
"Currently, this application only manages one WICED Sense device at a time. But this can be expanded to support more than one device connection"
What would be involved in this expansion? Anybody have any advice on how I would get started adapting the Android code for multiple devices?
Thanks,
Reynald
Solved! Go to Solution.
- Tags:
- wiced sense
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note that every WICED Sense device ships with the same BD_ADDR, which may cause a group of WICED Sense devices to appear as a single device to your application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note that every WICED Sense device ships with the same BD_ADDR, which may cause a group of WICED Sense devices to appear as a single device to your application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks j.t. By changing the BD_ADDR of each wiced sense, and adapting the Android Application code, we can now connect to multiple WICED Senses.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great News!
JT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi reynald
I am trying to accomplish the same task of connecting multiple WICED sense tags onto one Android phone. One of our developers is looking into changing the BD_ADDR for the tags, but...
What did you change in the Android source code to allow multiple connections?
Thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The first thing we did was check for the UUIDs of each of the devices in GattRequestManager,
onCharacteristicChanged(BluetoothGatt gatt,
BluetoothGattCharacteristic characteristic) {
if(SENSOR_NOTIFICATION_UUID.equals(characteristic.getUuid())){
byte[] value = characteristic.getValue();
and then check against each of the UUIDs of the wiceds
if (gatt.getDevice().equals(device )
where device is your array of BluetoothDevice
Then, it gets kind of complicated. The callback / message scheme in the Android code wasn’t written for multiple wiceds, so you either have to change it all, or like, we did, bypass it all and call processSensorData directly.
Sorry if the above code is kind of jumbled — I’m trying to take extract meaningful parts out of a codebase that has really changed from the original Android code sample.
Reynald