Hello,
We are working to make a Gateway to collect ambient data(light, temperature, humidity,…) from as much as possible BLE sensor node.
+Hardware: custom board with CC2541(the same for SensorNode and Central)
+Firmware:
- For the SensorNode: Modified SensorTag project to add some other sensor service
- For the Central(controlled by ext MCU via UART): based on “Central connect to multiple peripherals” and “SerialBLEbridge” sample.
+Activity description:
Ext MCU send command via UART to Central to Scan,Connect,Disconnect,.. with SensorNode and request data from them(by sending a letter, for example ). Ext MCU, after received valid sensor data, will forward them to the website, so we can monitor every ambient data from anywhere.
Until now, our system work quite well as we expect with 2 sensor nodes simultaneously connected to a Gateway(including Central with ext MCU), except there is a serious problem.
Many times, the sensor node disconnects with reason 0x08(supervision timeout) after 10-20 seconds connection established success, or could be anytime when the system seem to work OK. The strange thing is that it doesn’t happen with all our board, but almost board with the same firmware. And usually there is only one board disconnects, not both. But if I test the SensorNode by using smartphone with “BLE Scanner” app, there is no disconnect problem occur.
I have no idea where this problem came from. Maybe unsuitable connection parameters(from Firmware for both SensorNode and Central),.. or the hardware(antena, battery,…)???
The connection parameters:
On SensorNode:
DEFAULT_DESIRED_MIN_CONN_INTERVAL 160
DEFAULT_DESIRED_MAX_CONN_INTERVAL 800
DEFAULT_DESIRED_SLAVE_LATENCY 1
DEFAULT_DESIRED_CONN_TIMEOUT 2000
DEFAULT_ENABLE_UPDATE_REQUEST TRUE
On Central:
DEFAULT_ENABLE_UPDATE_REQUEST TRUE
DEFAULT_UPDATE_MIN_CONN_INTERVAL 160
DEFAULT_UPDATE_MAX_CONN_INTERVAL 800
DEFAULT_UPDATE_SLAVE_LATENCY 1
DEFAULT_UPDATE_CONN_TIMEOUT 2000
We are using BLE Stack 1.4.2
Hope to receive your support soon.
Thanks and Best regard.
Ngoc Nguyen Anh