Increase device limit beyond 48 devices
This is currently a limitation of the firmware for the CC2531.
Some resources:
- https://e2e.ti.com/support/wireless_connectivity/zigbee_6lowpan_802-15-4_mac/f/158/p/509541/1848708
Is there a way to get the a link to the firmware source code with details on how to build it as well?
@oskarn97 would it be possible to share any details on how you compiled this firmware?
It is not possible to increase the device limit beyond 48 devices since to memory limitation on the Chip. I compiled the Z Stack Home with IAR Embedded Workbench with some flags required for encryption and maximum device limit.
Would it be possible to reduce the size of the firmware so there is more memory left for devices? http://processors.wiki.ti.com/index.php/Optimizing_Flash_and_RAM_Usage_of_Z-Stack_for_CC2530
I doubt if NWK_MAX_DEVICE_LIST defines the maximum number of devices in the network. In this official Texas Instruments document chapter 4 Z-Stack Knobs they are talking about a 400+ nodes network while only having set NWK_MAX_DEVICE_LIST to 10. I have the feeling that when adding more routers to your network you can add more nodes to your network.
Maybe 48 devices is not the limit at all....
Yes, the device limit refers to the number of devices that can be paired to a single coordinator. You can use more of course.
@oskarn97 Could you still tell us what you changed / done to compile the firmware and how to generate the .hex file ?
I've just increased the device limit and enabled secure link join. Apart from that I did not modify the default TI Z Stack Home.

By reducing the MAXMEMHEAP in OnBoard.h to e.g. 1000 I was able to compile with NWK_MAX_DEVICE_LIST 90.
@oskarn97 how did you enable secure link join?
add the "TC_LINKKEY_JOIN" compile on the preprocessor option
@Koenkk Is it safe to reduce MAXMEMHEAP?
@ptvoinfo we need to do some tests with it.
I think it's not possible to reduce the heap size, I'm getting the same error as #65 in this case.
I've created a wiki page which explains how to add more than 48 devices to your network.
@Koenkk @oskarn97 wouldn't we solve the memory problem by using a dongle with a CC2538 SoC? It has up to 32KB instead of 8KB.
@makuser maybe; but that setup is much more expensive.
For now I don't see any problem when using the CC2531/CC2530 with the current firmwares. It's stable even for larger networks.
I have 32 xiaomi zigbee devices... I need to use 1 coordinator e 2 router CC2531 to manage all 32 devices?
@vpomax could be a bit tricky, I would recommend adding another CC2531 router to be sure.
Shouldn't it be possible to use 44 devices with one CC2531 without router with the alternative firmware from https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/CC2531/alternatives/max_devices/?
@cmorlok yes, but note that that firmware could have some downsides. It has less memory available which could lead to freezing and less responsive devices.