Feature #573

Pair Button support (GPIO pin) + LED

Added by Hammel 5 months ago. Updated 4 months ago.

Status:In ProgressStart date:28 Jul 2017
Priority:ImmediateDue date:
Assignee:Hammel% Done:

30%

Category:Hardware
Target version:Iron Man - 002 - MVP
Severity:03 - Medium

Description

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

Associated revisions

Revision 72f8b9f3
Added by Hammel 4 months ago

RM #573: Add simple tests to check GPIO pins.

Revision 72f8b9f3
Added by Hammel 4 months ago

RM #573: Add simple tests to check GPIO pins.

Revision c74c9a09
Added by Hammel 4 months ago

RM #573: Add -DDEBUG so debug will be enabled in the binary.

Revision c74c9a09
Added by Hammel 4 months ago

RM #573: Add -DDEBUG so debug will be enabled in the binary.

Revision 97017b24
Added by Hammel 4 months ago

RM #573: Add -d option to disable a pin manually.
Don't disable a pin after it has been written to. That allows an LED to stay lit after imgpio exits.
Initialize pin setting so we can validate it's use.
Validate -d as one of possible required arguments.
Support up to 30 pins, which is more GPIOs than the Raspberry Pi has, I think.

Revision 97017b24
Added by Hammel 4 months ago

RM #573: Add -d option to disable a pin manually.
Don't disable a pin after it has been written to. That allows an LED to stay lit after imgpio exits.
Initialize pin setting so we can validate it's use.
Validate -d as one of possible required arguments.
Support up to 30 pins, which is more GPIOs than the Raspberry Pi has, I think.

Revision 42eb16a4
Added by Hammel 4 months ago

RM #573: Make sure we start default AP on wlan0.
Make path to imgpio a variable and use it throughout.
Disable LED after writing 0 to it.
GPIO for pair button is low when active, not high.
Add note about setting channel for runtime AP based on client channel.

Revision 42eb16a4
Added by Hammel 4 months ago

RM #573: Make sure we start default AP on wlan0.
Make path to imgpio a variable and use it throughout.
Disable LED after writing 0 to it.
GPIO for pair button is low when active, not high.
Add note about setting channel for runtime AP based on client channel.

Revision 63fedc2a
Added by Hammel 4 months ago

RM #573: Set GPIO numbers based on hardware experiments for LED and pair button. Add comments about physical pins.

Revision 63fedc2a
Added by Hammel 4 months ago

RM #573: Set GPIO numbers based on hardware experiments for LED and pair button. Add comments about physical pins.

Revision 9a1a243c
Added by Hammel 4 months ago

RM #573: Use wlan0 for default AP network.

Revision 9a1a243c
Added by Hammel 4 months ago

RM #573: Use wlan0 for default AP network.

Revision 236cf3aa
Added by Hammel 4 months ago

RM #573: Use wlan0 for default AP network.

Revision 236cf3aa
Added by Hammel 4 months ago

RM #573: Use wlan0 for default AP network.

Revision 1f20c754
Added by Hammel 4 months ago

RM #573: Save copies of original files this package will replace, and restore them when the package is removed.

Revision 1f20c754
Added by Hammel 4 months ago

RM #573: Save copies of original files this package will replace, and restore them when the package is removed.

History

#1 Updated by Hammel 5 months ago

  • Status changed from New to In Progress
  • Priority changed from Normal to Immediate

#2 Updated by Hammel 4 months 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.

#3 Updated by Hammel 4 months 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.

#4 Updated by Hammel 4 months 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.

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

Also available in: Atom PDF