BLE and Encryption

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

BLE and Encryption

Postby fly135 » Fri Nov 09, 2018 9:20 pm

Here's the deal. The project I'm working on has an iOS app for provisioning. It's works fine and there is no encryption on the BLE. Now I'm being tasked to integrate this with Homekit. My problem starts with having very little communication and ability to get any changes on the iOS side that aren't well defined. The HK SDK has a very different basic network support than the way we do things here. There is built in non iOS BLE network config as well.

It's easy to just bring up my device and configure with HK support right from the Apple Home app. But I need to be able to configure more, and through the HK built in BLE network config. I'm thinking of going into that BLE support and modifying it because it only allows SSID and PWD. Unlike most of HK, there is source for BLE and I hope to add the advertised service to support my current iOS BLE setup app. But the BLE is also secure (encrypted), and the app currently configures with no encryption.

My question is.... will the iOS app automatically set up encryption when it tries to pair with my ESP32 in HK? Is this transparent to the iOS app? I realize that this isn't the place to ask about iOS, but I was hoping somebody already has the "big picture" about this and can just answer this question. When the ESP32 is the client for HTTP(S), the web server is configured secure based on the connecting port. In that case the client makes the secure decision. In the case of BLE I'm wondering if the server(ESP32) controls the decision to encrypt.

John

chegewara
Posts: 2207
Joined: Wed Jun 14, 2017 9:00 pm

Re: BLE and Encryption

Postby chegewara » Sat Nov 10, 2018 4:43 am

Yes John, you can control it from esp32 side. You can configure esp32 to use encrypted connection and if iPhone app is configured to not use encrypted connection, very unlikely, then will just drop connection.

Who is online

Users browsing this forum: Bing [Bot] and 125 guests