Closed HamiltonChris closed 9 years ago
hci_open_dev in the example yiu supplied is a convenience function that does exactly what I did and returns a bluetooth socket. So either way you have to close it but that code sample he forgets to
OK I guess we can replace the socket() function with hci_open_dev so that it's more clear.
I'm not 100% sure but this function seems to set the mode of the bluetooth device to SCAN_INQUIRY and SCAN_PAGE but in the process it creates a socket and then closes it. I just wondering if this is necessary since I found an example here that doesn't create a socket but seems to do a similar thing.