Normally I can control the interface through the command
hciconfig hcix up/down
Can I do this by using c code ?
Is there sample code I can refer to ?
Thanks
You can use the c code for hciconfig itself. Just download the BlueZ source and open tools/hciconfig.c and use the following functions:-
static void cmd_up(int ctl, int hdev, char *opt)
{
...
}
and
static void cmd_down(int ctl, int hdev, char *opt)
{
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With