Uncategorized

1-Wire problem

Issue with Pi 4 and 1wire

Ask QuestionAsked todayActive todayViewed 16 times0

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.wifipi-4sensor1-wireshareedit  follow  close 1flag asked 5 hours agolane.maxwell101 New contributor

  • 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 4 hours ago   
  • 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 2 hours ago
  • 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 2 hours ago
  • 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 2 hours ago
  • 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 1 hour ago    
  • In case you really need very long wiring, you might try this: (4) “Rpi3B+ Python DS2482 I2C to 1-Wire Bridge Connecting 10+ DS18B20 Temperature Sensors Using 30 Metres Long CAT5e Cables”: raspberrypi.stackexchange.com/questions/111412/…. Good luck. Cheers. – tlfong01 1 hour ago   
  • One more thing. You must use 3V3 to power you DHT11, or you Rpi4 might latch up and fried, or half fried: (5) raspberrypi.stackexchange.com/questions/97949/… (6) raspberrypi.stackexchange.com/questions/96560/…. Cheers. – tlfong01 49 mins ago    

add a comment

Know someone who

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.