[LEDE-DEV] multi-function buttons

Mathias Kresin m at kresin.me
Mon Feb 20 00:11:43 PST 2017

19.02.2017 14:31, Piotr Dymacz:
  > This is more like offtopic, but there is another one problem with
  > similar devices. Lets forget now about "Wi-Fi enabled or not enabled
  > by default" issue and assume we have a device which:
  > - doesn't have Ethernet interface
  > - serial access is not possible or very difficult to get
  > - has _only one button_, configured as rfkill (because there must be
  > some way to enable Wi-Fi after the flash)
  > - is or could be supported in LEDE
  > What will happen if the user breaks wireless configuration (it
  > happens, I know it from experience) in this kind of device? Maybe,
  > just by an accident, (s)he configured channel "17" instead of "7",
  > saved changes, restarted Wi-Fi and... ended up with a nice
  > paperweight.
  > In this kind of situation, the "rfkill" button is useless (wireless
  > configuration is broken, Wi-Fi can't be started). Failsafe mode can be
  > enabled but is not accessible. AFAIK, there is no way to perform
  > "firstboot"/"factory reset" in this situation.
  > Of course, this is more like an extreme case (no Ethernet, no serial
  > access, only one button), but IMHO it shows that if we want to support
  > devices without Ethernet interface, we should make failsafe mode
  > working for them.

Hey Pepe,

let me start a new thread regarding this issues.

After I pushed 
https://git.lede-project.org/bcfbeae79f799cf1087d692e4869589eb20d2080 we 
had a discussion in IRC because what I've done in the commit wasn't that 

I've changed the linux,code of the buttons to RF_KILL/0xf7 to have this 
enable WLAN functionality. But the with that change the send keycode 
doesn't match any longer what is printed in the case. Means, a WPS 
button should send the KEY_WPS_BUTTON keycode, a Wifi button should send 
KEY_WLAN, a Wifi on/off button should send KEY_RFKILL and so on.

Jonas came up with the idea of interpreting the "wps" button press as 
"rfkill" in userspace instead of changing the meaning of the buttons in 
the dts file(s). John and Felix joined the discussion and we agreed that 
having something configurable in userspace for interpreting the keycodes 
would be a good idea. It can be extended to have timer based 
interpretations as well (10sec press do A, 20sec press do B and so on).

I know that John started to work on something related. But as usual, 
something more important came up the way.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3687 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170220/f7ac32fc/attachment.p7s>

More information about the Lede-dev mailing list