Tag Info

Hot answers tagged

18

I find screen the most useful program for serial communication since I use it for other things anyway. It's usually just screen /dev/ttyS0 <speed>, although the default settings may be different for your device. It also allows you to pipe anything into the session by entering command mode and doing exec !! <run some program that generates ...


15

Background The main reason why you need any program like minicom to communicate over a serial port is that the port needs to be set up prior to initiating a connection. If it weren't set up appropriately, the cat and echo would not for you as expected. Notice that once you run a program like minicom, the port is left with a a set of settings that minicom ...


14

My personal flavor for Linux Kernel development is Debian. Now for your points: As you probably guessed Ubuntu doesn't bring nothing new to kernel ease kernel development afaik, apart from what's already available in Debian. For e.g. make_kpkg is a Debian feat. and not Ubuntu. Here are some links to get you started on common Linux Kernel development tasks ...


8

If UUCP is installed on the system, you may use the command cu, e.g. $ cu -l /dev/ttyS0 -s 9600


7

have you tried minicom file transfer?


5

Just for the record, here is the answer to this Problem (Usenet won): Console Applications running inside virtual terminal applications (xterm, rxvt and friends) will receive SIGWINCH after a resize operation has taken place. Thus the application will be able to redraw the window etc. in the corresponding signal handler. Unfortunately when using a serial ...


5

I found a way using a shell script here that put cat as a background process and a while loop that read the user input and echo it out to the port. I modified it to be more general and it fitted my purpose perfectly. #!/bin/sh # connect.sh # Usage: # $ connect.sh <device> <port speed> # Example: connect.sh /dev/ttyS0 9600 # Set up device ...


5

Most of the serial console programs (minicom, HyperTerm, VanDyke CRT...) you'll use on the other end of the connection will have Zmodem support, and most Linux boxes have the lrzsz package installed on them already. If not, lrzsz is small enough that you could bootstrap the process with one of the other recommended methods. You could ASCII-upload the ...


5

Assuming you have a kernel with the debugger option compiled in you can use ControlAltEscape. From there you can call boot(0) or panic. Chapter 10 of the FreeBSD developers handbook explains this in a lot more detail. So much for more or less the same as SysReq via a keyboard. On the serial console, you need to send the break signal and have the options ...


5

Serial connections don't have a standard way of setting terminal geometry. The assumed geometry is often 80x23 or 80x24 (terminals with zero to two status lines). Once you're logged in, you can set your preferred geometry via the shell, using something like stty rows 50 cols 132 This will last for the duration of your terminal session, but is not ...


4

Don't know if this would work if all you had was a serial console, but if you have network access at all, then you could use nc(1) to copy files using TCP/IP. # WARNING: Depending on your setup, this could make your system unbootable root@destination-box.local # nc -l 8675 | dd of=/dev/sda1 root@source-box.local # dd if=/dev/sdb1 | nc destination-box.local ...


4

If you're developing for an embedded platform that's not based on i386 hardware, you'll need to cross-compile. The Emdebian project provides toolchains to develop for many architectures (ARM, m68k, MIPS and more) on PCs (i386 or amd64). That means under Debian, you can simply add the repositories and apt-get install the toolchain for the target(s) of your ...


3

I'm with @Renan: it looks like this problem was fixed in newer kernels. (One such thread on LKML.) The key error is the invalid interface number one. It means the USB driver sees the device, but it's numbering its features (interfaces) in a way the driver doesn't expect, and it can't cope. Googling around, you can find several cases where people are fixing ...


3

I can now answer my own question based on Stefan's comment and the two linked articles: http://ubuntu.stackexchange.com/questions/1733/what-reason-could-prevent-console-output-from-virsh-c-qemu-system-console-gu http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507650#29 Here is the solution: You need not edit anything to do with the host configuration ...


3

JTAG probes do exist, but these are fairly expensive (and the companies building them have exclusive contracts). The best way to debug kernel code is to start it in kvm or qemu with gdbserver inside the emulation.


