Hot answers tagged

10

I'm quite confident the problem is that the Pi does not have an RS232 interface, while the display has. The Pi has an (LV-)UART interface, its TX-pin outputs 0V for a logical 0 and 3.3V for a logical 1. This is quite easy to implement, since 3.3V is already available on the Pi. But this only works for communications on a single PCB or within a single ...


7

It looks like you might be a bit confused about how this all works. First, /dev/ttyACM0 does not represent the USB link, or even the USB endpoint for whatever serial adapter you have connected, it represents the UART inside the adapter that handles the serial communications. Data you read from it will not include any USB headers or framing, just like ...


5

The built-in Raspberry Pi serial port uses voltage levels of 0 to 3.3 Volt, as described here. The USB to serial converter and your display will use RS232 voltage levels of nominally -15V to +15V, with a minimum of -3V/+3V. You need to convert between these two levels. The port will work when looped back as the output and input voltages are compatible.


5

You can certainly put an intervening socat in the way, and use its logging facilities. For example, socat -v /dev/ttyUSB0,b19200,raw PTY,link=$HOME/myserial,raw,echo=0 2>logfile & minicom -p $(readlink $HOME/myserial) This will log the data read in each direction, shown by ">" or "<": < 2017/07/14 14:33:58.210584 length=3 from=0 to=2 hi >...


5

Summarizing above posts i found something like this: Sending. Start receiving on target: cat | base64 -d > filetotarget.bin Exit minicom with Ctrl-A + Q and then run on host machine: cat filetotarget.bin | base64 > /dev/ttyUSB0 Return to minicom and press Ctrl-D to finish receive process. Receiving. Start delayed send on target: sleep 10 ; cat ...


5

Finally found out that I was issuing the wrong command on receiver's side. Receive command shall be : cat < /dev/ttyUSB0 > file_b64 Summary To receive from remote : Host side | Remote side | | #Encode to base64 ...


3

The following works for Debian 9.9 with Kernel 4.14 (also worked with Debian 8.3, did not work with Debian 9.3). Upon booting into it you'll see the /dev/ttyO1,O2,O4 files, but they won't work until you set the pins to the right pinmux: #ttyO1: config-pin P9_24 uart config-pin P9_26 uart #ttyO2: config-pin P9_21 uart config-pin P9_22 uart #ttyO4: config-...


3

A UART (Universal Asynchronous Receiver Transmitter) is not a protocol, it's a piece of hardware capable of receiving and transmitting data over a serial interface. I presume you are selecting some design block for your FPGA design implementing an UART.


3

I'm sure someone is still doing this, but back in the days before stuff like ILO/DRAC/etc. became cheap and ubiquitous, the best way to get "out of band" access to the console in case of emergencies or an oops was over the serial port. You would mount a Terminal Server in the rack, then run cables to the serial port of your servers. Some BIOSs supported ...


2

Finally, I got it really working. This is not the perfect setup, but at least it works so maybe it can help someone in the future. I used a Python script on top of PySerial to start tcpdump over the UART and use hexdump so that the binary data can traverse the link without being modified by the tty transcription rules. Then the Python script converts back ...


2

You would first disable getty running on your serial port device /dev/ttyS0 (or whatever it is named for your hardware) to free it (for example, by editing /etc/inittab and running telinit q - if you managed to steer away from systemd) and then you would run pppd(8) on it (either manually with appropriate parameters or via additional tools like wvdial)


2

My config on Orange Pi Zero for UART on mainline kernel: overlay_prefix=sun8i-h3 overlays=usbhost2 usbhost3 uart1 uart2 Both UARTs work fine. $ uname -a Linux orangepizero 4.13.16-sunxi #20 SMP Fri Nov 24 19:50:07 CET 2017 armv7l armv7l armv7l GNU/Linux


2

strace is not likely to give you the necessary level of detail; you will probably need SystemTap, sysdig, or similar kernel-level debugging to better show when what is happening. For example with SystemTap installed and all the necessary debuginfo and setup details taken care of one could start with: probe begin { printf("%-16s %s\n", "TIME", "WHAT")...


2

The solution is to modify /etc/ttys on the guest. On amd64, it has the following defaults: # # $FreeBSD: head/sbin/init/ttys.amd64 338454 2018-09-04 15:48:13Z brd $ # @(#)ttys 5.1 (Berkeley) 4/17/89 # # This file specifies various information about terminals on the system. # It is used by several different programs. Common entries for the # various ...


1

From the readme file: Installation ------------ * Compile and install the common usb serial driver module # make # insmod ./xr_usb_serial_common.ko Which means: Open a command prompt; switch to root context (the # prompt), execute make, then execute insmod with the provided command line. If I'm a bit abrupt here, I apologize, but you are going to ...


1

NOTE: This answer is assuming Linux Where, in general, can I find the expanded names of devices under /dev? The devices have no "expanded names", but udevadm info -a /dev/ttyPSx will tell you a lot of interesting info about them. If you don't have udev, you can get the type, major and minor of the device, look it up via /sys/dev, and get the same ...


1

Rx should be connected to Tx, not Rx: RPi: Rx Tx | | \ / x / \ | | Laptop: Rx Tx


1

yes This is a limitation of the Intel xHCI chipset used on the motherboard. Specifically, most of these chips limit the number of "devices" to 32. But a single physical thing like a camera may appear to the USB controller chip as multiple "devices". Plus each hub counts as at least 1 "device" so you can easily run into this limit much earlier than you ...


1

Ok, I don't know why, but after I changed to use bash shell, the script works. The default shell is dash.


1

The problem was that the device tree did not correctly configure the RTS and CTS pins for use with the relevant UART. The device tree should contain something like: &uart1 { pinctrl-names = "default"; pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; status = "okay"; }; Where the pins have been appropriately ...


1

After trying everything listed in the "Long and Detailed Question", I still had no luck initializing my UART ports. My problem ended up being that my BeagleBone Black (BBB) came preflashed with Debian 8 while I was running a Debian 9 image on an external SD card. I am no expert on boot processes or BeagleBones but from what I found, the BeagleBone ...


1

Well, had to make a lil' script to do this, eh, good enough: cat > slowpipe << 'EOF' #!/usr/bin/env bash set -eu data=$(< /dev/stdin) hz=$(bc -l <<< "1.0 / $1") while [ -n "$data" ]; do printf '%s' "${data:0:1}" data=${data:1} sleep $hz done # XXX It seems to be imposible to save leading newlines in variables, # you ...


1

Upgrade your kernel to a newer kernel. There were issues with this driver in the earlier kernels.


1

You might get some clues from lsmod: $ lsmod Module Size Used by bnep 12310 2 hci_uart 22713 1 btbcm 8478 1 hci_uart bluetooth 425568 22 bnep,btbcm,hci_uart ... In this example, on a raspberry pi 3, perhaps you want btbcm?


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