Pairing Problem using Light Bulb example #30
-
|
Hi, I'm running the Lightbulb sample on a ESP32 DevKit v1 board with ESP32 WROOM32. The only modifications are : before the homeSpan.begin The ESP32 is connected to the WiFi but I can not pair it with the HomeKit App. I looked at aladin21 post and used the mdns browser. I can find the device with the following carateristics : I can see the 2 keys exchanges but the Home App tells me the device can not be paired. My iPhone is on the latest iOS version 14.4. Here is my log content : Any idea ? Many thanks for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
It appears that the Home App is not receiving responses from HomeSpan to its <M1> pairing request. After sending <M1> the next request from the Home App should be <M3>, rather than a repeated <M1> request. The errors being reported from WiFiClient.cpp suggest that this is a WiFi problem as opposed to a pairing problem -- you should definitely not be receiving these errors (they are not HomeSpan errors, but produced by ESP32 code itself). I'll see if I can track down what this error means, but in the interim, can you try changing the statusPin to something else? What is the specific ESP32 board you are using (the manufacturer)? |
Beta Was this translation helpful? Give feedback.
-
|
Update and Solution: I realized that you must have compiled with the Debug Level set to "Errors." When I do so, I get the same error messages from WiFiClient, but yet I can pair correctly. So this problem has nothing to do with the WiFi report of errors - sorry to lead us down the wrong path. However, I did finally notice in your log output that the SALT chosen by HomeSpan is only 15 bytes. This can only happen if the initial byte is zero, and there's a 1 in 256 chance that this will occur. My guess is HomeKit needs the initial zero, which is something I can explore and fix in the code in the next patch release. In the interim, you can solve this by typing 'E' into the Arduino Serial Monitor. This erases the NVS which causes HomeSpan to generate a new SALT, which hopefully will be 16 bytes (less than 0.5% chance that it will be 15 bytes again). Note you'll have to also re-type your WiFi credentials after executing the 'E' command since those will have been erased as well. Please let me know if this solves the problem. |
Beta Was this translation helpful? Give feedback.
-
|
Really glad it's working. I was able to reproduce the problem and fix the issue. The fix will be part of next patch release (1.1.5) |
Beta Was this translation helpful? Give feedback.
Really glad it's working. I was able to reproduce the problem and fix the issue. The fix will be part of next patch release (1.1.5)