[RESOLVED] LattePanda Alpha RS232 and Linux

If you're having trouble with your LattePanda Alpha & Delta, here's the place to get help.
Forum rules
If you have not found a solution, post a new issue. To speed up the process please let us know:
- Have you tried the solutions listed above?
- What board are you using? Standard (2GB RAM/32GB eMMC) or Enhanced (4GB RAM/64GB eMMC)?
- Have you tried any other solutions?
- How long have you had your board for?
- When did you first boot your board?
- Did it work ok before the issue occurred or has the issue always been there?
- Use images and videos to help us understand the issue where possible

If you are seeking RMA:
- Please open a new topic rather than hijacking someone else's thread
- Mark RMA posts with [DEFECTIVE] + <helpful description of issue>. We can then approve/disapprove each request
- Completed RMA cases will be marked with [CLOSED]
You can find the RMA guide [here]

Resolved Issues
- If you manage to fix an issue, please share your solution for the good of the community. It could help someone else in future.
- If an issue is resolved the thread should be marked as [RESOLVED]. We can then sticky the thread to help people in future.
Post Reply
User avatar
hansdampf
Posts: 2
Joined: Wed Feb 27, 2019 9:46 pm

Wed Feb 27, 2019 10:07 pm

I am trying to use the RS232 interface on my LattePanda Alpha (Arch Linux installed).
The command

Code: Select all

sudo setserial -g /dev/ttyS*
shows

Code: Select all

/dev/ttyS0, UART: 16550A, Port: 0x0000, IRQ: 20
/dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
I guess that /dev/ttyS0 is the correct interface. Unfortunally no communication is possible using this device. I also checked /dev/ttyS1, /dev/ttyS2 and /dev/ttyS3. But nothing works...
Anyone has any experience using the RS232 on the Alpha?
Last edited by hansdampf on Thu Feb 28, 2019 7:16 pm, edited 1 time in total.

User avatar
ccs_hello
Posts: 746
Joined: Sat Oct 13, 2018 9:16 pm

Wed Feb 27, 2019 11:05 pm

Don't know how ArchLinux would detect/enumerate these serial ports. In Win10, the following is known...

USB-related:
1) ...
2) a USB 1.1 port (USB-serial) used by EXAR XR21V1410 (CDC-ACM driver aka built-in "driverless" driver), in Win10 it's detected as COM4
this is exposed on top-side of the RS232 connectors (Orange-colored dotted line block),
there is a proper RS232 driver ( -5.73V to +5.73V RS232 voltage level) on board
3) another USB port back-to-back connects to on-board Arduino Leonardo's USB port (latter emulates a COM port, detected by Win10 as COM3)
4) ...
5) ...
6) ...

Usable UARTs:
-- # 2) above
-- As well as exposed connection leads on E-key M.2 slot

Hope at least it can provide some general ideas.

User avatar
bmegli
Posts: 11
Joined: Mon Jun 11, 2018 10:32 am

Thu Feb 28, 2019 7:28 am

From https://www.lattepanda.com/topic-f23t16 ... tml#p27772
bmegli wrote:
Sat Dec 08, 2018 11:47 pm
a USB 1.1 port (USB-serial) used by EXAR XR21V1410 (CDC-ACM driver aka built-in "driverless" driver), in Win10 it's detected as COM4
this is exposed on top-side of the RS232 connectors (Orange-colored dotted line block),
there is a proper RS232 driver ( -5.73V to +5.73V RS232 voltage level) on board
On Linux RS232 is reachable through /dev/ttyXRUSB0

To test connect TXD with RXD and you should see what you type after

Code: Select all

sudo picocom -b 115200 /dev/ttyXRUSB0
The above is from Ubuntu 18.04 (/dev/ttyXRUSB0).

I confirm that it works under Linux, I am using it to control several motors (TTL level, through MAX232 kind voltage converter).

I don't have my LPA at hand, later I can supply more info.

User avatar
bmegli
Posts: 11
Joined: Mon Jun 11, 2018 10:32 am

Thu Feb 28, 2019 5:30 pm

Code: Select all

lsusb

Bus 002 Device 002: ID 8086:0b07 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 2341:8036 Arduino SA Leonardo (CDC ACM, HID)
Bus 001 Device 003: ID 04e2:1410 Exar Corp. XR21V1410 USB-UART IC
Bus 001 Device 004: ID 8087:0a2a Intel Corp. 
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
What you are interested in is:

Code: Select all

Bus 001 Device 003: ID 04e2:1410 Exar Corp. XR21V1410 USB-UART IC

Code: Select all

sudo setserial -g /dev/ttyX*
/dev/ttyXRUSB0, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency
Kind regards

User avatar
hansdampf
Posts: 2
Joined: Wed Feb 27, 2019 9:46 pm

Thu Feb 28, 2019 7:15 pm

Thanks for your help.
I did't expect, that the internal RS232 is an USB port.

The actual port on Arch Linux is: /dev/ttyACM0

Post Reply