Interface Definition
Overall Interface Definition
The LBA3588S offers a rich set of interfaces, detailed as follows:
Silkscreen | Device Node | Remarks |
---|---|---|
USB1 | Type-A USB3.0 host | |
USB2 | Type-A USB3.0 host | |
USB3 | Type-A USB3.0 host | |
PWR LED | Power indicator light | |
4G LED | 4G light 4G/5G Dialing | |
SYS LED | work1 | System light |
STA LED | work2 | STA light |
RS485 | /dev/ttyS9 | Serial port, default baud rate 9600 |
UART1 | /dev/ttyS4 | Serial port, default baud rate 9600 |
UART2 | /dev/ttyS6 | Serial port, default baud rate 9600 |
RS232_1 | /dev/ttysWK0 | |
RS232_2 | /dev/ttysWK1 | |
RS232_3 | /dev/ttysWK2 | |
RS232_4 | /dev/ttysWK3 | |
HDMI1 | card0-HDMI-A-1 | HDMI output, supports up to 4K@60fps |
Type-C | Can switch USB and DP signals | |
MIC | Input sound, record audio files | |
LINE | Play audio files | |
ETH0 | eth0 | Gigabit network card |
WIFI | wlan0 | 2.4/5GHz |
UART Usage
The serial port is a common communication interface used for serial communication with external devices. The LBA3588S provides multiple serial ports, each corresponding to different device nodes. Before using the serial port, ensure that the port is correctly connected and the baud rate and other parameters are set consistently.
The RS485 device file is /dev/ttyS9
. Run the following command on the development board device:
Send a string to the host:
echo "neardi RS485 test..." > /dev/ttyS9
The host’s serial terminal will receive the string “neardi RS485 test…”. The development board receives data:
Receive a string sent by the host:
cat /dev/ttyS0
Similarly, the device files for UART1 and UART2 are /dev/ttyS4
and /dev/ttyS6
.
RS232 Usage
The usage method for RS232 is similar to RS485, UART1, and UART2; just replace the device file accordingly.
HDMI/DP Explanation
The xrandx command can be used to check the current HDMI connection:
neardi@3588:~$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
HDMI-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1920x1080 60.00*+ 60.00 50.00 30.00 24.00
4096x2160 24.00
3840x2160 30.00 25.00 24.00
1920x1080i 60.00 50.00
1280x720 60.00 60.00 50.00 50.00 30.00 24.00
720x576 50.00 50.00
720x480 59.94 59.94 59.94
DP-1 disconnected (normal left inverted right x axis y axis)
Complete Node Definitions:
HDMI1:/sys/devices/platform/display-subsystem/drm/card0/card0-HDMI-A-1/
DP:/sys/devices/platform/display-subsystem/drm/card0/card0-DP-2/
ETH Explanation
You can check the IP address via the debug serial port, ssh, or adb, for example:
neardi@3588:~$ ifconfig -a
enP2p33s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.65 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::7df7:e74d:497e:345d prefixlen 64 scopeid 0x20<link>
ether 62:ea:fb:ca:95:e7 txqueuelen 1000 (Ethernet)
RX packets 2548 bytes 210938 (210.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 338 bytes 46899 (46.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 140 base 0xd000
Wi-Fi Explanation
Check the current Wi-Fi model with the following commands:
cat /sys/bus/sdio/devices/mmc2\:0001\:1/vendor
cat /sys/bus/sdio/devices/mmc2\:0001\:1/device
0x02d00xaae8 is AP6275S
,0x024c0xb852 is RTL8852
LED Explanation
Complete nodes:
SYS LED:cat /sys/devices/platform/leds/leds/work1/brightness
STA LED:cat /sys/devices/platform/leds/leds/work2/brightness
MIC Usage
Use the following command to record audio files, supporting formats such as wav, mp3, etc.
Record dual-channel 16-bit little-endian audio at a sampling rate of 48000Hz, then save it as a 001.wav file.
arecord -Dhw:0,0 -r48000 -f S16_LE -c2 > 001.wav
• -Dhw:0,0 specifies the recording device, 0,0 is card 0 device 0, which is the first sound card’s first device.
• -r48000 specifies the sampling rate in Hz, 48000 means 48000 samples per second.
• -f S16_LE specifies the sample format, S16_LE means signed 16-bit little-endian format, each sample point occupies 2 bytes, with the low byte first and the high byte last.
• -c2 specifies the number of channels, 2 means stereo.
• > 001.wav specifies the output file, > redirects standard output to a file, 001.wav is the file name, wav is the file format.
LINE Usage
Use the first sound card’s first device to play the 001.wav file.
aplay -D hw:0,0 001.wav
• -D hw:0,0 specifies the playback device, hw:0,0 is card 0 device 0, which is the first sound card’s first device.
• 001.wav specifies the audio file, wav is the file format, 001 is the file name.