Beaglebone UART2

Hello,

I am total newbie and do not know how to check if my UART connection is established succesfully. I did following according to do technical manual: (configured UART1 and UART2)

root@beaglebone:~# echo 20 > /sys/kernel/debug/omap_mux/uart1_rxd
root@beaglebone:~# cat /sys/kernel/debug/omap_mux/uart1_rxd
name: uart1_rxd.uart1_rxd (0x44e10980/0x980 = 0x0020), b NA, t NA
mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE0
signals: uart1_rxd | mmc1_sdwp | d_can1_tx | i2c1_sda | NA | pr1_uart0_rxd_mux1 | NA | gpio0_14

root@beaglebone:~# echo 0 > /sys/kernel/debug/omap_mux/uart1_txd

root@beaglebone:~# cat /sys/kernel/debug/omap_mux/uart1_txd
name: uart1_txd.uart1_txd (0x44e10984/0x984 = 0x0000), b NA, t NA
mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE0
signals: uart1_txd | mmc2_sdwp | d_can1_rx | i2c1_scl | NA | pr1_uart0_txd_mux1 | NA | gpio0_15

root@beaglebone:~# echo 1 > /sys/kernel/debug/omap_mux/spi0_d0
root@beaglebone:~# cat /sys/kernel/debug/omap_mux/spi0_d0
name: spi0_d0.uart2_txd (0x44e10954/0x954 = 0x0001), b NA, t NA
mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
signals: spi0_d0 | uart2_txd | i2c2_scl | NA | NA | NA | NA | gpio0_3

root@beaglebone:~# echo 21 > /sys/kernel/debug/omap_mux/spi0_sclk
root@beaglebone:~# cat /sys/kernel/debug/omap_mux/spi0_sclk
name: spi0_sclk.uart2_rxd (0x44e10950/0x950 = 0x0021), b NA, t NA
mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE1
signals: spi0_sclk | uart2_rxd | i2c2_sda | NA | NA | NA | NA | gpio0_2

Now how can I check if my connection is established? Could you please explain me step by step?

I am not using any other devices like Xbee. I want to write something with PC and see it on beaglebone’s terminal. I am going to use UART2. Am I required to write a C program for this purpose or after configuring UART pins, is there a change that I can directly use it with minicom, screen etc. (If your answer to my second option is yes, could you please explain me how to do it?)

Regards

I did a python script for this purpose:


ser = serial.Serial(port, baudRate)

ser2 = serial.Serial(port2, baudRate)

ser.write("Test")

print ser2.read(4)

ser.close();
ser2.close();

If the script ends the connection is right. Here is the file https://github.com/maxpowel/BeagleBone-Tools/blob/master/serial/test.py
Next you can easily convert this script to a C program (also configure the pin)

2012/6/18 zero <satanasxentius@gmail.com>

I am new to beagleboard. Can you pls help me in the initial settings of UART2 in expansion header. And also the links for header files.