Port not opening for Apple Homekit on Linux

Hi all,

I have a problem while configuring Homekit on openhab which itself is on linux… I followed the tutorial as presented here and doing an analysis of open ports, port 9123 is not! After a lot of searching, I couldn’t find anything about it. Could someone help me to solve this problem? Of course, when I scan the QR code with the Homekit app, it can’t connect to it…

Thanks in advance!

Sure, you need to check
1/ if the service is up and running

pi@raspberrypi:~ $ netstat -nl |grep 9124
tcp        0      0*               LISTEN

2/ if it is accesible
**sudo iptables -L**
if default policy is ACCEPT it will be OK
3/ or try
**nc 9124 -w 1 -v**
Connection to 127.0.0. 1 9124 port [tcp/*] succeeded!

4/ check if there is hap service visible from linux host
avahi-browse _hap._tcp
5/ check if there is hap service visible from your Phone i personaly use “Discover” app but you can use any mdns
6/ check if there are more than 1 router in your wifi setup, sometimes mdns packetes are not passing routers

and check budle startup logs from

openhab-cli console -p habopen log:set TRACE org.openhab.io.homekit.internal
openhab-cli console -p habopen log:tail org.openhab.io.homekit.internal

good luck!

1 Like

Hello, thank you for your answer. In the meantime, I realized that the linux did not know how to open the port because it is connected via wifi and RJ45. So I put the ip address of the RJ45 connection in the Apple Homekit configuration and it opened the port for me directly (after restarting all the same). So it works great now! Thanks again