troystribling / BlueCap

iOS Bluetooth LE framework
MIT License
715 stars 115 forks source link

Bluetooth device with password #73

Closed Y2JChamp closed 6 years ago

Y2JChamp commented 6 years ago

Hello, i have to connect to a bluetooth device that requires a password. How can i add it programmatically or display an input field to the user?

troystribling commented 6 years ago

Create a authentication service with password management characteristics? Make it secure so that the data is encrypted. You probably should also have your own layer of encryption.

Y2JChamp commented 6 years ago

Hello troy, do u have an example code for what you have described?

Thanks a lot

troystribling commented 6 years ago

There are examples that show how to set up the services and characteristics but none that implement authentication.

See https://github.com/troystribling/BlueCap/tree/master/Examples/CentralManager and https://github.com/troystribling/BlueCap/tree/master/Examples/PeripheralManager.