Could you check this function 'blecm_disconnect'? I use it to disconnect the connection to either master or slave role.
But I don't know how to reset the MAC address. Is it possible? referring to How to change MAC address randomly while running
Changing the Mac address dynamically is not supported on our device per the thread you pointed to above.
ok, let me try it. thx.
I use hello-sensor long press key to trigger the function u mentions, ya app layer can get
disconnected trace but after disconnection, this handset is just connected right away and again.
But if using handset press disconnect key, after disconnection, the other handset can see it's ADV.
It seems besides blecm_disconnect(), there is still some function to do like the operation as handset side disconnection. Any help?
Try to understand your scenario, correct me if wrong.
Handset (i.e. mobile phone) --- connect to ---> device (running hello_sensor).
Pressing button (long) on device that will shut down the connection between handset and device, but the connection is made again after disconnection.
Managed on handset (mobile phone) to disconnect to device, then connection will not be back.
If it's such the case as said above, I would suggest to check if any *auto re-connection* is designed at handset side.
R u in TW also?
May we have a phone call? Thanks for ur quick response.
Ya, ur description is as what I say so.
And I think when device is connect with our APP of handset, once we trigger disconnection,
APP state of handset is still kept with connected and it may be possible that APP trigger it or lower layer of Android.
However, it's hard to do that if its in handset lower-site...
Is any possible to clean memory or clean more as pure action like "handset to disconnect" and then
other handset can do the re-scan to find this device.
Sorry, I'm not familiar with the Android platform. Don't know if any trick inside.
But I don't think that there is a way triggered from device side that can be used to make such *clean* disconnection.
Maybe you need to check details further at Android platform, if any re-connect is implemented whether at driver or application.
I also suggest to have sniffer utility to check the protocol transaction over the air, this can basically help to clarify symptom at both device peer.
Thanks for ur update info.
So there is a question that when BCM developed hello-sensor with 1_handset support.
There is a situation possibly found.
If user has already attach this device with his handset, and one day this handset is locked in
user's home and he's not at home. If other families want to query sensor values but the link
has been established. If they push long press key to disconnect it and the re-connection will
still belong to original user's so there may be a problem.
BTW as previous topic, whether or not if after long press key to disconnect the list and try to
set transmission power to lowest values to avoid ADV's reaching to original handset and therefore,
another trigger the scan and it's enough time to get new link from others. Is it possible?
Do u know the lowest value of transmission setting by using which functions?
I know this blecm_setTxPowerInConnection() is in connection and any one is allowable to use during disconnection to adjust device Tx power? TKS.