- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have set blecm_setmaxconnection(6) so it should be possible to connect 6 devices.
But at the moment I can only connect 3 devices. If I press the button to allow a new connection,
the client is rebooting.
As another test, I set the max connections to 4, but I can sill only connect 3 devices.
The 4. device won't connect to the client.
I appended the traces of both tests.
(The logs are of the hello_client, but the name of it is sensor, so don't get confused 🙂 )
Perhaps somebody has a hint for me what I could check to connect my 6 devices.
One thing I noticed is the numbering of the handles.
The handles are: 0x40, 0x42, 0x43. But where is 0x41 (reserved for the smartphone)?
Also the last device get disconnected with reason 0x3E, but reconnects successfully.
Could this be the reason for the one missing connection if max connections is 4?
Solved! Go to Solution.
- Labels:
-
MasterSlave
-
SDK 2.X
- Tags:
- connected devices
- connections
- hello_client
- max connections
- maximum connections
- simultaneous connections
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Matthias,
I believe we have only tried 8 devices without sending ADV.
JT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Matthias,
Have you seen this thread?
Re: hello-client switch to slaves after smartphone connectes (con't)
Thanks
JT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi JT,
Yes I know the other thread. I know it should be possible to connect 6 sensor to the hello_client.
But my client is rebooting if I'm connecting 4 devices.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Our AE Arvind had provided a fix to this. Let us know if it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi boont,
Thanks, the link helped a lot.
I added the blecm_setmaxconnection to create insted the INIT function.
But are the max connections I set with that function including the connection to a smartphone?
If I set maxconnection to 6, I'm able to connect to 5 slaves.
So if I want to try to connect to 8 slaves I have to call blecm_setmaxconnection(9)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes. Max number of connections are for both masters and slaves.
So your smartphone which I assume is connected as a master will be considered as one of the connections in hello_client.
However, I'm not sure about the maximum number of connections limited by our hardware and stack implementation,
meaning I'm not sure if you can connect 9 devices.
We'll get back to you on that after asking the developers.
Thank you.
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Matthias,
So if I want to try to connect to 8 slaves I have to call blecm_setmaxconnection(9)?
1. The ble_setmaxconnection() needs to be called in the APPLICATION_INIT() function. If it is done later, then you will have an undefined behavior.
2. You also need to check how much FREE RAM you have.
3. For every connection, you need about 800 bytes.
4. So if you set it to 8 devices, the you will take up 6.4K
5. The default number of devices is 4, so your RAM usage will go up be 3.2K
6. Therefore, you need to make sure you are NOT running out of RAM.
Hope this helps
JT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi JT,
I did further tests.
I removed the setmaxconnections to test if the controller also reboots if it connects to 4 (3) devices at the same time.
There is a log showing you rebooting the controller while connecting to the first device.
After the reboot the devices can connect fine.
I also add code to print the free RAM. But this don't change over the time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I updated my SDK now and using WICED 2.2.2.
It seems like connecting 7 devices (without smartphone) is no problem anymore.
But if I configure my client to connect to 9 devices (setMaxconn(9)),
I can't connect to one of my devices (the same 7 devices sending ADVs)
The client receives ADV, but a call of blecen_Conn has no effect.
Is there something I can do to connect 8 devices (without smartphone)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Matthias,
1. The setMaxconn(9) will not work - you need to set setMaxconn(8).
2. For every connection, you need about 800 bytes.
Thanks
JT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi JT,
Thank you for the clarification.
I thought i had read somewhere I can connect 8 devices and can connect to a smartphone.
This means I have to decide to connect 7 devices and sending ADV or connect 8 devices without sending ADV?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Matthias,
I believe we have only tried 8 devices without sending ADV.
JT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a piconet can include 8 units at the most.,you can refer to the BLE specification 4.0 OR 4.1 .