Connect to a wiced sense device automatically if available

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello, I trying to find a way to connect only with any wiced sense devices. I want to eliminate the process of selecting the device through the devicepicker activity. Any kind of help is appreciated.

0 Likes
9 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

If you know the BD_ADDRs of the devices which you want to connect automatically, then the whitelist feature may help: Adding and removing master nodes to a whitelist running on a peripheral device

jamesle1​ may have some other ideas as to how to connect ONLY to WICED Sense deivces.

0 Likes
Anonymous
Not applicable

Thank  you for the suggestion. But, I want to connect to wiced sense device through the list of paired devices. If there is any paired wiced sense device in the paired list the app should connect to it without promoting the user. In particular, i want to eliminate the connect button which appears after finding the wiced sense device.

0 Likes

Isn't this how Bluetooth works anyway once paired? The problem you will run into with WICED Sense is that all of them share the same BD_ADDR from the factory.  So you will need to change the address on each, pair, then that unique pairing information will be stored and the automated connection will occur the next time each is within range.

0 Likes
Anonymous
Not applicable

Yes, I know all wiced sense devices share the same BD_ADDR . I have two wiced sense devices and I have changed the BD_ADDR on one of them. After changing the address I am bit confused on how to proceed in connecting the  wiced sense device without using the "connect button" from the app(for the moment I have one wiced sense device paired). Any kind of help is appreciated.

0 Likes
Anonymous
Not applicable

Hello.

Is the app on Android or iOS?

Or is the app application level firmware on a BLE device?

James

0 Likes
Anonymous
Not applicable

Hello,

The app is on Android. And the app itself is the WICED Sense app which I have modified. Any suggestions?

Adarsh

0 Likes

Create an intent filter or filter based on device name, if "WICED Sense Kit" name is available go ahead and bond with the device. If  you want to bond by ble address, go ahead and filter by device address. What ever suits you good, once you do that stop LE scan and you can go ahead and read the attributes.

0 Likes
Anonymous
Not applicable

I was thinking to go in the following way:

1. During the first run of the app scan for all BLE devices, if the device name is "WICED Sense Kit" connect to it and store the MAC address.

2. Once the app is restarted it should check for stored MAC address and connect to that device if available instead of searching for new devices.

0 Likes

How is this coming along?

adarsh.t.math

0 Likes