05-29-2020, 05:43 PM
(05-29-2020, 04:38 PM)Arwen Wrote: If this does not answer your questions, please ask more here, so we can add them to the Wiki;
Wiki - Pinebook Pro - Privacy Switches
Well, to restate:
- My most pressing question is: How can I, a human, determine the current state of any given kill switch?
(I suspect that the current answer to the question is "you can't".)
- How can software running on the main CPU determine the current state of any given kill switch?
(I suspect that the current answer to the question is "you can't".)
- The wiki states that the "power" (kill switch) state is stored across reboots. Where is it stored?
As an example as to why this is relevant, all Chromebooks have a similar feature: a "developer mode" switch that disables the secure boot process, allowing unsigned software to be loaded onto them. In most commercially-available Chromebooks, this switch is virtualized, with the switch state stored in RAM backed by the laptop's primary battery. Thus, the switch state is persisted across reboots -- unless the laptop's battery is discharged completely. When that happens, the RAM is cleared, and the virtual devmode switch is effectively cleared with it.
- (I've pretty much managed to answer this one myself.) The keyboard's main connection is USB. (Incidentally, AIUI, all USB keyboards are USB 1.1, not USB 2.0.) 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?
I've found, on page 20 of the mainboard schematics, I'm pretty sure U23 (labeled as "SH68F83Q") is involved, because has connections labeled MIC_CUT, WIFI_CUT, and CAM_CUT. There's also an entry here https://wiki.pine64.org/index.php/Pinebo...eripherals under "Keyboard Information" to a "Sinowealth SH68F83 [no Q] Datasheet". This link is dead, it goes to a blank page.
I'm guessing that this might be what the keyboard is physically wired into; I've seen that 'R' and 'C' column before, but on a much smaller scale (3-by-4). Is that accurate?
- Where's the source code and build instructions for the keyboard firmware?
- CAM_CUT goes to the "EN" pin on what looks like a voltage regulator; presumably, when this pin is low, no power is supplied to the camera.
- MIC_CUT turns on or off a BPJ (Q15) that, when turned on, connects MIC_IN1P to VCC_MICBIAS via a 2.2K resistor.
My analog circuitry isn't very strong, but it seems that this works by saturating the mic input to maximum possible volume, essentially "drowning out" any input from the mic itself.
- WIFI_CUT appears to work by forcing low WL_REG_ON on U21 (labeled AP6255). From the datasheet:
> WL_REG_ON: Used by the PMU to power up or power down the internal regulators used by the WLAN section. When this pin is high, the regulators are enabled and the WLAN section is out of reset. When this pin is low the WLAN section is in reset.
- 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.