linuxboot / heads-wiki

Documentation for the Heads firmware project
85 stars 44 forks source link

Document CDC tethering support #149

Open tlaurion opened 5 months ago

tlaurion commented 5 months ago

@tlaurion @daringer NS70 (which is the same board as the ns50) tests : ✔️ heads upgrade to this zip ✔️ OEM factory reset ✔️ reset TPM ✔️ refresh TOTP/HOTP ❌ network-init-recovery (no internet interface detected) (Ethernet cable connected)

@alexgithublab not sure what this means. The instructions on screen have been followed? Connect phone when requested (phone in host mode needs to detect data not just power, requiring heads tethering drivers to be loaded prior of phone possibly permitting to activate USB network tethering, and then heads setups tethering against phone). If not, the behavior you see is normal?

Different behavior then nv41?

@tlaurion

I'm using a Pixel 5 with GrapheneOS and I'm not able to get tethering network working on heads. Hotspot is turn on the phone and I tried to only connect it and then do network-init-recovery and I also tried to enable the USB network sharing but the result is the same. Otherwise the script behavior is okay.

What this unfortunately means for the Pixel 5, which is EOL from Google but in extended support under GrapheneOS, is as said in the warning when enabling tethering, that RNDIS (Microsoft tethering technology) enables tethering on those phones, not CDC. If CDC was enabling tethering, then tethering would work following on screen instructions there. RNDIS is not supported.

I tested on Pixel 4a 5G and Pixel 6a, which both supports CDC tethering, and where, generally, USB-C snapdragon platform based SoC phones will support CDC for tethering. Unfortunately, there is not really good documentation on which phone supports CDC for tethering, so it's trial and error, where laptops having an Ethernet port can fallback to it to have on-demand connectivity. I also gathered a quick table under
https://github.com/linuxboot/heads/pull/1384#issuecomment-1957597727

I will open an issue on documenting tethering support to track this better. This is also one of the reason why it's not currently enabled through GUI and hidden down from launching a script, to easy time synchronisation mostly, for the moment

Tldr: the phones currently in Nitrokey shop (3a+ = Pixel 6+) should work. Librem phones work. For other LineageOS phones, experience will vary depending on what tethering technology is enforced. For Replicant, I highly doubt anything other then RNDIS is supported there, which heads won't include for discussed reasons (including security implications) on merged PR. We could add RNDIS support if there is push for it, but it would come with a big fat warning.

iPhones won't be supported since support requires additional proprietary tooling and extended kernel modules as well which older devices won't have space for.

Originally posted by @tlaurion in https://github.com/linuxboot/heads/pull/1640#issuecomment-2067730776