3

iptables does not effect data sent over the serial port (unless you're running PPP or similar over the port, of course). But that command you gave is pretty broad, for example, you dropped packets that are entirely internal to the machine (go over lo). Depending on how your serial port is set up, maybe that was required. Dropping traffic over lo tends to ...


3

console is specified twice in that cmdline: console=ttyAMA0,115200 console=tty1 Perhaps the second one has overridden the first (it can't be both at the same time). If ttyAMA0 is what you want to use, remove console=tty1.


2

I would use kermit, the grandparent of filetransfer programs. We used that already long before there was Linux.


2

BTW, the putty package (which does run on Linux) does include serial support.


2

As it turns out. The fault was neither the dongle, nor was it screen. The Small Business 300 series uses 115200 baud unlike the rest of cisco's equipment that uses 9600 baud. Using the command: screen /dev/ttyUSB1 115200 Did the trick. Thanks for playing guys :)


2

You could open an additional session with ssh and issue the following command in it: tail -f /dev/ttyS0 it will print out everything that arrives at ttyS0. Of course, this solution is useful if you transmit printable characters only as otherwise your screen may be flooded with garbage.


2

The system is allowing you to log in over serial because you have a line like this in /etc/inittab: T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 That says to run a a getty on ttyS0 in runlevels 2 and 3, and to respawn it when it exists. 9600 is of course the bits per second, and vt100 is the terminal type. You'll also notice gettys on tty1–6 as well, ...


2

CentOS For CentOS you will need to re-make the ISO file. I know that is possible, but I do not know the process. However, I do know what you will need to modify the syslinux.cfg file. When I did this process, it was with a USB stick on to a physical box, so the editing was easier. It might be worth checking to see if you can boot from a folder structure on ...


2

According to the Fedora 16 documentation /etc/rc.serial is responsible for setting up the serial lines. Has anything changed here between your 15 and 16 install? Setting "low latency" and "rx/tx_trigger" (if possible) might help. I remember that the 16550A has a 15-byte-input-buffer. Somehow you can set at which fill-level an interrupt is being generated ...


2

Under Linux, /dev/ttyS0 refers to the first built-in PC UART. Some PCI serial ports appear here, too. Most serial to USB adapters present themselves to Linux as /dev/ttyUSB* instead. If you have only one plugged in, it will be /dev/ttyUSB0. There's an alternative naming scheme, ttyACM*. These devices are using the Abstract Communications Model interface. ...


2

When you start a virtual terminal connected to something like an X terminal emulator or an SSH session, the terminal size is configured for you (e.g. forwarded over SSH from your local terminal). As you've discovered, when connecting over a raw serial port, this does not happen. Option 1: just run resize This command will attempt to discover the size of ...


1

Each console has a process associated with it. You can usually find them on the process list easily enough. On Ubuntu it is called getty or agetty. On other systems it might be login, or it could just be a shell process. All you have to do is disable that process to shut down the serial port. You can't kill it because init will just spawn a fresh one, but ...


1

You need a null modem cable (or a null modem adapter attached to your serial cable) if both ends of the connection are implementing the DTE side of the RS-232 protocol. Typically computers are DTE and peripherals like modems are DCE. Your embedded board is halfway is kind of a hybrid (runs OSes that also run on PCs, but intended for use as a peripheral ...


1

I ran into a similar problem. I was able to isolate this to another device competing for interrupt servicing time. In my case, my laptop's SD Card Reader was competing for time with my serial device. I disabled the card reader driver (rmmod) and the overruns went away. You can see the devices on the same IRQ using: cat /proc/interrupts


1

The busybox example inittab looks a little different, # Example of how to put a getty on a serial line (for a terminal) # #::respawn:/sbin/getty -L ttyS0 9600 vt100 #::respawn:/sbin/getty -L ttyS1 9600 vt100 could you give this a try?



Only top voted, non community-wiki answers of a minimum length are eligible