Enable UART2. Or use UART0
-
As the UART0 seems to be occupied by the operating system I tried to enable UART2 and followed this post but it just doesn't works for me.
Is there anything I might be missing?
Regards,
Radek
-
@Radek said in Enable UART2. Or use UART0:
I tried to enable UART2 and followed this post but it just doesn't works for me.
What did you do/try?
-
I executed this command:
@György-Farkas said in enable uart2 is posiible on Omega2+??:
After this command
omega2-ctrl gpiomux set spi_s pwm01_uart2
Omega2(+)'s UART2 (ttyS2) works well using GPIO16 as TX2 and GPIO17 as RX2 (8N1 default BAUD rate 9600 bps).# Omega2+ FW v0.2.2 b201 root@Omega-5BE1:~# omega2-ctrl gpiomux set spi_s pwm01_uart2 set gpiomux spi_s -> pwm01_uart2 root@Omega-5BE1:~# omega2-ctrl gpiomux get Group i2c - [i2c] gpio Group uart0 - [uart] gpio Group uart1 - [uart] gpio pwm01 Group uart2 - [uart] gpio pwm23 Group pwm0 - pwm [gpio] Group pwm1 - pwm [gpio] Group refclk - refclk [gpio] Group spi_s - spi_s gpio [pwm01_uart2] Group spi_cs1 - [spi_cs1] gpio refclk Group i2s - i2s [gpio] pcm Group ephy - [ephy] gpio Group wled - wled [gpio]
Regards,
Radek
-
@Radek What was your next step?
-
Connected A9G modem to it and tried to communicate with it. As it didn't worked connected it to a USB/TTL adapter and tried to establish connection between my Mac and Omega2
-
@Radek Try to do as it is written here: https://docs.onion.io/omega2-docs/uart1.html. Only instead of /dev/ttyS1 write /dev/ ttyS2
-
@Radek
Proof of Concept (unfortunately I don't have an A9G board)Serial communucation between
- a desktop PC Ubuntu 18.04.4 LTS with an FTDI232 USB-to-Serial module
communication program: picocom -b 9600 /dev/ttyUSB0 (or picocom -b 115200 /dev/ttyUSB0 - 115200 on both device of course) - and an Omega2+ FW v0.3.2 b240 UART2 (/dev/ttyS2)
root@Omega-5BE1:~# omega2-ctrl gpiomux set spi_s pwm01_uart2 set gpiomux spi_s -> pwm01_uart2 root@Omega-5BE1:~# omega2-ctrl gpiomux get Group i2c - [i2c] gpio Group uart0 - [uart] gpio Group uart1 - [uart] gpio pwm01 Group uart2 - [uart] gpio pwm23 Group pwm0 - pwm [gpio] Group pwm1 - pwm [gpio] Group refclk - refclk [gpio] Group spi_s - spi_s gpio [pwm01_uart2] Group spi_cs1 - [spi_cs1] gpio refclk Group i2s - i2s [gpio] pcm Group ephy - [ephy] gpio Group wled - wled [gpio]
communication program: picocom -b 9600 /dev/ttyS2 (or picocom -b 115200 /dev/ttyS2 - 115200 on both device of course)
- HW connections: FTDI RX to Omega2 GPIO16 (TX2), FTDI TX to Omega2 GPIO17 (RX2), GND to GND
It seems this serial communication is working well.
- a desktop PC Ubuntu 18.04.4 LTS with an FTDI232 USB-to-Serial module
-
@György-Farkas said in Enable UART2. Or use UART0:
picocom -b 9600 /dev/ttyS2
Ok, I followed your advice and it seems to be working. At least between my Mac and Omega.
I am not getting why I cannot communicate with the A9G from Omega when it works from my Mac.It's weird
Regards,
Radek
-
@Radek How do you use the A9G board with Omega2's UART1 (/dev/ttyS1)? Is that config working well?
-
Nope. It doesn't work with ttyS1 either. This is really weird.
-
@Marko-Lukat said in How can I pass one GPIO pin to an other?:
Pin 16 and 17 (UART2) is connected AT_RX and AT_TX respectively. The UART2 doesn't work by the way.
Let's take a step back. Just short pin 16/17 (jumper wire), start a terminal of your choice on /dev/ttyS2 (on the Omega), disable local echo and start typing. Do you see any response (i.e. remote echo)?
root@Omega-5BE1:~# picocom -b 9600 /dev/ttyS2 picocom v1.7 port is : /dev/ttyS2 flowcontrol : none baudrate is : 9600 parity is : none databits are : 8 escape is : C-a local echo is : no noinit is : no noreset is : no nolock is : no send_cmd is : sz -vv receive_cmd is : rz -vv imap is : omap is : emap is : crcrlf,delbs, Terminal ready Yes, when I short GPIO16 and GPIO17 (UART2) with a jumper wire then I can see what I type... :-)