keyboard and usb-c
#11
Big Grintoday, on arch phosh, after the updates of the kernel, phoc etc, the keyboard works and if we cut the charge of the pinephone by the battery of the keyboard, then the usb-c port works normally (eth0, usb stick etc), beautiful and congratulations to all for all your efforts so that we can phone under linux without being tracked. a special thanks to dantcnix!
  Reply
#12
It seems that when the keyboard is connected and supplying power the USB C port on the phone should sink power but also act as USB host...

So I wonder:
Is there any way to switch the USB C between sink and source modes from user space?
Is there any way to switch between USB host and device mode from user space?
  Reply
#13
On postmarketOS, when the keyboard is not attached, the USB-C hub obviously works well with the phone (peripherals + HDMI), but only when external power is fed into the hub. This restriction is probably imposed by the OS.

When the keyboard is attached, I never tried the hub in the phone's USB connector (there's waaay too much ambiguity everyhwere I've read), but connecting the hub to the keyboard's USB connector does not work at all. Even if the keyboard is providing power (I pressed its button to start charging the phone).

I'm assuming the following should work, but I've never tried: to connect the hub to the phone's port, without feeding external power into the hub, but enabling power from the keyboard alone. That's because the keyboard battery is wired directly to the phone's USB power line, so the hub will act as if it is powered from the phone, and the phone will not send power to the port at all, relying on the keyboard only?

It's almost as if the OS is already smart enough to make this work, it looks like it, but I'm too worried to try. Would this make sense?
  Reply
#14
Thanks a lot for this precious information. I sounds a bit Voodoo. I suppose we need a scientist to investigate all the details. We are ready to sacrify us for such research project. If what comes out is a working usb-c to HDMI device with keyboard and mouse, it is worth to start an investigation.

In the store it says it works with PostmarkedOS. Does the desktop (posh, gnome) also matter?
  Reply
#15
Quote:In the store it says it works with PostmarkedOS. Does the desktop (posh, gnome) also matter?

Probably doesn't matter. At least the "keyboard" part shouldn't, there's a kernel driver for it, so the UI should not know about the keyboard.

However, the powerbank aspect of it is more ambiguous. On postmarketOS it behaves properly (charging on/off works), but I can't seem to find the device files that are supposed to represent the powerbank within. The keyboard has a chip that controls charging, which should present itself as a `power_supply` device. But it doesn't show up on my phone.
  Reply
#16
Well good to know. Mayby the keyboard has an "identity crysis" and does not know who it really is, and causes trouble in that way and distrubs the HDMI connection. We have also read that it is worth to plug in and then to unplug the usb-c adapter several times. One user reported that he got the HDMI adapter to work in that way.
  Reply
#17
(06-11-2022, 04:00 PM)Peter Gamma Wrote: Well good to know. Mayby the keyboard has an "identity crysis" and does not know who it really is, and causes trouble in that way and distrubs the HDMI connection. We have also read that it is worth to plug in and then to unplug the usb-c adapter several times. One user reported that he got the HDMI adapter to work in that way.

Will definitely try this!
  Reply
#18
Hi all,

Hesitating to post to a resolved thread, but noticed talk of pogo pins and plugging power sources into each other and what not. A while back, a few of us went on a deep dive about how the pogo pins work and how they interact with the USB C port.

Attached a pic: collage of relevant parts of the mainboard and the USB C board. Lots to unpack there... but it shows how all of this connects and where things are controlled. Yup, there are different aspects controlled by both software and hardware. Yup, if you plug the wrong things into each other, it is bad.

The thread with long-winded discussion for anyone curious here. That's where the pic came from

Cheers


Attached Files Thumbnail(s)
   
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  pinephone keyboard + dock question tuxcall 7 2,586 02-05-2024, 03:17 PM
Last Post: wigan
  PinePhone Keyboard KJ6OHG 11 7,810 08-23-2023, 03:25 AM
Last Post: Kali
  PinePhone keyboard layout with manjaro plasma daemonbsd 0 923 03-02-2023, 05:01 AM
Last Post: daemonbsd
  Pine phone USB keyboard connection CleanEnergyCleanEnvironment 1 1,094 02-20-2023, 12:14 AM
Last Post: Kevin Kofler
  Mobian and Keyboard tim.senecal 17 11,338 08-10-2022, 02:25 PM
Last Post: MNtinkerer
  Keyboard support broken in Mobian? MacarioMorenoUK 2 1,715 06-08-2022, 02:34 AM
Last Post: MacarioMorenoUK
  Can't find "-" on the keyboard gilwood 1 1,139 06-05-2022, 12:57 PM
Last Post: tecdroid
  adding some keys to pp keyboard case, pageup, pagedown, f11, f12, maybe others zetabeta 1 1,265 04-30-2022, 08:18 PM
Last Post: TRS-80
  pine64 keyboard pogo 'no-go' pins --- 3 2,442 04-29-2022, 04:59 AM
Last Post: Humid Stylus
  No underscore on pinephone keyboard gilwood 3 2,296 02-25-2022, 07:43 AM
Last Post: gilwood

Forum Jump:


Users browsing this thread: 1 Guest(s)