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

Smart Bluetooth

Anonymous
Not applicable

===

SDK: 2.2

Tag: 920737.

app: hello-sensor.

firmware size ~ 28KB.

===

Description:

Current hello-sensor support 1 handset to connect without any security mechanism.

We find once if someone who have no permission to access the link coincidently connect with the device,

can slave-side call any function to dis-connect the link and reset its MAC address so as that ROOT can
get the right to access the link? Besides, if calling this dis-connection function, is it dangerous that
to break the state machine in L2 STACK level so that handset cannot activate the new connection again? TKS.

0 Likes
1 Solution
hachc_2137126
Level 5
10 likes given 5 likes given First like received
Level 5

Hi,

  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

View solution in original post

0 Likes
8 Replies
hachc_2137126
Level 5
10 likes given 5 likes given First like received
Level 5

Hi,

  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

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

Changing the Mac address dynamically is not supported on our device per the thread you pointed to above.

0 Likes
Anonymous
Not applicable

ok, let me try it. thx.

0 Likes
Anonymous
Not applicable

Hi, Hardy,

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?

0 Likes
hachc_2137126
Level 5
10 likes given 5 likes given First like received
Level 5

Hi Leo,

  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.

0 Likes
Anonymous
Not applicable

Hi, Hardy

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.

0 Likes
hachc_2137126
Level 5
10 likes given 5 likes given First like received
Level 5

Hi Leo,

  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.

0 Likes
Anonymous
Not applicable

Hi, Hardy,

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.

0 Likes