top of page
Search
subtungtile1972

Configure Minicom For Serial



minicom is a serial communication program that connects to devices through a GNU/Linux PC's serial ports. If run by calling its name without any additional arguments, it uses whatever settings have been saved for its defaults in /etc/minicom/minirc.dfl. For those using Windows, PuTTY is a viable application to make such connections between a Windows PC and one of our EMAC devices. More information about PuTTY can be found at




Configure Minicom For Serial



Please note that while PuTTY will work, it is missing a number of features relative to a real Linux terminal. In particular, a number of keystroke shortcuts will not work with PuTTY, and not all output will be displayed correctly in PuTTY (although it does manage to display most output correctly). For serious work with Linux, a real Linux terminal (such as minicom, described here) is strongly recommended.


The use of a terminal emulator, such as minicom, is required when connecting to an EMAC board via a serial console. This page sets out to provide general information about using minicom to communicate between EMAC machines and a development PC.


This should bring up a colorful display listing the different settings. If the display isn't colored, arrow down to Exit from Minicom. Run the minicom command with the option -con. The c specifies the color display and on tells minicom to display the interface in color. minicom can be made to always run in color by modifying the /.bashrc file, setting the MINICOM environment variable by adding the lines shown below, and restarting your terminal session (or sourcing your .bashrc) to make the change take effect:


Another method to set minicom to always display in color is to set an alias for minicom to minicom -con. However, doing this could lead to problems or confusion when trying to run minicom with other aliases or with a very specific set of commandline options, so the environment variable method should be used instead wherever possible.


You will most likely wish to modify the Serial Device setting to have the path to the serial port you normally use. This way, you'll be able to run the command without any options or commands. Press the 'Esc' key to be be brought back to the configurations page.


The next setting that needs to be configured is the Modem and dialing. Press the 'A' key and delete its content. Hit the 'Enter' key to set the setting as blank. Also do this for B through H and K. Hit the 'Esc' key when finished deleting the content of these settings.


Log in, if necessary, with the appropriate username and password for the device. Login information can be found here.You're now able to communicate to the device and use minicom in the same way as using the terminal for the device.


This program is a very important tool for developers. The serial console is essential for working with the bootloader on ARM systems, since U-Boot cannot be accessed via ssh. Using the serial console, you will be able to configure the bootloader, to program new kernels via the bootloader, to program new filesystems, to make a copy of the filesystem on a board, and to perform memory checks using U-Boot. The serial console will also enable you to see startup and shutdown messages, to configure and debug the system when networking is not configured or is not working, and to debug the system when the machine is not booting up.


Those who work with infrastructure/server deployment knows how difficult it is to get a console for those devices having no display like switches, routers and a blade chassis/enclosure. Usually we use any console connection utilities like putty, minicom, RealTerm or cu. Here I am explaining how to configure minicom in linux for a console connection to Cisco Nexus 5K switch.


I recently wrote about my first experience connecting to the pinephone via serial console. This post documents how to configure Minicom for establishing an interactive terminal session with a device connected to your computer via a serial port. The configuration will be saved to file so that it can be reused to connect to the same device again in the future, which is convenient. My version of minicom at the time of writing is minicom version 2.7 (compiled Jan 8 2018).


In my case the TTY device name was ttyUSB0; however, if your cable is not a USB converter, then it might be named ttyS0 instead. If your system architecture is ARM, you might see a name like this ttyAMA0 and if it is a Samsung, then the device might be named ttySAC0. There are more serial port names than I mention here. Also, the index number at the end of the name is determined by the devices minor number and may not be 0. The device name for a serial connection is properly referred to as a serial port. The rest of this blog post will simply use ttyUSB0 as the name of the serial port, but you must use the correctly named serial port assigned to your connected device if you are following along.


The output from ls shows us that the uucp group has rw permissions to the device. Another common group that is used for the group ownership of serial devices is the dialout group. If your system uses the dialout group rather than uucp, then in your mind simply substitute dialout in place of uucp for the rest of this post. It makes semantic sense for the dialout group to be used if the device is a modem or a fax.


