Hot answers tagged

4

The preliminary Pi4 datasheet shows there are 6 UARTs. UART GPIO 0 14/15 1 14/15 2 0/1 3 4/5 4 8/9 5 12/13 Given that UART 0/1 are both connected to the same GPIO you can only use one of them at any one time. So potentially there are 5 accessible UARTs at any one time. You can enable each of the UARTs on the Pi4B by making appropriate ...


3

There's nothing wrong with your approach for individual text files. For a binary file (or a large number of files/directories which you'd pack together with tar/gzip), you can use base64 to encode them as text: Receiver (Pi over picocom): cat | base64 -di > file Sender (another terminal on the PC): cat file | base64 > /proc/`pidof picocom`/fd/0 Also ...


3

No. The USB protocol is different to the simple serial protocol used by a UART.


2

There is a way that is called "Software serial" or "Soft UART". The project https://github.com/adrianomarto/soft_uart is doing precisely what you are looking for, you can install the soft_uart and use any GPIO as Rx/Tx. Software-based serial port module for Raspberry Pi. This module creates a software-based serial port using a configurable pair of ...


2

It seems you are missing the critical part of converting RS232 signal (which is not 3.3 V) to RPI GPIO compatible 3.3V Signal as described in this example: https://www.abelectronics.co.uk/kb/article/20/raspberry-pi-serial-port-usage http://raspberrypi.tomasgreno.cz/uart-to-rs-232.html On GPIO header of RPi you can find a so called UART pins. In fact, it ...


2

I have the SIM800 GSM addon hat for a Raspberry Pi 3 and got it to work with T-Mobile amazon link Using this website as a reference: https://www.rhydolabz.com/wiki/?p=16325 I followed these steps: sudo apt-get update sudo apt-get install ppp screen elinks sudo -i nano /etc/ppp/peers/rnet Add the following to the file #t-mobile is the apn connect "/usr/...


2

After very long discussion, now i can control the motor, the problem is i sent the wrong instruction packet FF FF 00 04 03 20 FF D8, it should be FF FF 00 05 03 20 FF 00 D8.


2

Question How can Rpi4B python UART talk to XY PWM Signal Generators? Answer Contents (1) Introducing XY-LPWM, UART support version of XY-PWM (2) Using Win10 RealTerm terminal emulator to serial/UART talk to XY-LPWM (3) Using Rpi python program to serial/UART talk to XY-LPWM (2) Using Win10 RealTerm terminal emulator to serial/UART talk ...


2

As Joan has stated only 1 of UART0/1 is accessible (UART0 /dev/ttyAMA0 is connected to Bluetooth on later model Pi). There are additional UART on the Pi4. Raspberry Pi4 UART is a more up to date answer. The following summarises the pin usage:- TXD RXD CTS RTS Board Pins uart0 14 15 8 10 uart1 14 15 8 10 uart2 ...


2

Only for the completeness: first check your connection as shown at What is the correct way to connect serial console on RPi4 Model B?. But I believe you are right. As I see you are experimenting with the 64 bit version of the Raspberry Pi OS in addition with an init ramdisk. First you should verify that your serial console is working as expected. Download ...


2

You will be using a software driver or software library to talk to the UART. When you "open" the UART with that software you will specify the baud rate. The method used depends on the driver/library you choose to use.


2

You can definitely use a USB serial dongle as a UART. They usually show up as /dev/ttyUSB0.


2

AFAIK you can not use 5 UART. Although the SOC has 6 UART not all are accessible on the Pi4 because some share the same pins (the other GPIO banks are not accessible). One can only use the reserved pins on the header used for HATS and I²C extender. It may be possible if you disable Bluetooth (which uses one UART). See Raspberry Pi4 UART


2

GY-MCU90640 modules I have seen had a default baudrate of 115200, not 9600. Since your symptoms look exactly like baudrate mismatch, this is the first thing I would try to rectify. Note that GY-MCU90640 also has an I2C interface which is much faster (around 400000 instead of 115200) and doesn't have any configuration options you can get wrong as the UART ...


