Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

# master-slave mode conversion #63

Open
codesuper-god opened this issue Dec 20, 2017 · 0 comments
Open

# master-slave mode conversion #63

codesuper-god opened this issue Dec 20, 2017 · 0 comments

Comments

@codesuper-god
Copy link

hi, I recently used the code to achieve BLE master-slave mode conversion. From mode to master mode is no problem. However, the main mode (scan) transfer to the mode encountered HCI resources can not open the problem. You probably do not really know the way I did it. I can simply say it. I set the scan time to 5min, after 5min has passed, I will call the stop () method to close the HCI interface and turn off the main_loop () (which polls the HCI for a while and calls the related functions to handle it) thread. After both are closed, I start ble_server again. It is at this time, there has been the problem of HCI interface can not be opened. I'm sure I've run stop () and did not print any errors.

  d.Stop()
  necessary.HCI_main_loop_chan <- 1 //this is used to end the main_loop thread 

  time.Sleep( 5 * time.Second)

  go ble_server()


If you have any good way to convert from master to slave or slave to master ,please tell me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant