Move Serial Consolle from ttyS1 (USART0 X6 connector) to ttyS3 (USART2 X13 connector)

Hi,
I've made this change, but the serial consolle dont't work on the other serial:

- recompiled kernel and enabled ttyS4 ttyS5 (RXD4-TXD4 and RXD5-TXD5 RS232 of X11 connector) and they work;
- change ttyS1 to ttyS3 in the cmdline file of /boot folder;
- change ttyS1 to ttyS3 in the inittab file of /etc folder;

Is possible to swap the serial consolle from USART0 (ttyS1) to USART2 (ttyS3) or to USARTDBG (PB14 - PB15 of X11 CONNECTOR)?

Again is possible to use USARTDBG (PB14-PB15 of X11 connector) how standard rs232 for controll external rs232 device?

Many thanks in advance

Re: Move Serial Consolle from ttyS1 (USART0 X6 connector) to ...

It works out of the box for ttyS0 in the way you described. When using other serial ports - such as ttyS3 - it is necessary to add the port to /etc/securetty to be able to log in as root.

Re: Move Serial Consolle from ttyS1 (USART0 X6 connector) to ...

I've performed this steps:

1. recompiled kernel whit these modify:

- enabled ttyS4 and ttyS5 and it work correcltly
- changed the line

at91_set_serial_console(1); // consolle on ttyS1

with

at91_set_serial_console(3); // consolle on ttyS3

//======================== below the source code =============================
static void __init nanosg20_map_io(void)
{
/* Initialize processor: 18.432 MHz crystal */
at91sam9260_initialize(18432000);

/* DGBU on ttyS0. (Rx & Tx only) */
at91_register_uart(0, 0, 0);

/* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
| ATMEL_UART_DTR | ATMEL_UART_DSR
| ATMEL_UART_DCD | ATMEL_UART_RI);

/* USART1 on ttyS2 as RS485. (Rx, Tx) */
at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_RTS);

/* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */
at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);

/* USART4 on ttyS4. (Rx, Tx) */
at91_register_uart(AT91SAM9260_ID_US4, 4, 0);
/* USART5 on ttyS5. (Rx, Tx) */
at91_register_uart(AT91SAM9260_ID_US5, 5, 0);

/* set serial console to ttyS1 (ie, USART0) */
//at91_set_serial_console(1);

// ttyS3 (ie, USART2)
at91_set_serial_console(3);

/* enable RS232 drivers for USART0 and USART2 */
at91_set_GPIO_periph(AT91_PIN_PA25, 0);
at91_set_gpio_output(AT91_PIN_PA25, 0);
at91_set_GPIO_periph(AT91_PIN_PC3, 0);
at91_set_gpio_output(AT91_PIN_PC3, 0);
}

//========================== end source code ==============================

2. changed ttyS1 with ttyS3 in /boot/cmdline ==> console=ttyS3,115200 mmc_core.removable=0 root=/dev/mmcblk0p1 rootwait
3. changed ttyS1 with ttyS3 in /etc/inittab ==> S0:2345:respawn:/sbin/getty 115200 ttyS3

4. addedd ttyS3 in /etc/securetty ==>

# Standard serial ports
ttyS0
ttyS1
ttyS3

But when we start the board nanog20s with kermit connected from development pc to serial port on X13, the serial consolle don't shown any.

Can you help me please?

many thanks

Re: Move Serial Consolle from ttyS1 (USART0 X6 connector) to ...

Do the two ports (ttyS0 and ttyS3) work at all (not as console)?

Re: Move Serial Consolle from ttyS1 (USART0 X6 connector) to ...

yes ttyS0 and ttyS3 work as normal port, but now if I want to redirect the consolle on the ttyS0 or ttyS3 how do?

thanks

Re: Move Serial Consolle from ttyS1 (USART0 X6 connector) to ...

Your procedure is correct. Since the hardware also works as expected, please ensure that the files you edit are the ones on the medium you boot from.

What exactly happens when trying to change the console output to ttyS0/3?
Do you get no console at all or is it still active on ttyS1?

Re: Move Serial Consolle from ttyS1 (USART0 X6 connector) to ...

SOLVED...
The problem was that the RS232 on the X13 connector has a RXD and TXD inverted on the schema.
I've checked with oscilloscope and seems that really the RXD is pin 3 of DB9 female instead 2 and TXD is pin 2 of DB9 female instead 3.
The RS232 is crossed internally?
So now work.

Re: Move Serial Consolle from ttyS1 (USART0 X6 connector) to ...

The serial consolle from tts1 did abgreat job. I like their activities and their ways of thinking the right thing. Thanks for letting us know about the topic. The best custom essay writing online will help to understand the issue you are talking here with us.

Re: Move Serial Consolle from ttyS1 (USART0 X6 connector) to ...

thanks

Syndicate content