You will see a lot of output being written to the screen as your device loads. In the end, you should see a login prompt. Since minicom is a terminal emulator, you can click on the screen and enter your login credentials as if you were connected to the device with a keyboard and monitor.


That is because /dev/ttyUSB0 is being initialized in cooked mode and therefore some translation is being done by the line discipline before it is received by the TTY and ultimately minicom. In order to run ncurses applications correctly we need the TTY to be initialized in raw mode. That can be achieved using the stty raw -F /dev/ttyUSB0. However, when raw mode is configured in this way, minicom still appears to perform its own bytestream translation. I also tried setting the -l optional flag to enable literal translation, which translates IBM line characters to ASCII. Perhaps there is something that I have missied here. Please feel free to comment if you have suggestions.


I am trying to connect minicom to a serial device that is connected via a USB-to-serial adapter. This is a PL2303 and from everything I've read no additional drivers are required. The device is recognised as a PL2303.


The serial port communication programs moserial or gtkterm provide an easy way to check connectivity and modify /dev/ttyUSB0 (or /dev/ttyUSB1!) settings. Even though there maybe only a single USB to RS232 adapter, the n designation /dev/ttyUSBn can and does change periodically! Both moserial and gtkterm will show what port designation is relevant in their respective pull down menus when selecting an appropriate port to use.


I had fix this with adduser *username* dialout. I never had this error again, even though previously the only way to get it to work was to reboot the PC or unplug and replug the usb to serial adapter.


I get the error when the device attached to the serial port end of my Prolific Technology PL2303 USB/Serial adapter is turned off. After turning on the device (an embedded controller running Linux) minicom connected fine.


I had the exact same problem, and it was fixed by doing a chmod 777 /dev/ttyUSB0. I never had this error again, even though previously the only way to get it to work was to reboot the VM or unplug and replug the USB-to-serial adapter. I am running Ubuntu 10.04 (Lucid Lynx) VM on OS X.


I suggest that newbies connect a PL2303 to Ubuntu, chmod 777 /dev/ttyUSB0 (file-permissions) and connect to a CuteCom serial terminal. The CuteCom UI is simple \ intuitive. If the PL2303 is continuously broadcasting data, then Cutecom will display data in hex format


A basic environment for this scenario is two machines connected using a serial cable (9-pin connector cable).The administering machine can be any Unix/Linux or Windows machine with a terminal emulator program (PuTTY or Minicom, for example).


If you have not configured console= in kernel command line start serial-getty@device.service. For /dev/ttyS0 (COM1) that would be serial-getty@ttyS0.service. Enable the service to start it at boot.


dtermAUR is a tiny serial communication program. If you invoke it without parameters, it will connect to /dev/ttyS0 at 9600 baud by default. The following example connect to /dev/ttyS0 at 115200 baud, with 8 data bits, no parity bit and 1 stop bit-times:


Press Enter to exit the menus (pressing Esc will not save changes).Remove the modem Init and Reset strings, as we are not connecting to a modem. To do this, under the Modem and Dialing menu, delete the Init and Reset strings. Optionally save the configuration by choosing save setup as dfl from the main menu.Restart minicom with the serial cable connected to the target machine.To end the session, press Ctrl+A followed by Ctrl+X.


Even though [5] has only raw and terse instructions, it presents the full scene. It is important to note that here, the machine under test got unresponsive in a reproducible manner. And that it happened during normal operation. So it could be accessed normally before it needed debugging. However, in general, the serial console is also useful for debugging boot issues. Perhaps by configuring the boot loader by hand at machine startup time. Also note the mentioned netconsole within the P.S paragraph of the external link from this section.


Unlike ssh, serial connections do not have a mechanism to transfer something like SIGWINCH when a terminal is resized. This can cause weird problems with some full-screen programs (e.g. less) when you resize your terminal emulator's window.


The number of serial ports using the generic 8250 driver on the default kernel configuration is set to 4 at runtime with a maximum of 32. This will prevent the creation of /dev/ttyS4 and above. Counting the typical built in serial port on the motherboard this prevents the use of the 4th serial port on a 4 port expansion card. 2ff7e9595c


0 views0 comments

Recent Posts

See All

Comments


bottom of page