I am trying to connect to a BLE device using the bt_gatt_connect function using the following code:
ret = bt_gatt_connect(remote_address, true); if (ret != BT_ERROR_NONE) { dlog_print(DLOG_ERROR, LOG_TAG, "Failed to connect LE device."); } else { dlog_print(DLOG_INFO, LOG_TAG, "GATT connect Success!"); } dlog_print(DLOG_ERROR, LOG_TAG, "GATT Exception : %s", strerror(errno));
However, when I set the auto_connect flag to true, it causes device rebooting.
The return value of the function is BT_ERROR_NONE, but it does not proceed to the next statement. What is very strange is that these issues do not occur in Gear S2 but in Gear S3. I tested it over and over again, but I always showed the same issue. In Gear S2, connection is normal and Auto Connection function works normally. And in Gear S3, if the auto_conenct flag is set to false, a normal connection is made. However, Auto Connection function does not work.
When Gear S3 reboots the device itself, it does not log Crash Information, nor does it generate any error logs.