python748 / btstack

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

how to change local name? #380

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
As of r2351, the only way to change the local name is to send an entire HCI 
command.

The state machine inside hci.c checks if local_name is null, and it always will 
be. (I don't see any functions to change local_name, and hci_stack is static so 
it can't be accessed from application code, if it's in the daemon, I'm not 
using the daemon because I'm using embedded)

The workaround is obviously just send a second HCI command to write local name. 
But it seems silly. This step takes 20 freaking milliseconds (at 115200 baud), 
and these milliseconds add up if I have to do them twice.

My suggestion is to add a simple hci_set_local_name, similar to 
hci_set_class_of_device, and it can be called immediately after hci_init

Original issue reported on code.google.com by frank.zhao.main@gmail.com on 5 Feb 2014 at 8:36

GoogleCodeExporter commented 8 years ago
I'll add the hci_set_local_name. (the local name in hci_stack clearly indicates 
that this was the original plan)

Original comment by matthias.ringwald@gmail.com on 5 Feb 2014 at 10:53

GoogleCodeExporter commented 8 years ago
thanks, I didn't see any comments about it

Original comment by frank.zhao.main@gmail.com on 5 Feb 2014 at 4:07

GoogleCodeExporter commented 8 years ago
there haven't been any comments, don't worry.

added gap_set_local_name in r2353 to gap.h (and hci.c)

Original comment by matthias.ringwald@gmail.com on 6 Feb 2014 at 12:57