• 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
#1
Bug 
Hi,

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:
Code:
"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:
*-network:0
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=192.168.2.203 multicast=yes wireless=IEEE 802.11bg

Let me know if more info is needed.

Best regards,
woutput
 
Reply
#2
I think gpio should have a positive value.
 
Reply
#3
(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."
 
Reply
#4
Point 2 refers to the hardware configuration, not the devices. Devices shouldn't be able to set GPIO -1.
 
Reply
#5
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).
 
Reply
#6
What about pin numbers between 1 and 19? Does the dongle still work?
 
Reply
#7
(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.
 
Reply
#8
Does the same thing happen with a wiringPi script?
 
Reply
#9
(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.
 
Reply
#10
Hey, any news on that?
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  ERROR: The Broadcom 2835 GPIO 0 is not set to output mode stuckinger 10 762 05-07-2019, 09:11 PM
Last Post: curlymo
  communication between main daemon and clientized daemon stops tomk 29 1,781 05-06-2019, 08:57 PM
Last Post: curlymo
  AdHoc network with 2 Raspberry and 2 GPIO transmitter not working webdandy 29 6,505 09-06-2017, 02:39 PM
Last Post: wseifert
  development, orangepi pc+, "no gpio-platform configured" Twain 1 2,198 06-01-2017, 05:51 PM
Last Post: curlymo
  Reset of GPIO ports / Detection of mobile phone NormBot 1 1,345 09-02-2016, 08:30 AM
Last Post: wo_rasp
Bug Bug report: double free or corruption (!prev) diman87 16 5,087 03-09-2016, 11:10 AM
Last Post: diman87
Bug Bug report: segmentation fault using rule with AFTER woutput 3 2,534 11-22-2015, 12:27 PM
Last Post: woutput
  invalid gpio range koos147 2 1,922 11-02-2015, 08:40 AM
Last Post: woutput
  GPIO for other application koos147 1 1,616 10-31-2015, 08:08 PM
Last Post: pilino1234
Bug Bug report: gpio_switch does not accept high pin numbers woutput 2 2,361 10-12-2015, 03:54 PM
Last Post: woutput

Forum Jump:


Browsing: 1 Guest(s)