1

I've got a Pi 4 and went to hook up a couple sensors, the first being a DHT11, it's working fine. The second being a DS18B20, on the 1-wire interface (using the standard GPIO pin 4). The circuit is identical to how I had it on a Pi 3, sensor ground to ground, sensor + to 3.3v, data line to pin 4, with a 4.7k pull-up resistor between the data line and the 3.3v line.

The sensor actually works fine in this configuration, I'm getting good readings from it. The problem I'm having is that when the sensor is connected to the 1-wire interface, the wireless networking will not function.

[   17.128561] brcmfmac: brcmf_escan_timeout: timer expired
[   19.688578] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
[   19.688790] brcmfmac: brcmf_notify_escan_complete: Scan abort failed
[   22.248590] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
[   24.808577] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
[   24.808800] brcmfmac: brcmf_set_wpa_version: set wpa_auth failed (-110)
[   24.808804] brcmfmac: brcmf_cfg80211_connect: wl_set_wpa_version failed (-110)
[   27.448573] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
[   27.448797] brcmfmac: brcmf_run_escan: error (-110)
[   27.448803] brcmfmac: brcmf_cfg80211_scan: scan error (-110)
[   30.968578] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
[   30.968791] brcmfmac: brcmf_run_escan: error (-110)
[   30.968798] brcmfmac: brcmf_cfg80211_scan: scan error (-110)
[   33.136292] Bluetooth: Core ver 2.22
[   33.136338] NET: Registered protocol family 31
[   33.136342] Bluetooth: HCI device and connection manager initialized
[   33.136354] Bluetooth: HCI socket layer initialized
[   33.136361] Bluetooth: L2CAP socket layer initialized
[   33.136380] Bluetooth: SCO socket layer initialized
[   34.488578] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
[   34.488799] brcmfmac: brcmf_run_escan: error (-110)
[   34.488805] brcmfmac: brcmf_cfg80211_scan: scan error (-110)
[   36.640124] Bluetooth: HCI UART driver ver 2.3
[   36.640134] Bluetooth: HCI UART protocol H4 registered
[   36.640177] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   36.640308] Bluetooth: HCI UART protocol Broadcom registered
[   38.008583] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
[   38.008818] brcmfmac: brcmf_run_escan: error (-110)
[   38.008826] brcmfmac: brcmf_cfg80211_scan: scan error (-110)
[   41.528576] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
[   41.528803] brcmfmac: brcmf_run_escan: error (-110)
[   41.528811] brcmfmac: brcmf_cfg80211_scan: scan error (-110)

I moved the 1-wire to a different gpio pin thinking that might help, but I'm still getting the same results. My sensors all work, but no WiFi. I've measure the voltages on the data pin, getting ~3.3 as I'd expect. Any ideas on what could be going on?

Thanks in advance.

  • I vividly remember that I was happy when successfully did 1-Wire DS18B20 with 12 sensors on 1 GPIO pin, but then very unhappy to find that my UART does not work anymore. In other words, 1-Wire and UART cannot not go together. But I did not notice that WiFi and 1-Wire do not go together. No UART at the same time is already sad. No Wifi is ridiculously unthinkably sad! Cheers. – tlfong01 Jul 7 at 2:37
  • It is extremely unlikely that the GPIO is affecting WiFi which is connected to the on-board sdio interface. Without knowing what else you fiddled with no one can answer. – Milliways Jul 7 at 3:48
  • Thanks for that, seems weird to me too. As far as fiddling, there's been nothing more than I posted, this same circuit runs fine on pi3, fails on pi4, even using the same disk image. I don't mean a copy, but the same physical circuit connected via a ribbon cable. – lane.maxwell Jul 7 at 3:53
  • To clarify, the pi boots fine without the sensor connected to pin 4. With the sensor connected the wifi fails, but the sensor is working properly. I know it seems like it shouldn't affect the wifi, but clearly it is – lane.maxwell Jul 7 at 3:56
  • Perhaps your 1-Wire driver is out of date. I use this driver: python3-w1ThermSensor-1.0.5 and found it OK for both Rpi3 and Rpi4: (1) "DS18B20 Temperature Sensor - Rpi 3/4 Driver, Wiring, Detection, and Python Programming": raspberrypi.stackexchange.com/questions/100203/… There are a couple of troubleshooting tricks, including: (2) Use a strong pullup, say 1k8, (3) Start with short wires, say 0.3 meter, gradually trials and errors to to your 30 meters. / to continue, ... – tlfong01 Jul 7 at 5:41
1

I had this same issue; it turned out to be a weak power supply for the pi4. After using a type-C laptop charger, the issue went away.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.