-
Hi @Gordon, yes as a peripheral. No on detection; I want to set up the security modes supported by Nordic to require the various security modes at the GAP layer.
For this specific application, I'd like to mandate LESC with Just Works (since I'm not worried about MITM protection in this application). If I end up coding this in C, I'll start from the Nordic example code in "LE Secure Connections Multirole Example".
I'm not sure whether this is covered in Web Bluetooth, but I'd think you'd want to be able to set the Security Mode and Level as parameters when setting up, perhaps in setting up advertising?
Let me know if the above makes sense. Happy to chat more about it; I've been getting involved in Cybersecurity in my consulting practice and need to be able to practice what I preach!
New aphorism I saw: "The S in IoT stands for Security".
Thanks! Bill
Not at the moment - nobody has requested it so far.
There's getSecurityStatus when operating as a Central: http://www.espruino.com/Reference#l_BluetoothRemoteGATTServer_getSecurityStatus
You effectively want something similar for Peripheral so you could detect if there was no security and close the connection/ignore commands?