Current location - Quotes Website - Collection of slogans - Linux serial port
Linux serial port
Linux looking for serial port?

1, the device entrance can check /dev/ttyS*, /dev/*uart* (main device number 4 or 204), the first serial port is usually ttyS0, *uart0 and other USB to serial port /proc/ devices are generally /dev/ttyUSB* (main device number 188), the first. 3. The serial port is a communication port. If there are multiple serial port devices, you need to check which serial port is connected, such as cat/dev/ttys0.

How to set serial port 1 as linux debugging information output port?

The kernel configuration list needs to be modified. In the configuration list posted in Appendix 5 of Linux porting tutorial, there is a S3CUart configuration in Kernelhacking, which is changed from 0 to 1 or 2; There is a S3CUART configuration in SystemType, which is also changed from 0 to 1 or 2; At the same time, modify the startup parameters of u-boot, console=ttySAC in bootargs? (? From 0 to 1 or 2).

Linux, please tell me the serial port operation writing (FD, buffer, buff); After being sent for thousands of times, the data cannot be sent out, but it can be read.

It is better to have code, so the analysis is not accurate. The possible reasons are: buffer problems, but serial buffer should not support thousands of problems, such as the application of memory is not released, or reading is normal, which means that the serial port itself is fine, except for the program itself, and it may also be a problem handled by the receiving end.

Installation of serial debugging tool xgcom under linux?

Serial port, of course.

The hardware circuit of the serial port is simple, basically does not need any drivers and software, and can provide debugging information at various stages of hardware loading (such as debugging information at bootloader or Linux kernel startup stage) as needed.

However, the hardware design of Ethernet interface is complicated from the beginning, and the software also needs the support of driver and protocol stack, so it is often necessary to wait until the system starts to work normally before providing debugging information.

In terms of flexibility, there is actually little difference between the two, and the serial port only needs a USB to serial port line. In addition, because there are multiple usb ports on the computer, you can connect multiple devices for debugging at the same time.

In addition, Ethernet needs to set ip, gateway and other related settings, which is more complicated than serial port.

The speed disadvantage of serial port is not obvious in debugging occasions. It is better to say that the speed of Ethernet is completely wasted on debugging.

As far as I know, serial port has always been the most mainstream debugging interface on embedded devices.

LinuxRS485 serial port programming?

For programming, there is no difference, and the program can be used completely through the enabling terminal of control 485. The only difference is that the control pin of 485 can be raised by the program when transmitting and lowered when receiving. As for the electrical differences: RS232 is full duplex, which can transmit and receive at the same time, and RS485 is half duplex, which cannot transmit and receive at the same time. The level signal is different, so you will ignore this programming.