2

The documentation does hint that there are various problems/shortcomings with the mini-UART but it still did not explain why it was screwing up. I finally found the reference that helped to explain the behavior. The key was finally reading section 2.2 of the BCM2835 ARM Peripherals documents, link found on the RPi site. This section describes the mini-UART ...


1

Although old fashioned, Picocom supports filetransfer, x-modem, y-modem, z-modem and ascii-xfr. If I where you, i'd go for z-modem. The package you are looking for is lrzsz (and notzmodem as I stated earlier). Note that it operates a bit different from scp.


1

wiringSerial is part of wiringPi. wiringPi is an "Arduino" like C library to control the GPIO. wiringSerial is a simple wrapper around the underlying Linux serial driver. It simplifies some operations. Look at the source code if you need details. Note that wiringPi is deprecated (i.e. no longer being developed or supported by its author).


1

No. I think both UARTs are connected to the same pair of GPIO (14 and 15). That being the case you can only use one at a time.


1

This is a baud rate problem. You're getting a lot of x and f characters which have ASCII codes of 01111000 and 01100110 - note all bits inside those are repeated twice. The effective baud rate of your Pi should be twice as low as what you think: if your terminal is set to 115200, try setting it to 57600. Perhaps reading the messages you're receiving (using ...


1

Note I am deliberately answering my own question There are lots of detailed guides out there; this is an overview of the key points particularly with respect to using a Raspberry Pi as the host. Take apart the case and solder wires to the TX, RX and boot_sel2 soldering pads, and make an earth connection somewhere. Ensure the Raspberry Pi is not trying to ...


1

Found the answer to my own question. The Pi UART is by default set to echo mode. Hence the echo behaviour! This presumably reflects its original purpose of working as a tty console. Echo is required for normal console behaviour. Fix is simply to reconfigure the UART by disabling the echo. Worked as expected after I'd configured with: stty -F /dev/...


1

You directly connected Pins 8 and 10 to the USB-To-TTL-Adapter? That's a bad idea that can fry your Pi. The Pi runs at 3.3V (including its UART-Pins), Uart power level is typically between 5 and 20V. You need to use a voltage translator or a board specifially designed to convert the Raspberry Pi's Uart Pins to TTL level. This may, in fact, result in the ...


1

Either of those should work (obviously assuming you select the appropriate pins on the device. Frankly I wouldn't do it this way. A typical use of a Level Shifter is shown directly wired to a device. The Pi is on the Right, the Red wire is 5V to HV; the Black Gnd (both soldered to the same pads) Pink is 3.3V to LV, Grey GPIO. This is only unidirectional ...


1

I don't know if I am looking this completely wrong, but on page 23 you have the pulse width. System Main Menu>2. Communication>2. Wiegand. The default is supposed to be 100us. Now according to this: Determing Unknown Baud Rade You get this table: Time-->Baud Rate 3333µs-->300 833µs-->1200 416µs-->2400 208µs-->4800 104µs-->9600 ...


1

So it turns out I had a lot of errors. This is what I ended up using. Aside from trying to check strings that didn't exist the string manipulation formatting was just wrong. I switched to just trimming the front and back of the string which contained'\r\n' and '~1 ' import serial with serial.Serial('/dev/ttyAMA0', 115200, timeout=1) as ser: while True: ...


1

Don't bother with trying to manually configure UART - use the menu in raspi-config which gets it right. You have disable the serial port by trying to do it manually (probobly by following some obsolete instructions). /dev/ttyAMA0 is connected to Bluetooth - use dev/serial0 See How do I make serial work on the Raspberry Pi3 , Pi3B+, PiZeroW


1

I'm using SC16IS752 IC which is SPI to 2xUART converter. It works well with Raspbian Stretch. It is a bit more expensive than FTDI chip, but there are two uarts and I don't have to use precious USB port.


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