Questions tagged [uart]

A Universal Asynchronous Receiver/Transmitter (UART) is used for serial (where each bit of data is transmitted along the same connection) communications over a computer or peripheral device serial port.

uart
Filter by
Sorted by
Tagged with
230 votes
6 answers
470k views

Cross-thread operation not valid: Control 'textBox1' accessed from a thread other than the thread it was created on [duplicate]

I want to send temperature value from a microcontroller using UART to C# interface and Display temperature on Label.Content. Here is my microcontroller code: while(1) { key_scan(); // get value of ...
Fatima Zohra's user avatar
  • 2,957
3 votes
3 answers
11k views

Android Things: Connect to Serial Debug Console

I've been trying to connect to the serial console of a Raspberry Pi 3 with Android Things using USB to TTL cable from my Linux (Ubuntu) machine. Despite I connected the cable as per the documentation, ...
Onik's user avatar
  • 19.8k
1 vote
2 answers
8k views

Pymodbus - Read input register of Energy meter over rs485 on uart of raspberry pi3

I have one energy meter and i am trying to retrieve voltage, freq values from meter on raspberry pi uart over RS485 My connections for raspberry pi and rs485 are as follows Rs485 DI - Tx of ...
shan's user avatar
  • 9
0 votes
2 answers
3k views

How do I connect microbit with BLE and listen for button press events?

11/28/2021 Edit : If you need to connect your microbit to your computer using Bluetooth Low Energy, and do stuff when the button is clicked. Jump straight and follow @ukBaz's answer below. Note: The ...
Just some sailboat's user avatar
3 votes
2 answers
4k views

parsing complete messages from serial port

I am trying to read complete messages from my GPS via serial port. The message I am looking for starts with: 0xB5 0x62 0x02 0x13 So I read from the serial port like so while (running !=0) { int ...
Ariel Baron's user avatar
4 votes
3 answers
7k views

Cannot transmit every characters through UART

I am using stm32f0 MCU. I would like to transmit every single byte received from the uart out of the uart. I am enabling an interrupt on every byte received from uart. My code is quite simple. ...
guagay_wk's user avatar
  • 27.2k
3 votes
1 answer
2k views

Why characters received in serial connection only after pressing enter?

I have a simple PC to board connection using serial (9600, no parity, 8 bits, no hw flow) I opened simple terminal *with teraterm) in PC and enter keys in teraterm and in board, I just do cat /dev/...
ransh's user avatar
  • 1,662
2 votes
1 answer
2k views

Parsing time-delimited UART data

When trying to correctly reverse-engineer and decode data on a UART connection, I have arrived at the following conclusions about the format of the data being received. Data is sent in "packets". ...
GCon's user avatar
  • 1,427
8 votes
1 answer
7k views

What type of framing to use in serial communication

In a serial communication link, what is the prefered message framing/sync method? framing with SOF and escaping sequences, like in HDLC? relying on using a header with length info and CRC? It's an ...
user2479653's user avatar
3 votes
1 answer
25k views

Raspberry Pi UART program in C using termios receives garbage (Rx and Tx are connected directly)

I have a simple program written in C which uses termios to send a basic string to the Raspberry Pi UART and attempts to read and output the response. The Rx and Tx pins on the Raspberry Pi are ...
kourosh's user avatar
  • 41
2 votes
2 answers
4k views

Difference between device_register and driver_register

I am writing a UART driver. I came across the two functions in the chapter 14.Linux Device Model. int device_register(struct device *dev); int driver_register(struct device_driver *drv); Since UART ...
ddpd's user avatar
  • 603
1 vote
2 answers
3k views

call to request_mem_region() fails

The start address 0x4806E000 (UART4 base address) is already present in /proc/iomem with the name omap4-uart. How to disable the memory regions already allocated ?. Edit : Even though ...
ddpd's user avatar
  • 603
1 vote
1 answer
1k views

Uart dma receive interrupt stops receiving data after several minutes

