Big picture: ultimately, what I’m trying to do is use my La Frite as a way to read serial logging data from my wiiu. But this post isn’t about that. I’m trying to verify the cable I bought actually works, and not having any luck. This post is about distinguishing between “you’re doing it wrong” and “the cable doesn’t work”.
La Frite 1GB board w/ 8GB eMMC
USB-to-serial cable with FT232RL, 3.3v logic levels. This cable is USB-A on one end and 3 1-pin connectors (for GND, TXD, and RXD) on the other. (amazon link: Amazon.com)
Steps I’ve taken:
add overlays=uartA to /boot/armbianEnv.txt to enable UART A (/dev/ttyAML6)
connect the cable as follows:
GND → pin 6
TXD → pin 10
RXD → pin 8
USB → one of the USB ports (I’ve tried both)
run minicom --baudrate 57600 --device /dev/ttyUSB0 -8 in one session
run minicom --baudrate 57600 --device /dev/ttyAML6 -8 in another session
After doing this, I expect to be able to type in one minicom session and see the text in the other. However, if I type “hello” and press enter, I see nothing.
My La Frite isn’t in-hand yet, but a couple small things to check (and forgive me if you already have):
Verify the name of the serial device you’re trying to use is the right one – dmesg and ls -alrt /dev/tty* and ls -alrt /dev/serial* might show something different than what you’re expecting.
Does the user you’re using have permissions to the devices?
Could you go one step simpler and do a pure loopback test (jumper RX directly to TX) to test one “side” at a time?
$ uname -a
Linux lafrite 6.0.13-meson64 #22.11.2 SMP PREEMPT Sun Dec 18 16:52:19 CET 2022 aarch64 aarch64 aarch64 GNU/Linux
I’m pretty confident the devices are correct. Here’s the dmesg output for the FTDI adapter from when the USB end of the cable is attached:
[ 330.376285] ftdi_sio 1-2:1.0: FTDI USB Serial Device converter detected
[ 330.376580] usb 1-2: Detected FT232RL
[ 330.378398] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0
For the other end, /dev/ttyAML6 didn’t exist until I adapted these steps:
I say “adapted” because I wasn’t able to use the libretech wiring tool to install the DTO. but Armbian provides (or at least seems to provide) the same functionality via the overlays= directive in armbianEnv.txt.
Also, permissions look good. Both devices are r/w for the dialout group and my armbian user belongs to that group.
Cool – glad to hear you had some successful progress.
Might be worth trying bringing that stty -F ... baudrate down if you haven’t already (did you match it to what you were using as the argument to minicom)?
I believe @librecomputer has mentioned elsewhere that Armbian support can be a little sketchy because they don’t have as much control over it. I’ve had good luck with the Libre-provided Ubuntu images, but since La Frite has lower specs (memory, especially), that might be a constraint. I think they’ve said that the full “desktop” image is too heavy.
The short version is: installing the libre ubuntu and using the libretech wiring tool did the trick.
I’ll post the long version for posterity and to help anyone else trying to install Ubuntu onto the eMMC via a Mac.
First, I tried flashing the Ubuntu image onto a USB drive and booting from it. This ended up being a pretty big waste of time, for a few reasons:
The USB I/O was really slow
The Libre images are pre-installed, which means there’s no simple way to transfer the Ubuntu install from the USB stick onto the eMMC
Part of my problem was the USB stick itself, a 128GB drive made by “onn”, which apparently draws too much power and caused error “read/64, -110” which is apparently Linux Kernel-ese for “too much power draw.”
Now, the technique I finally used to install the Ubuntu image only works if the La Frite firmware is up-to-date, so do that first.
format the USB stick for FAT32
download the image onto the stick
Plug the USB stick and a keyboard into the La Frite, and connect the HDMI to a display
Power on the La Frite, and as soon as the keyboard gets power start tapping the escape key.
From the boot menu, select the EtherealOS option. (note, some keyboards may act funny navigating the menu; if this happens for you, tap the CTRL key after pressing the arrow key)
Once ethearealOS is booted, run the following commands:
mount /dev/sda1 /media
dd if=/media/<ubuntu image filename> of=/dev/mmcblk0 bs=512
La Frite should start booting off eMMC and load Ubuntu.
After I did this and ran the commands in the document linked in the OP, my loopback test was successful.