Trouble connecting over WiFi

I recently updated my 2 BrewPi devices (Photon and P1) to F/W 202/03/09. I’m now having trouble connecting to these devices over WiFi.

The LEDs on the 2 devices is ‘breathing’ green, indicating that they are connected to WiFi and the correct IP addresses are listed on their screens.

I can see both devices when I run brewblox-ctl discover-spark

I have the correct device IDs configured in docker-compose.yml. I have also tried powering them individually with no luck. Here is the full contents of docker-compose.yml:

services:
  brewpi_p1_mash:
    command: >-
      --name=brewpi_p1_mash
      --mdns-port=${BREWBLOX_PORT_MDNS}
      --discovery=all
      --device-id=3C0036000551353432383931
    image: brewblox/brewblox-devcon-spark:${BREWBLOX_RELEASE}
    labels:
    - traefik.port=5000
    - 'traefik.frontend.rule=PathPrefix: /brewpi_p1_mash'
    privileged: true
    restart: unless-stopped
  spark-one:
    command: >-
      --name=spark-one
      --mdns-port=${BREWBLOX_PORT_MDNS}
      --discovery=all
      --device-id=22001c001847353236343033
    image: brewblox/brewblox-devcon-spark:${BREWBLOX_RELEASE}
    labels:
    - traefik.port=5000
    - 'traefik.frontend.rule=PathPrefix: /spark-one'
    privileged: true
    restart: unless-stopped
version: '3.7'

They are both connecting correctly over USB.

Any advice?

Edit: link to log file:
https://termbin.com/ooc4

Both Spark services report that discovery finds the Sparks at 192.168.1.112 and 192.168.1.113, but they fail to connect.

This may be a networking/routing issue.

  • Do the addresses match what is shown on the Spark screen?
  • Can you visit the addresses in your browser? (http://192.168.1.113 should show a short text message)
  • Can you access the Sparks from your Pi by running the following command?
brewblox-ctl http get 192.168.1.113

Yes the addresses match what is shown on the spark screens.

No when I try and visit the addresses in the browser it times out.

sending command from the Pi:

brewblox-ctl http get http://192.168.1.112

HTTPConnectionPool(host='192.168.1.112', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xb5c88bd0>: Failed to establish a new connection: [Errno 113] No route to host'))

I also can’t ping the addresses from devices on my network.

The sparks are also not showing up in the ‘connected devices’ page of my router but I can see the DHCP negotiation in the log and there appear to be no issues.

This sounds like a network configuration issue.

Are they in the same subnet as the pi and your pc?
Is the gateway and subnet of the DHCP server correct?
Do you have multiple access points?

I suspect the same although I haven’t made any changes to the network configuration since they were last communicating.

Yes all devices are on the same subnet. I tried deleting the DHCP reservation rule and even with a new IP address same issues.

It’s strange to me that the pi can detect the devices. It’s obviously communicating at some level.

Are there any further checks I can conduct while the sparks are connected via USB like interrogating all of the IP properties of the Sparks? They can’t be connected via USB permanently due to physical locations of devices.

Discovery is through mdns, which runs on UDP broadcasts.

You could use wireshark to do some deep packet sniffing on the network. Set a filter for the IP address of the spark.

Do you have multiple access points? I had problems on my network because 2 access points were broadcasting on the same WiFi channel with the same SSID. It was the default of the mesh routers, but caused packet loss.

Lowest level test is to ping the sparks. Try that before trying a brewblox connection.

Thanks @Elco. I’ll give Wireshark a go.

Interestingly, I left the one driving my fermenter powered over night and it seems to have rectified itself (can now ping the IP address and it communicating correctly with BrewBlox). The timings seem to coincide with the DHCP lease renewal.

Re-powered the 2nd one but still no luck.

I suspect this is something weird my router is doing.