Future models will have an onboard TTL to USB convertor, just like the OpenWrt One.
Hopefully that will b a ftdi converter.
Connecting the usb side of ch340 or alike to another BPI board (R64 in my case) it is prone to giving errors. In my experience, only the ftdi (232RL) converter is really stable when connecting the usb side to a development board or using it with some (probably cheaper) usb hub.
When the is no options to choose which converter to use, I hope the built-in converter will be a very stable one.
The only issue I have with CP2104 is when I’m connecting in the same USB 3.0 HUB CP2104 and a USB3.1 SD card Reader.
Because I have also my mouse connected in the same Hub, some times there is a high current demand for SD Card reader and the CP2104 is starting to give errors.
When I reduced the number of devices in hub, this issue disappeared.
So is not CP2104 related issue, but more about USB Hub issue.
In rest I’m using on BPi-R4 without any issues.
I’m using my BPI-R64 to connect to the debugging console of my other development boards. These are the R3, R4, M7 and an AM3359-board.
So through ssh I can connect to the serial debugging console of any board. This is very usefull for testing (hardware) offloading network.
I’ve tried all sorts of different converters, but, when using (multiple) converters connected to the R64’s usb port, there is only one 1 stable, which is the FTDI 232 (RL)
Did you try CP2102N should work better than CP2104 …
we use HT42B534-2 (CDC-ACM, no driver required)
I would suggest testing (multiple) with the usb side connected to another mediatek devboard.
Some converters (like ch340) are not stable under this condition.
I’m using a FT232 USB To UART (TTL) Communication Module, USB-C Connector | FT232 USB UART Board (Type C), which is nice because it’s very easy to mount.
This one is even smaller:
Hi @frank-w
I am using an hc05 that works fine (debian trixie) using the serial pins however moving them to UART0-TX & UART0-RX don’t get any response (although connected to the hc05)
are these pins live (UART0-TX & RX)?
… on openwrt just get garbled text using the serial ports …
Hi @rmandrad ,
Did you tried different serial port speeds?
On BPI-R4 i didn’t had any issues with such adapters.
yes … 9600, 38400, 57600 and 115200 as I said all works if use the normal serial pins but not the gpio UART0-TX & RX … I haven’t tried though the UART1-TXD and RXD
… actually just did the UART1 and the same issue
What do you expect on the other uart pins? There is no system service running on the other uart printing bootlog or allow login there. Have you done any configuration there?
I tested an uart logger on the bpi-r3 uart1 like this,bet needed to pass messages there and set speed in userspace
ok so understood - no configuration done … Is this done on the dts ? can i just copy the ttyS0 definition
i tried your bpi-r3 uart1 test but get and I/O error
In dts the uart is only enabled to have ttyS1 visible in userspace…the most config is done at userspace
so looking at the dts (openwrt)
mt7988a.dtsi
serial0: serial@11000000 {
compatible = "mediatek,mt7988-uart", "mediatek,mt6577-uart";
reg = <0 0x11000000 0 0x100>;
interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uart", "wakeup";
clocks = <&topckgen CLK_TOP_UART_SEL>,
<&infracfg CLK_INFRA_52M_UART0_CK>;
clock-names = "baud", "bus";
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins>;
status = "disabled";
};
serial@11000100 {
compatible = "mediatek,mt7988-uart", "mediatek,mt6577-uart";
reg = <0 0x11000100 0 0x100>;
interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uart", "wakeup";
clocks = <&topckgen CLK_TOP_UART_SEL>,
<&infracfg CLK_INFRA_52M_UART1_CK>;
clock-names = "baud", "bus";
status = "disabled";
};
serial@11000200 {
compatible = "mediatek,mt7988-uart", "mediatek,mt6577-uart";
reg = <0 0x11000200 0 0x100>;
interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "uart", "wakeup";
clocks = <&topckgen CLK_TOP_UART_SEL>,
<&infracfg CLK_INFRA_52M_UART2_CK>;
clock-names = "baud", "bus";
status = "disabled";
the bananapi-bpi-r4 dtsi only shows
&serial0 {
status = "okay";
};
dmesg | grep ttyS
[ 0.000000] Kernel command line: console=ttyS0,115200n1 pci=pcie_bus_perf root=/dev/fit0 rootwait
[ 0.084179] printk: legacy console [ttyS0] disabled
[ 0.104437] 11000000.serial: ttyS0 at MMIO 0x11000000 (irq = 99, base_baud = 2500000) is a ST16650V2
[ 0.104473] printk: legacy console [ttyS0] enabled
so does it mean to enable the other two I need to change the banana dtsi
to add the two other serials (1 & 2)?
Or otherwise how do I enable using userspace ?
/sys/firmware/devicetree/base/soc/serial@11000200 status shows disabled and I can’t echo an “okay” ! sorry for my ignorance on this only see a solution for this by changing the dts
Yes you must enable the serial1 via dts…but all other must be done in userspace