Backstreet's back, alright!
- Edited
uli There are. Both the Linux console and the EB debug output are available on the serial port.
A question about this: is the data available via USB (UART over USB) or through the UART pins on the 40 pin connector? (Iβm talking about the Orange Pi side here).
I thought of trying UART over USB, but turns out I donβt have a single USB-A to USB-A cable at home (now that I think of it, maybe I can try with USB-C to USB-A, I have a few of those cables).
But I also have a few USB TTL adapters (with different chips, one I know it positively works, as I used it to program AVR chips). So I can connect with that and some dupont cables directly to the pins on the OPi.
Also: do I need to enable a debug mode in some way or will BE just output any errors to serial by default?
Thanks.
Dmian A question about this: is the data available via USB (UART over USB) or through the UART pins on the 40 pin connector? (Iβm talking about the Orange Pi side here).
My OPi has a dedicated 3-pin connector next to the Ethernet port for the serial console.
Dmian But I also have a few USB TTL adapters (with different chips, one I know it positively works, as I used it to program AVR chips). So I can connect with that
You can connect it if it's 3.3 volts. The ones I have are either 3.3V by default or are switchable.
Dmian Also: do I need to enable a debug mode in some way or will BE just output any errors to serial by default?
Thanks.
Nope, everything is spammed to the console by default.
Of course! The minute I connect serial, it al works as intended...
Stopping dropbear sshd: OK
Stopping network: OK
ROOT DEV /dev/mmcblk0
DATA PART /dev/mmcblk0p3
DATA PART NO 3
seedrng: can't remove file 'seed.credit': Read-only file system
Stopping klogd: OK
Stopping syslogd: OK
umount: /dev/mmcblk0p3 busy - remounted read-only
umount: devtmpfs busy - remounted read-only
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system reboot
Closing cell "orangepi0-inmate-basic"
Page pool usage after cell destruction: mem 55/1770, remap 5/131072
Shutting down hypervisor
Releasing CPU 2
Releasing CPU 1
Releasing CPU 0
Releasing CPU 3
[ 265.152687] reboot: Restarting system
U-Boot SPL 2021.10 (Oct 12 2023 - 17:18:09 +0200)
DRAM: 512 MiB
Trying to boot from MMC1
U-Boot 2021.10 (Oct 12 2023 - 17:18:09 +0200) Allwinner Technology
CPU: Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi Lite
DRAM: 512 MiB
MMC: mmc@1c0f000: 0, mmc@1c10000: 2
Loading Environment from FAT... OK
In: serial
Out: vidconsole
Err: vidconsole
Net: No ethernet found.
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
2239 bytes read in 8 ms (272.5 KiB/s)
## Executing script at 43100000
4097976 bytes read in 178 ms (22 MiB/s)
28877 bytes read in 7 ms (3.9 MiB/s)
Kernel image @ 0x42000000 [ 0x000000 - 0x3e87b8 ]
## Flattened Device Tree blob at 43000000
Booting using the fdt blob at 0x43000000
Using Device Tree in place at 43000000, end 4300a0cc
Starting kernel ...
[ 0.001923] /cpus/cpu@0 missing clock-frequency property
[ 0.001961] /cpus/cpu@1 missing clock-frequency property
[ 0.001990] /cpus/cpu@2 missing clock-frequency property
[ 0.002019] /cpus/cpu@3 missing clock-frequency property
Initializing Jailhouse hypervisor on CPU 1
Code location: 0xf0000040
Page pool usage after early setup: mem 37/1770, remap 0/131072
Initializing processors:
CPU 1... OK
CPU 0... OK
CPU 3... OK
CPU 2... OK
Initializing unit: irqchip
Initializing unit: PCI
Page pool usage after late setup: mem 54/1770, remap 5/131072
Activating hypervisor
Created cell "orangepi0-inmate-basic"
Page pool usage after cell creation: mem 67/1770, remap 5/131072
Cell "orangepi0-inmate-basic" can be loaded
Started cell "orangepi0-inmate-basic"
60000000 RAM limit
Booting!
BASIC mem at 0x49000000hdmi, mode info : clock 40000000 hdis 800 vdis 600
BASIC stack at 0x8000
dotclock: 40000kHz = 40000kHz: (24MHz * 20) / 3 / 4
BASIC mem at 0x49000000
freq 23861400 per usec 23
Ready!
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Populating /dev using udev:
Starting
hdmi, mode info : clock 148500000 hdis 1920 vdis 1080
dotclock: 148500kHz = 148500kHz: (24MHz * 99) / 8 / 2
Secondary boot
done
seedrng: can't remove file 'seed.credit': Read-only file system
ROOT DEV /dev/mmcblk0
DATA PART /dev/mmcblk0p3
DATA PART NO 3
Mounting data partition:
Starting network: OK
Starting dropbear sshd: OK
Thu Feb 10 11:01:20 UTC 2022
Welcome to Buildroot for the Orange Pi Lite
OrangePi_Lite login:
Well, at least I now have a tool to debug just in case.
- Edited
I tried a second time, and it stops here:
Stopping dropbear sshd: OK
Stopping network: OK
ROOT DEV /dev/mmcblk0
DATA PART /dev/mmcblk0p3
DATA PART NO 3
seedrng: can't remove file 'seed.credit': Read-only file system
Stopping klogd: OK
Stopping syslogd: OK
umount: /dev/mmcblk0p3 busy - remounted read-only
umount: devtmpfs busy - remounted read-only
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system reboot
Closing cell "orangepi0-inmate-basic"
Page pool usage after cell destruction: mem 55/1770, remap 5/131072
Shutting down hypervisor
Releasing CPU 2
Releasing CPU 3
Releasing CPU 1
Releasing CPU 0
[ 290.742713] reboot: Restarting system
U-Boot SPL 2021.10 (Oct 12 2023 - 17:18:09 +0200)
DRAM: 512 MiB
Trying to boot from MMC1
Nothing after that. This is the behaviour I've seen previously.
And a successful boot up:
U-Boot SPL 2021.10 (Oct 12 2023 - 17:18:09 +0200)
DRAM: 512 MiB
Trying to boot from MMC1
U-Boot 2021.10 (Oct 12 2023 - 17:18:09 +0200) Allwinner Technology
CPU: Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi Lite
DRAM: 512 MiB
MMC: mmc@1c0f000: 0, mmc@1c10000: 2
Loading Environment from FAT... OK
In: serial
Out: vidconsole
Err: vidconsole
Net: No ethernet found.
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
2239 bytes read in 8 ms (272.5 KiB/s)
## Executing script at 43100000
4097976 bytes read in 178 ms (22 MiB/s)
28877 bytes read in 7 ms (3.9 MiB/s)
Kernel image @ 0x42000000 [ 0x000000 - 0x3e87b8 ]
## Flattened Device Tree blob at 43000000
Booting using the fdt blob at 0x43000000
Using Device Tree in place at 43000000, end 4300a0cc
Starting kernel ...
[ 0.001920] /cpus/cpu@0 missing clock-frequency property
[ 0.001957] /cpus/cpu@1 missing clock-frequency property
[ 0.001986] /cpus/cpu@2 missing clock-frequency property
[ 0.002016] /cpus/cpu@3 missing clock-frequency property
Initializing Jailhouse hypervisor on CPU 0
Code location: 0xf0000040
Page pool usage after early setup: mem 37/1770, remap 0/131072
Initializing processors:
CPU 0... OK
CPU 1... OK
CPU 2... OK
CPU 3... OK
Initializing unit: irqchip
Initializing unit: PCI
Page pool usage after late setup: mem 54/1770, remap 5/131072
Activating hypervisor
Created cell "orangepi0-inmate-basic"
Page pool usage after cell creation: mem 67/1770, remap 5/131072
Cell "orangepi0-inmate-basic" can be loaded
Started cell "orangepi0-inmate-basic"
60000000 RAM limit
Booting!
hdmi, mode info : clock 40000000 hdis 800 vdis 600
BASIC mem at 0x49000000
BASIC stack at 0x8000
dotclock: 40000kHz = 40000kHz: (24MHz * 20) / 3 / 4
BASIC mem at 0x49000000
freq 23861940 per usec 23
Ready!
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Populating /dev using udev:
Starting
hdmi, mode info : clock 148500000 hdis 1920 vdis 1080
dotclock: 148500kHz = 148500kHz: (24MHz * 99) / 8 / 2
[CedarX SUNXI] VE version 0x1680 opened.
REGS pa: C880B000
MEMORY pa 80000000, page offset C0000000 size 16777216
Secondary boot
ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5180:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5703:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2666:(snd_pcm_open_noupdate) Unknown PCM default
cannot open ALSA audio device default (No such file or directory)
h264enc: invalid picture size
could not create encoder
closing alsa
done
seedrng: can't remove file 'seed.credit': Read-only file system
ROOT DEV /dev/mmcblk0
DATA PART /dev/mmcblk0p3
DATA PART NO 3
Mounting data partition:
Starting network: OK
Starting dropbear sshd: OK
Thu Feb 10 11:01:20 UTC 2022
Welcome to Buildroot for the Orange Pi Lite
OrangePi_Lite login:
But It gets stuck in Trying to boot from MMC1
most of the time I execute the BOOT
command.
I think most of you know how to do this, but just in case somebody else wants to access serial and don't know how to do it, here you have the steps:
You need a USB to TTL adapter (they're usually cheap, from AliExpress).
I used 2 different ones, both with good results:
This one uses the CP2102 chip.
And this one uses the FT232RL chip, and you can set up the voltage with the jumper (in the picture, 5V is selected, for the OPi, you need to set it to 3.3V).
And then you need 3 female-female Dupont cables. Use the ones with the individual pins, as you'll probably connect them to non continuous pins. They look like this:
The Orange Pi has 3 dedicated UART pins (TX, RX, GND). In my case, the OPi Lite has them by the USB connectors:
You need to connect TX to RX on the TTL adapter, RX to TX (so, basically, it's a crossed connection) and GND to GND. And nothing more.
I use CoolTerm as my app.
Select the adapter from the port, set the baud rate to 115200, Data Bits to 8, Parity to none, Stop Bits to 1 and no Flow control option checked.
After that, just click the "Connect" button, and if everything goes well, you'll see the info flowing from the serial communication. Cheers!
Dmian But It gets stuck in Trying to boot from MMC1 most of the time I execute the BOOT command.
Ouch. I have never seen that on an Orange Pi, but I have an R69 STB board that almost always fails to boot if a serial converter is attached. It works 100% fine if nothing is attached, or if I connect the converter after bootup.
That is, needless to say, extremely annoying for development. If you can come up with a solution, I'd like to hear about it.
uli I honestly have no idea how to solve it. It's not a huge problem, to be fair. The only problem is disconnecting and connecting power if I want to reset the machine. It may mechanically stress the connector a bit. But this board has so many quirks, that I'm not too fond of it. Don't worry too much about it. Since it can't be reproduced 100%, it's actually not a bug...
The latest build includes a fix that clears the comms area between the Linux helpers and Engine BASIC on boot. If it works, it should at least fix the issue with the spurious video files, possibly even the reboot problems.
Since I cannot reproduce either, I refrained from testing altogether. Tell me if it helps.
Dmian I've got one very similar to that. HDMI, VGA, composite, and BNC. I had an old cushioned lap type laptop thing that I mounted the monitor to and use a 12 volt 78Whr (I think) LiPo battery. The 12 volt side happily runs the monitor and the USB-A port runs the Pi.
uli You're missing the header files in /sd/sys/include, for whatever reason. On RX, you can delete the /sd/sys folder, and it will repopulate the SD card on boot.
Thank you for the previous help, uli! Sorry for the mega long delay. A couple of more hospital stays has put me a couple of months behind.
I just now downloaded the newest firmware, dated November 13th 2023. I am still receiving the compiler error when RUNning |playmod.bas. I do not think that I've tried it on a fresh card, however. There are three or four here that we cycle through, just sticking the microSD card in the reader, running Win32DiskImager on a previously used BASIC Engine card, pointing Win32DiskImager to the new firmware and letting it do its thing. If I don't have a new in the package card, I will zero one out and try again
I look forward to trying out the new release!
I randomly saw something about basic engine 'RX' online and said huh... is that new?!?? Stop by here and wow! Late to the party but excited to give it a try on an h3 board this weekend. Thanks for keeping the band together Uli