captaingz2github / btstack

Automatically exported from code.google.com/p/btstack
0 stars 0 forks source link

hci_number_free_acl_slots: handle 0x0000 not in connection list #416

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi!

The code seems to work normally currently. I have classic Bluetooth and a BLE 
peripheral working at the moment using BTstack. 

I have enabled info and error logging. 
However, I always receive the above error message.

I guess that this might be a result of specifiying the connection parameter in 
some function calls as NULL. 

What would be the correct way of resolving this so that the error message does 
not appear anymore?

Original issue reported on code.google.com by c.w...@mail.de on 25 Aug 2014 at 3:06

GoogleCodeExporter commented 9 years ago
the guess about not specifying the handle properly is correct. I've already 
fixed it in the l2cap_run method. Do you know from where you get the calls with 
handle 0x0000.

Original comment by matthias.ringwald@gmail.com on 25 Aug 2014 at 3:09

GoogleCodeExporter commented 9 years ago
One other place is sm_run().. I'll go over that tomorrow

Original comment by matthias.ringwald@gmail.com on 27 Aug 2014 at 10:29

GoogleCodeExporter commented 9 years ago
Correct. In my code it is also always sm_run(). 
It is caused by the check l2cap_can_send_fixed_channel_packet_now().
Callstack:
hci_number_free_acl_slots_for_handle()
hci_can_send_prepared_acl_packet_now()
hci_can_send_acl_packet_now()
l2cap_can_send_fixed_channel_packet_now()
sm_run()

Original comment by c.w...@mail.de on 27 Aug 2014 at 4:14

GoogleCodeExporter commented 9 years ago
Fixed in sm.c and in hci.c to first post disconnect event and then shutdown the 
connection. Do you get more of these after updating to the current version?

Original comment by matthias.ringwald@gmail.com on 28 Aug 2014 at 9:08

GoogleCodeExporter commented 9 years ago
The messages are gone now. Thanks!

Original comment by c.w...@mail.de on 28 Aug 2014 at 12:38

GoogleCodeExporter commented 9 years ago

Original comment by matthias.ringwald@gmail.com on 28 Aug 2014 at 1:54