In my current developed system, I have ESP32 that acts as GATT Client (Central) that establishing multi-connection:
1. To measurements sensor that acts as GATT Server
2. To android smartphone that acts as another GATT Server
The connection to the sensor is done with scan and check for best rssi (most close sensor).
The connection to the android is done over NFC (and then scanning)
The system samples data from the sensor once in <time> and when it detects connection for a smartphone it's sending all of the samples to him.
Most of the time, when I try to connect the smartphone while I have already a connection with the sensor I'm getting this error:
Code: Select all
E (109231) BT: command_timed_out hci layer timeout waiting for response to a command. opcode: 0x41d
But when I try to connect the sensor after I've connected the android everything is going flowy.
Because we've needed the system to be stable, I've solved it by disconnecting from the sensor (if it was connected), then connecting to the smartphone, then reconnection to the sensor.
By now we need to solve it, do you have any clue for why does it get this error?
END Problem #1;
I'm using Samsung Galaxy A5 for developing. Suddenly, after a week of full working connections, the A5 is disconnecting from my central ESP with those errors: (Regardless of if sensor is connected or not)
Code: Select all
E (82020) BT: bta_gattc_conn_cback() - cif=1 connected=0 conn_id=257 reason=0x0013
E (82020) BT: bta_gattc_conn_cback() - cif=2 connected=0 conn_id=258 reason=0x0013
E (82027) BT: osi_mem_dbg_clean invalid
Sometimes, Factory Reset is solving the problem, but I can not rely on it everytime...
The A5s that I've tested are with Android 6 and 7 OS, I should try to reproduce it with Android 8 OS (there is a new update since last week, I'll update).
I've tested the system with Galaxy S8 and OnePlue 5, but couldn't reproduce it there (Maybe because the A5 is considered as low range???). However, I could reproduce it on my personal Galaxy Note 5.
So again, do you have any clue regards this scenario?
Is someone got familiar with this kind of errors?
Thank you ahead for help, I'm very appreciating it!