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
Comment #1
Posted on Feb 5, 2014 by Swift OxI'll add the hci_set_local_name. (the local name in hci_stack clearly indicates that this was the original plan)
Comment #2
Posted on Feb 5, 2014 by Swift Dogthanks, I didn't see any comments about it
Comment #3
Posted on Feb 6, 2014 by Swift Oxthere haven't been any comments, don't worry.
added gap_set_local_name in r2353 to gap.h (and hci.c)
Status: Fixed
Labels:
Type-Enhancement
Priority-Low