Open GoogleCodeExporter opened 9 years ago
I should note that this particular trigger was delivered by sending
hci_pin_code_request_reply from the HCI_EVENT_COMMAND_COMPLETE handler by
accident. Would a saner test case be helpful?
Original comment by soul.cak...@gmail.com
on 16 Oct 2014 at 1:23
OK, this happens because daemon.c calls hci_send_cmd_packet(), without first
checking hci_can_send_command_packet_now().
The question is - what's the right thing to do? Can the command(s) be queued
somehow and issued later? It would be nice not to have to push the issue into
the client.
Original comment by soul.cak...@gmail.com
on 16 Oct 2014 at 12:24
hi
thanks for pointing that one out. I though I'd added checks for can_send_now
everywhere.
In the embedded version, this has to be handled by the app itself, which is
necessary to save RAM.
For the daemon, it cannot be handled by the client, as multiple clients
potentially could send an HCI command at the very same time.
the daemon already has a dirty hack to "park" client connections if the current
packet cannot be handled.
if you like to try, you can add
if (!hci_can_send_command_packet_now) return BTSTACK_ACL_BUFFERS_FULL;
before the hci_send_cmd_packet() call and let me know if that helps.
Original comment by matthias.ringwald@gmail.com
on 16 Oct 2014 at 1:14
It certainly stops the crashes, of course! The client doesn't get terminally
confused either, so it's not getting stuck in park. But it's also not clear
that the original command is being run; I'll take another look tomorrow.
Original comment by soul.cak...@gmail.com
on 16 Oct 2014 at 2:04
This patch has been working well for me. Checks for parked connections when HCI
commands complete, too.
Original comment by soul.cak...@gmail.com
on 22 Oct 2014 at 12:00
Attachments:
Previous patch used return instead of break and prevented clients from
receiving command complete events! Fixed here.
Original comment by soul.cak...@gmail.com
on 22 Oct 2014 at 3:31
Attachments:
Original issue reported on code.google.com by
soul.cak...@gmail.com
on 16 Oct 2014 at 1:20