I am trying to use nRF9160 as ble gateway for uploading data from two nRF52832. I am wondering is it possible? can I connect nRF9160 (one gatt client) to two nRF52832 (two gatt servers)?
if it is can you point me to the right direction?
This should be possible. Take a look at the BLE Multilink example. However, you can only have one instance of a server on each Bluetooth device (see Petters answer here). which means that each device will hold the exact same gatt table with the same attribute handles.
at BLE Multilink example, it seems straight forward. But when I try to implement the same thing with nRF9160 ble gateway, I receive an error when subscribing to the gatt of the second server.
to be clear this is what I am doing
1. Connect central with first slave.
2. Subscribe central (gatt client) to the first slave (gatt server)
3. Connect central with the second slave while maintaining the connection with the first.
4. Subscribe central (gatt client) to the second slave (gatt server)
it is on step 4 where it fails. Can you assist?
What error do you receive and what function is returning it?
bt_gatt_subscribe() and the error is -120
I am not too familiar with the zephyr bluetooth libraries, and was not able to figure out what that error means.
Could you try asking for help here: