Is it possible to use hello-sensor as slave connected with multiple clients?

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

cross mob
Anonymous
Not applicable

From hello-client example, i can figure it out that
helloSensor (slave)<-> helloClient(master/slave) <-> 4 multiple clients.

my question is, whether or not that we just implement 1 hello-sensor as slave but can be connected
with 4 multiple clients and that is to say, this sensor device has no master feature but only slave
(notification/indication to multiple client without using master function?)

to sum up, is it possible that below only:

helloSensor(slave) <-> 4 multiple clients

that is to port some of similar codes of helloClient app into helloSensor app, workable?

1 Solution
VictorZ_46
Employee
Employee
5 comments on blog 25 sign-ins 250 likes received

What you are asking is for a device to perform as a slave for 4 masters.  This is not possible in the current version of the chip.  The limit is 2.  Being a master for multiple slaves is quite different than being a slave for multiple masters (matches the real life).  The master controls the timing of the connection and it decides when to poll the slaves.  The slave needs to listen for polls from the master, which is getting difficult with multiple masters because they are not synchronized.  Having said that, future generations of the chip will support much more than 4 masters.

View solution in original post

7 Replies
VictorZ_46
Employee
Employee
5 comments on blog 25 sign-ins 250 likes received

What you are asking is for a device to perform as a slave for 4 masters.  This is not possible in the current version of the chip.  The limit is 2.  Being a master for multiple slaves is quite different than being a slave for multiple masters (matches the real life).  The master controls the timing of the connection and it decides when to poll the slaves.  The slave needs to listen for polls from the master, which is getting difficult with multiple masters because they are not synchronized.  Having said that, future generations of the chip will support much more than 4 masters.

Anonymous
Not applicable

Hi, Victor,

So u mean to implement like this

helloSensor(slave) <-> 2 multiple clients

is possible? and currently 20737 chip support this also...?

0 Likes

That is correct.  For example current Windows or Android implementation does not support peripheral role.  20737 can support simultaneous connection to up to 2 Windows machines.

Anonymous
Not applicable

Hi, Victor,

Thx...


and one more question, if we implement like this
helloSensor(slave) <-> 2 multiple clients

is it equal concept to right high-line part used by "" below ?

helloSensor (slave)<-> (master) "" helloClient (slave) <-> 2 multiple clients (master) ""

0 Likes

Yes that should work.  20736 can support 2 connected masters and 6 connected slaves at the same time.

Anonymous
Not applicable

Hi, Victor,

See.

However, i meet one problem,
if i use hello-sensor as a slave to connect 2 master (handset),

only 1 handset can connect with device and the other fails to connect with it.
So do i need to port some codes of hello-client to hello sensor example.
Maybe in hello sensor, it needs some function calls which are used in hello-client example...

0 Likes
Anonymous
Not applicable

I meet one symptom is below,
- original issue is,
when one master is connected with slave, the other can not scan it out.

- after doing some hello-client codes (connection up and connection down codes with index-process for 2 masters),

both masters can scan the slave and find it but when one is connected with slave, the other can not be
connected with it either and original connected one is then disconnected by a timer and the failed one
can connect with hello-sensor. That means only 1 handset can connect with slave at one time. Dont know where
the problem is?

0 Likes