How do the kill switches work?
#4
My most pressing question is: How can I, a human, determine the current state of any given kill switch?

"you can't", except, by pressing the button to toggle the state, at which point you'll need to do it again. other than, perhaps, in one or two cases, looking at dmesg or poking the right sysfs bits to see if the device is still present or missing.

How can software running on the main CPU determine the current state of any given kill switch?

Generally, "you can't", although wifi and camera would probably appear and disappear, so there is that possibility. The caveat being the wifi driver doesn't like the device disconnect, so may need some poking to get it to properly reflect the device absence/presence.

The wiki states that the "power" (kill switch) state is stored across reboots.  Where is it stored?  

In the EEPROM attached to the keyboard's MCU.

Since USB has no facility for privacy switches, it must also have a secondary connection to signal that a kill switch should be enabled/disabled.  Where on the schematics can I find this connection?

Yup, that would be it. . The SH68F83 is a low speed (i.e. USB 1.1) microcontroller, which being used as the interface between the keyboard matrix and the PBP.

Where's the source code and build instructions for the keyboard firmware?

The source for the keyboard firmware is not available - the manufacturer would not release that, but did give pine64 updated binaries to overcome the initial issues with keyboard responsiveness. There have been efforts to reverse engineer it, and one such is this work by Jack Humbert (check out the firmware/src folder). You'll also find that elusive datasheet in the repo. Wink

One thing in particular is that if you turn off the kill switch, wlan0 doesn't disappear; however, if the laptop is powered on with the kill switch already inactive, wlan0 never appears in the first place.  I'd like to better understand why this is.

Probably related the WiFi driver not understanding how to cope with the WiFi module just suddenly dropping in or out of existence, rather than via some software instruction. That's why these commands are needed to kick it back into life if you turn it on (probably just the unbind command would refresh things if you turn it off, meaning you'd then only have to bind it when turning it back on).

Code:
$ echo 'fe310000.dwmmc' | sudo tee /sys/bus/platform/drivers/dwmmc_rockchip/unbind
$ echo 'fe310000.dwmmc' | sudo tee /sys/bus/platform/drivers/dwmmc_rockchip/bind


Messages In This Thread
How do the kill switches work? - by Stevie-O - 05-29-2020, 04:28 PM
RE: How do the kill switches work? - by Arwen - 05-29-2020, 04:38 PM
RE: How do the kill switches work? - by Stevie-O - 05-29-2020, 05:43 PM
RE: How do the kill switches work? - by pfeerick - 05-29-2020, 10:12 PM
RE: How do the kill switches work? - by Arwen - 05-30-2020, 03:21 PM
RE: How do the kill switches work? - by Stevie-O - 05-31-2020, 09:02 PM
RE: How do the kill switches work? - by Arwen - 06-01-2020, 09:08 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Does latest Tow-Boot install/work correctly for everyone? tophneal 4 1,668 08-03-2023, 03:30 PM
Last Post: tophneal
  eMMC for Odroid C4 work in PBP? dieselnutjob 6 3,293 04-05-2022, 10:10 AM
Last Post: jiyong
  Forgot my Pinebook password. Booting from MIcroSD doesn't work. ksfoodforest 0 1,713 01-30-2021, 11:08 AM
Last Post: ksfoodforest
  Did I kill my PBP's board? overlisted 7 7,290 11-12-2020, 03:28 PM
Last Post: overlisted
  Soft restart doesn't work dgkPBP 9 8,456 09-19-2020, 09:40 AM
Last Post: wdt
  Privacy switches not persistent yawnoc 0 1,688 07-16-2020, 12:01 AM
Last Post: yawnoc
  Does Fastboot Devices tools work on Pinebook Pro? pinejolla 6 7,300 06-16-2020, 03:14 AM
Last Post: FeMike
  pinebook pro overheats and switches off when streaming leonidas 13 13,871 04-20-2020, 09:05 AM
Last Post: bcnaz
  Clarification on Privacy Kill Switches jabo 3 5,366 10-04-2019, 07:27 AM
Last Post: jabo

Forum Jump:


Users browsing this thread: 1 Guest(s)