I have a project that I have used stm32f746g discovery board. It receives data with fixed size from Uart sequentially and to inform application about each data receive completed, dma callback is used (...
masoud's user avatar
  • 116
0 votes
3 answers
11k views

Read from two serial ports asynchronously

I'd like to read from two (or more) serial ports (/dev/ttyUSB0 etc) at the same time in python on Linux. I want to read complete lines from each port (whichever has data) and process the results in ...
Alex I's user avatar
  • 20k
0 votes
1 answer
3k views

ARM Assembly Language uART0 Input Output, What am I doing wrong.

Write two (2) ARM assembly language subroutines, called output_char and read_char. These subroutines will allow a user to enter a character and display the character in PuTTy via the UART. All user ...
user3353118's user avatar
86 votes
14 answers
179k views

What is the difference between baud rate and bit rate?

I am really having hard time understanding the difference. Some say they are same, while others say there is a slight difference. What's the difference, exactly? I would like it if you explained with ...
dimSutar's user avatar
  • 1,435
10 votes
1 answer
13k views

Qemu baremetal emulation - how to view UART output?

Question: How do I get the UART output from a baremetal program run with Qemu? Background Here is the command line invocation I have been using: qemu-system-arm -M xilinx-zynq-a9 -cpu cortex-a9 -...
thatjames's user avatar
  • 478
6 votes
2 answers
4k views

UART ISR Tx Rx Architecture

Am I complicating things? I'm architecting my code to talk from a 8051 micro to a peripheral device over UART. The peripheral responds to commands from the host and can only respond to one command ...
Jonathan's user avatar
  • 1,498
3 votes
3 answers
16k views

Linux Reading Data from UART

I want to read data from UART, i followed this tutorial, the write function works as expected, however i'am getting problem with the read function : This is the uart_init function: void uart_init() { ...
fedi 's user avatar
  • 368
3 votes
1 answer
1k views

UART communication in Gem5 with ARM Bare-metal

I am currently working with Gem5 and I have to access via UART from my Host to ARMv8 bare-metal option, so i tried lots way but i stocked yet. could you please let me know, how can i map my host's ...
Younes Mahboub's user avatar
2 votes
1 answer
3k views

How can I use Ansible of a serial connection instead of SSH?

I have a bunch of Raspberry Pi devices that I only configure over the serial console. I am hoping to configure Ansible to update them for me. I can't find any obvious way to do it (on this list for ...
Alex028502's user avatar
  • 3,648
2 votes
2 answers
832 views

writting 0D 0A insted of 0A when I tried to write into uart

The following code configures UART port. const char *UART2_path="/dev/ttymxc2"; int UART2; void UART2_open(const char *UART2_path) { int flags = O_RDWR | O_NOCTTY ; ...
Rajesh D's user avatar
2 votes
1 answer
20k views

How receive data with HAL_UART?

I'm learning about the STM32. I'm want receive data by UART byte-to-byte with interruption. HAL_UART_Receive_IT(&huart1, buffer, length) Where &huart1 is my uart gate, buffer is the input ...
Elias Elnatã's user avatar
2 votes
1 answer
5k views

Receiving number as string (uart)

I'm trying to receive a number through uart which is packed as a string. I'm sending number 1000, so I get 4 bytes + null character. But when I convert the array to number with atoi() and compare the ...
Electruc's user avatar
1 vote
0 answers
4k views

Enabling and testing local loop back for UART

I'm trying to do UART internal loop back testing and come up with below changes #include <fcntl.h> #include <stdio.h> #include <termios.h> #include <unistd.h> #include &...
Amit Singh Tomar's user avatar
1 vote
2 answers
5k views

Stop on newline when using read(...)

I need to read the NMEA sentences from a GPS connected through UART. The OS is Debian, and the language must be C++. To do so I'm opening the file with open(...) and reading a string with read(...). ...
AmiguelS's user avatar
  • 835
0 votes
1 answer
362 views

Master for Interrupt based UART IO

The interrupt based UART IO allows the data transfer to take place without intervention of CPU. Now the question is, if not CPU who controls this ? Is it the DMA controller or some external master who ...
Ginu Jacob's user avatar
  • 1,688
0 votes
1 answer
1k views

Bluetooth Pairing with Nrf UART is not working properly

The Bluetooth pairing is not working properly. I am developing the Application based on Bluetooth pairing with UART. Here I have included my concept and Program.Help me out to fix the problem. My ...
sivaprakash's user avatar
0 votes
1 answer
589 views

Unable to open UART port on Windows IoT with Raspberry Pi 3

I have null in the serial port after I open the SerialDevice in C# on Windows IoT Core 10 running on Raspberry Pi 3. Here is the code: string aqs = SerialDevice.GetDeviceSelector(); ...
Olga Pshenichnikova's user avatar
0 votes
2 answers
3k views

UART Communication In C language (Hex)

I want to send a hexadecimal value to the write function. (e.g., 0×90). This is because the device that needs to communicate receives commands in hexadecimal numbers. The unused variables appeared as ...
youna's user avatar
  • 39
-2 votes
3 answers
7k views

Send a structure using UART [closed]

I have a two boards: - Master board (M board) - Slave board (S board) M board shall send a request to S board and the latter shall answer. The answer of the slave is a struct: typedef struct{ ...
Pryda's user avatar
  • 969
12 votes
4 answers
5k views

is it possible write to console without stdlibs? c/c++

I am programming on an arm microprocessor and am trying to debug using print statements via UART. I do not want to add stdlibs just for debugging. Is there a way to print to the console without stdio....
Sam's user avatar
  • 238
12 votes
1 answer
15k views

GATT profile and UART service

I am new to developing a mobile app with bluetooth connection to peripheral device. I searched that GATT is the relevant profile used for bluetoothLE communication but our client recommended that we ...
Samra's user avatar
  • 1,903
8 votes
3 answers
136k views

IOError: [Errno 2] No such file or directory (when it really exist) Python [duplicate]

I'm working on transfer folder of files via uart in python. Below you see simple function, but there is a problem because I get error like in title : IOError: [Errno 2] No such file or directory: '1....
user avatar
8 votes
2 answers
21k views

Emulating UART over USB

Does anybody know if it's possible to emulate UART (simple serial transmit and receive) over USB? How would this be accomplished? I found this link on the Microchip website, but it's not very ...
Jim Fell's user avatar
  • 14k
7 votes
3 answers
9k views

How to Read Data from Serial Port in R

I'm wanting to plot live data from the serial port. I figured R would be a good tool for the job. I'm stumbling on trying to read data from the serial port (COM4). I've verified the data is coming ...
Ryan B's user avatar
  • 537
7 votes
1 answer
3k views

Intel Galileo bare metal UART

I want to program a little "hello world" bare metal application on the Intel Galileo board. Using UEFI to print out text (to UART-1) works well, of course, but I want to access the UART "manually", ...
Kijewski's user avatar
  • 25.7k
4 votes
3 answers
12k views

UART controller or RS232 controller? Is UART a general word?

I have a question regarding UART controller. Is UART controller a general name? i mean that if we use RS-232 protocol, we should name this UART controller, RS-232 controller and if we use RS-485 as ...
Michelle's user avatar
  • 166
4 votes
1 answer
15k views

RS232 (UART) on STM32F4-Discovery (STM32F429ZIT6) with HAL library?

Background Here is some of my background so that your guy could know what related knowledge I have or I don't have. I'm totally a newbie of this kind of embedded system. And I don't really know ...
Brian Hsu's user avatar
  • 8,791
4 votes
4 answers
25k views

Enabling UART on Beaglebone Black

I'm having trouble getting UART enabled. I've gone through many different directions on how to enable and troubleshoot from updating the uEnv.txt file to updating the kernel. I've come to conclude ...
curlysue48's user avatar
4 votes
1 answer
3k views

UART initialisation: Prevent UART to pull RTS high

I'm writing a RS485 driver for an ARM AT91SAM9260 board on Linux. When I initialise the UART, the RTS signal line gets high (1). I guess this would and should be the standard behaviour in RS232 ...
Maus's user avatar
  • 2,746
3 votes
1 answer
3k views

UART Tx mode with DMA enabled

I have written a simple device driver for UART in transmission mode with DMA enabled along with interrupt. The hardware which I am using is omap 4460 pandaboard with Linux 3.4 loaded in it. Below I ...
ddpd's user avatar
  • 603
3 votes
2 answers
3k views

Disabling interrupt in interrupt handler STM32F407

I'm new here and I'm trying to solve my projects problem. I'm trying to send send data over UART from Raspberry Pi B+ to my STM32F407 and process that data in real-time. My problem is: How to actually ...
P. Kudła's user avatar
  • 105
3 votes
1 answer
4k views

How do I open/write/read a uart device from a kernel module?

The device is a scanner. I know uart5 is setup in the dtsi file and in userspace it is listed under /dev/ttymxc4. From userspace, I understand that I can manipulate the device by fd = open("/dev/...
Ryan's user avatar
  • 446
3 votes
1 answer
3k views

Set 16550A UART Hardware FIFO interrupt level from Linux Userspace

I am currently using a 16550-compatible UART, and I want to be able to change the FIFO interrupt trigger level (I am dropping bytes under high UART loads and I want to reduce the threshold - it's an ...
Damien's user avatar
  • 795
3 votes
2 answers
3k views

Detect certain connected USB device

I'm working with a USB device in Linux and have written a library to control this device. Without going in to TOO many details, the device uses a standard UART protocol, so all I have to do is open a ...
justynnuff's user avatar
2 votes
1 answer
20k views

C# Serial Port reading HEX data

I am writing a C# application to read from several serial COM ports at the same time to analyze the data communication of an IPOD. The data being sent needs to be interpreted as HEX bytes. For example,...
radensb's user avatar
  • 684
2 votes
1 answer
2k views

Bluetooth Low Energy Notification Interval

I have a question regarding the bluetooth LE protocol. I have an Android Device and a peripheral device. Looking at the transmission with a sniffer and wireshark there is +/- every 40ms an empty PDU ...
Chuchaki's user avatar
  • 371
2 votes
1 answer
641 views

How to detect screen resize events coming from ncurses in QNX?

I can not configure to receive events about changing the size of the terminal using ncurses QNX Momentics. I am using Putyy as a terminal and data is transmitted through the COM port. My question is ...
J. Konor's user avatar
2 votes
1 answer
3k views

Receiving data from 2 UARTs, STM32F4-Discovery, HAL drivers

I want to receive data from 2 sensors connected to my STM32F4-Discovery via 2 UARTs. Transmitting data from STM32 to sensors works but receiving doesn´t. Guarantee it isn´t a hardware problem. I found ...
Jardo421's user avatar