• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug report: WIFI dongle stops when gpio_switch.gpio = 20

In my search for the correct pin numbers to be used by pilight on my RPi 1 B+, I found the following bug.
I try to read a digital input (from a smoke sensor), so I use gpio_switch.
My config.json is minimal for now to pinpoint this bug:
"devices": {
                "smoke": {
                        "protocol": [ "gpio_switch" ],
                        "id": [{
                                "gpio": -1
                        "state": "off"
no rules, only this one gui element, default settings, hardware with pins = -1, default registry, version 7.0.

When I change the gpio pin to 20 and reboot my RPi, everything looks normal until further in the boot sequence (I guess this by looking at the green blinking LED of the RPi) the blue LED of the WIFI dongle stops blinking. From then on I can no longer connect to my RPi and I had to remove the SD card to change the setting back to gpio pin -1 to be able to connect remotely over WIFI again. I did this twice to confirm it reproduced.

lsusb says about the WIFI dongle (when it is working Wink)
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter

and lshw says:
description: Wireless interface
physical id: 1
bus info: usb@1:1.4
logical name: wlan0
serial: 00:13:ef:20:0b:11
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=rtl8192cu ip= multicast=yes wireless=IEEE 802.11bg

Let me know if more info is needed.

Best regards,
I think gpio should have a positive value.
(10-03-2015, 11:23 AM)Niek Wrote: I think gpio should have a positive value.
Thank you for your intention to help. Unfortunately, I think your information is incorrect, since
  1. This bug report is about id 20, not -1
  2. -1 is a correct way to disable the pin. The documentation states "If you want to
    disable the sender or receiver pin, set it to -1."
Point 2 refers to the hardware configuration, not the devices. Devices shouldn't be able to set GPIO -1.
Sorry, apparently my title and description aren't clear enough.
Let's try again:
  • When using pin 20 for gpio_switch, my WIFI dongle stops
  • When using pin -1 for gpio_switch, my WIFI dongle keeps working (of course also no working solution, but just as test)

With this in mind, 20 appears to be an incorrect number, so the priority of this bug may be low (you should not use it). But still, I think an error message in /var/log/pilight.err would be better (apparently this error should also appear for -1, but is does not).
What about pin numbers between 1 and 19? Does the dongle still work?
(10-04-2015, 02:39 PM)pilino1234 Wrote: What about pin numbers between 1 and 19? Does the dongle still work?

Yes, it works correctly for pin numbers 7, 23 and 25 according to my tests.
I expect that it will work for pins 0...7, 10...16 and 21...29.
This is related to this bug report.
Does the same thing happen with a wiringPi script?
(10-10-2015, 08:38 AM)curlymo Wrote: Does the same thing happen with a wiringPi script?
Good idea, I will test that.

I have found that exactly the same happens when using protocol relay.
Hey, any news on that?

Possibly Related Threads...
Thread Author Replies Views Last Post
  433nano stops receiving robertkrause 62 11,682 01-13-2021, 11:15 AM
Last Post: Fagtreag
  433nano stops receiving with FHEM RichiG 1 619 03-27-2020, 07:36 PM
Last Post: curlymo
  ERROR: The Broadcom 2835 GPIO 0 is not set to output mode stuckinger 10 3,294 05-07-2019, 09:11 PM
Last Post: curlymo
  communication between main daemon and clientized daemon stops tomk 29 7,491 05-06-2019, 08:57 PM
Last Post: curlymo
  AdHoc network with 2 Raspberry and 2 GPIO transmitter not working webdandy 29 12,731 09-06-2017, 02:39 PM
Last Post: wseifert
  development, orangepi pc+, "no gpio-platform configured" Twain 1 3,032 06-01-2017, 05:51 PM
Last Post: curlymo
  Reset of GPIO ports / Detection of mobile phone NormBot 1 2,101 09-02-2016, 08:30 AM
Last Post: wo_rasp
Bug Bug report: double free or corruption (!prev) diman87 16 8,167 03-09-2016, 11:10 AM
Last Post: diman87
Bug Bug report: segmentation fault using rule with AFTER woutput 3 3,771 11-22-2015, 12:27 PM
Last Post: woutput
  invalid gpio range koos147 2 2,781 11-02-2015, 08:40 AM
Last Post: woutput

Forum Jump:

Browsing: 1 Guest(s)