I’m using a Adafruit Bluefruit LE SPI friend, and I’m trying to figure out if there’s a way to make it require a password in order to connect or if you can make the device hidden and only connect to certain devices so others can’t access it. I want to make a Bluetooth security system, where as soon as there’s a connection to the Bluetooth module something triggers or happens, doing that with the interrupt pin, but since it is a security system I don’t want to just allow anybody and everybody to freely connect to it. I want it to be like a one time required passcode then you can freely connect or disconnect, or only allow paired devices to connect or disconnect if that makes sense. I don’t know if this is even possible but I would appreciate any help!
Does Bluetooth documentation give you any hint that you are asking about is even possible?
I’ve found something online that mentions a pin that you have to put in every time you want to connect but other than that I haven’t found anything, but I saw something once that said something about putting the device in the “hidden” state and I haven’t been able to find that post anywhere since.
Ok, think some more about what you want. You want some application setting somewhere out there to ask a Bluetooth device for a password before it is allowed to connect to your machine. IS that understanding correct? How will that mystery device/program know about the password you are using today or tomorrow?
You can turn off BLE advertising if you want to make it hidden but the API that you're using on your app or PC side might make it impossible to connect without first doing a scan.
Alternately, you could change the device passkey every time it boots. You'd have to have some way to know what the current passkey is, like a display. That should be more straightforward than trying to connect without an advertised device to connect to.
Let me give a lil background information, I’m doing an engineer project using Arduino and a Bluefruit LE SPI friend, and it’s all connected to a motor driver connected to a motor that will turn a deadbolt automatically when the Bluetooth module senses a connection to a device, so it will automatically lock when it detects a disconnection and unlock when it detects a connection, which would make unlocking you’re door completely automated and all you have to do is turn the handle, but for obvious safety reasons I don’t want just anyone to Willy billy walk up and connect and unlock the deadbolt, so I’m trying to find a way to make it a secure connection between just the module and one or two iPhones assuming that multiple family members will be using this system. I hope that clarifies what it is I’m looking for! I appreciate the help so far!
How do you plan to update the one-time password?
The project is supposed to be a “product” that we sell to customers, and from what I’ve seen to change passkeys you have to enter AT commands using a computer, or using an app, which wouldn’t be ideal for customers as not everyone is tech savvy enough to upload and enter code like that. So I might try to steer away from the password idea!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.