PinePhone UART
#1
How would I connect to the PinePhone's serial console from linux?  I have the USB to headphone jack converter, and killswitch 6 is flipped off, but I'm a bit lost on where to go from there.
  Reply
#2
(02-13-2020, 06:59 PM)bobbbob Wrote: How would I connect to the PinePhone's serial console from linux? I have the USB to headphone jack converter, and killswitch 6 is flipped off, but I'm a bit lost on where to go from there.

Personally, I use minicom, a pretty easy to use serial communication program. The steps I went through are as follows.
  1. Install minicom. On Debian it looks like this:

    Code:
    sudo apt install minicom

    If you're on another distro it should be a very similar command

  2. Add your user to the dialout group
    This step is so that you have access to the serial console without root, run
    Code:
    sudo usermod -a -G dialout $USER
    Then logout and log back in for this to take effect

  3. Plug in your serial cable

    Plug in both ends and then run
    Code:
    sudo dmesg
    it should say something similar to
    Code:
    ch341-uart converter now attached to ttyUSB0
    near the bottom of the output. This means that the adapter was recognized and assigned to a tty. pay attention to the ttyUSB0 part, you use it next.

  4. Start minicom
    Start minicom with
    Code:
    minicom -s -D /dev/ttyUSBx
    but replace the x with whatever you got in the last step. (if you got 'ttyUSB0' then enter that, 'ttyUSB1' enter that etc...)
    You should be greeted with minicom's main menu. From here navigate to 'Serial port setup' and hit enter. Next press E and make sure that you set the speed to 115200, parity to none, and data to 8. Once that's set, hit enter to save it and then change 'Hardware Flow Control' to No. Now you can leave that menu and go to 'Exit'. It should take you to the terminal screen that you'll use to interact with the adapter.

  5. Enjoy!
    Now would be a good time to turn on the phone and you should see a bunch of text come up in minicom, that's the pinephone's boot process!. Depending on what OS you have installed (ie postmarketOS) it may drop you into a login screen where you can login and get access to a shell on the phone.


If any of this was confusing or isn't working let me know and I'll try my best to help you out.
  Reply
#3
You'll need a serial terminal application such as minicom, cutecom, gkermit, gtkterm etc. to interact with it. Connect to whatever the usb serial device appears as - probably /dev/ttyACM0 or /dev/ttyUSB0. Many of the USB serial devices auto-sense the connection parameters, but you might need to enter them manually. Mine should arrive in a few hours so I might be able to offer more detail after that if you're still having trouble.

Edit: connection details in the postmarketOS wiki
  Reply
#4
if that is the same infamous adapter as for Pinebook Pro, then don't use it! it has wrong voltage (5V instead of 3.3), look in the PBP forum for details.
  Reply
#5
I could not get it to work at all. Not sure i have the right ttl levels. This is kinda goofy, as rs-232c is +-18v, bastardized down to +-12v on a pc. You can generally get away with +-5v on a short cable. Now I'm thinking this thing might be +3-0v straight ttl. Debating getting the o-scope from the attic, but I'm lazy. I've got an rpi cable, I should prolly put a meter on it, at least..

Finally, when the dip is thrown for serial, and I had a sim in the wifi refused to work. As it is the wifi is flakey, the usb-c will not take a kb, and I'm not up for much on the soft kb's, my fingy's are fat. It's all pretty close, we may just need to be patient while the various hardware drivers are cleaned up. I use ckermit on the linboxen for this type stuff. Nice and easy to send files old school.
  Reply
#6
(02-13-2020, 09:54 PM)hnaguski Wrote: snip

Yep, this worked perfectly. Thanks!

(02-13-2020, 11:37 PM)z4v4l Wrote: if that is the same infamous adapter as for Pinebook Pro, then don't use it! it has wrong voltage (5V instead of 3.3), look in the PBP forum for details.

I'm not using the one from the store, I used one from Amazon. In case someone wants to know which one, it's this . I hooked some wires from it to this.
  Reply
#7
(02-14-2020, 12:40 AM)bobbbob Wrote: Yep, this worked perfectly. Thanks!

Great, good luck in your endeavors!
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Error in the spec of the pinephone someGermanGuy 1 375 02-18-2020, 03:29 PM
Last Post: dukla2000
  No IMEI for Braveheart Pinephone? curtvaughan 4 329 02-15-2020, 09:23 AM
Last Post: curtvaughan
  Can the pinephone be powered without a battery? stragulus 6 241 02-13-2020, 06:06 PM
Last Post: stragulus
  my pinephone battery is dead :/ emptyfortress 3 207 02-12-2020, 08:37 PM
Last Post: emptyfortress
  Is the PinePhone board open source? jacobgadikian 1 167 02-11-2020, 05:41 AM
Last Post: dukla2000
Lightbulb [Solved][BraveHeart] PinePhone Failed Headphone Test MrArca9 4 268 02-11-2020, 02:30 AM
Last Post: bcnaz
  PinePhone open h/w buzz Dmytro 1 274 01-25-2020, 11:59 AM
Last Post: z4v4l
  PinePhone GPS ? PhiletJosie 14 1,556 01-02-2020, 02:48 PM
Last Post: MartijnBraam
  PinePhone sample images? lispy 3 546 11-16-2019, 05:03 AM
Last Post: pawlinski
  PinePhone wireless charging? soyrunner 9 630 11-04-2019, 08:38 PM
Last Post: vinnie

Forum Jump:


Users browsing this thread: 1 Guest(s)