Hi Matthias,
This weekend I was not capable of reconnect. I get all code about TLV of hog_boot_host_demo.c and put in my project, but I can't reconnect my mobile phone for example.
First I put this code
app_state = APP_CONNECTED;
hid_cid = hid_subevent_connection_opened_get_hid_cid(packet);
printf("HID Connected, sending demo text...\n");
// store device as bonded
if (btstack_tlv_singleton_impl){
btstack_tlv_singleton_impl->store_tag(btstack_tlv_singleton_context, TLV_TAG_HOGD, (const uint8_t *) &remote_device, sizeof(remote_device));
}
// done
hid_embedded_start_typing();
break;
And my project works as I would like.
Then to reconnect wiht bonded device
case BTSTACK_EVENT_STATE:
if (btstack_event_state_get_state(packet) != HCI_STATE_WORKING) return;
app_state = APP_NOT_CONNECTED;
hid_start_connect();
break;
And of course all functions related to hid_start_connect(); as hid_connect, timeout.... I change hog for hid.
But I get a timeout and never reconnect with my mobile phone at boot up.
Timeout - abort connection
Scanning for HID devices...
[00:00:11.259] LOG -- hci.c.2192: LE Connection_complete (status=2) type 0, 00:00:00:00:00:00