Feature #573


Pair Button support (GPIO pin) + LED

Added by Hammel over 6 years ago. Updated about 6 years ago.

Target version:
Start date:
28 Jul 2017
Due date:
% Done:


Estimated time:
03 - Medium


Needs to include LED so we know we're in that mode.

Actions #1

Updated by Hammel over 6 years ago

  • Status changed from New to In Progress
  • Priority changed from Normal to Immediate
Actions #2

Updated by Hammel over 6 years ago

  • % Done changed from 0 to 20

I plugged in a push button today onto my GPIO pins and tested imgpio. It wouldn't work. I tried different pins, no go. After a while I realized I'd tried all the pins on the outside row, but none on the inside row. So I tried GPIO 4, which is pin 7. That worked. So at least some of my GPIO pins on this board are fried. No way to get them back, apparently. But I can at least test using GPIO 4. And since GPIO 4 does not have alternative functions - it's just GPIO, not PWM or SPI or I2C, etc - this should be a good choice for the Pair Button in general.

Switching code to use GPIO 4.

Actions #3

Updated by Hammel over 6 years ago

  • Subject changed from Pair Button support (GPIO pin) to Pair Button support (GPIO pin) + LED
  • % Done changed from 20 to 30

I added an LED to my setup off of GPIO 27. Works fine.

So now I need to push packages to my raspberry pi and test the boot mode switching. Packages to push:
  1. imwww - web interface
  2. piboxd - interface from imwww for system control
  3. imgpio - gpio pin read/write
  4. imcore - changes to dev platform for IronMan.
  5. monkey - web server

After install I need to validate that all package contents are in the correct locations and I didn't leave anything out of the packages (piboxd doesn't need this as it's package hasn't changed, only it's binary).

I will need to make sure I can connect to the Pi without the button first since I already have wifi configured. I should save that config (wpa_supplicant.conf and interfaces) so I can easily replace it.

On boot piboxd should start automatically.

I then need to see that pushing the pair button
  1. lights the LED and leaves it on at boot time (S40network)
  2. Pi boots into Pair Mode AP configuration (S40network)
  3. Web UI shows netconfig interface, not set-password interface.
Without pair button
  1. LED should be off
  2. Pi boots into wifi client config (that I already had configured and working)
  3. Web UI shows set-password interface.
Actions #4

Updated by Hammel over 6 years ago

Packages install cleanly and remove cleanly.
Pair Mode button works. If held, the LED is lit on reboot and the system runs the AP only configuration, allowing network configuration and reboot.
Basically, just about everything works.

What isn't working is bringing up the dongle in AP + client mode. I think this may be because the dongle doesn't support AP + managed mode. See RM #580-7.

I need to test other dongles to see if any of them support both modes and then retry the code currently on the Pi.

Actions #5

Updated by Hammel about 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 30 to 100

This is effectively complete with the implementation of the imgpio package. It still doesn't properly configure the monitor network because it doesn't enable the interface in network/interfaces and the uap0 doesn't come up with dhcp because the interface is not statically configured in network/interfaces.

Those bugs will be tracked separately. This issue can be closed.


Also available in: Atom PDF