2,309 questions
0
votes
0
answers
89
views
RS232 to USB in a hub with other device: potential loss of data?
I'm currently using a SBC (a Raspberry Pi Zero 2W) to receive data from a device (let's call it Sensor). Sensor is connected to the micro USB port on the SBC through an adaptor with FTDI FT232R USB ...
0
votes
0
answers
37
views
FPS mismatch when using pyserial
I am reading raw hex data from a TI IWR1843BOOST radar module through pyserial. The radar is configured with a measurement rate of 35 fps, so the python code is expected to receive a single packet ...
2
votes
1
answer
132
views
Serial Port Connection Fails on Subsequent Attempts (Jetson Orin Nano - RS485)
I am experiencing an issue with a serial port connection on my Seeed Studio reComputer J30 (Jetson Orin Nano Industrial). When I reboot the device, the serial port connection works fine on the first ...
0
votes
0
answers
75
views
I want to stream data from a Ublox EVK-F9P GNSS receiver to extract NMEA, RTCM and RF spectrum data
I have a Ublox EVK-F9P GNSS receiver and i would like to extract the NMEA and RTCM message outputs, along with RF spectrum data. I have configured my receiver using u-center and i can extract all 3 ...
1
vote
0
answers
100
views
Cannot read data from the digital force gauge by using Pyserial
I want to get force values from a digital force gauge which has a RS232 port. According to the FH Data Connection protocol, if I send ASCII '9' by using Pyserial, the device should send the force ...
0
votes
0
answers
82
views
Control LCTech Relay X2 using Python and serial commands via serial port
So I bought the following relay and board (comes with ESP-01 8266 module) that I want to control directly via serial commands.
https://www.aliexpress.com/item/1005004090736903.html?spm=a2g0o....
2
votes
1
answer
78
views
pyserial doesnt read full line
I want to read data from my arduino and show it on a tkinter window, it works nicely but when I sent the Data on the arduino faster then every 10ms it resevieses many lines that are not full like this:...
0
votes
0
answers
35
views
pyserial Thread protocol relaunch conection
I've ans issue with pyserial threaded protocol
I've overloaded protocol class (no detail on what is protocol is relevant here)
class myProtocol(Protocol):
def __init__(self):
super().__init__()
...
1
vote
0
answers
133
views
Pyserial communication issue
I'm using pyserial with most of my project and I often have communication issue.
Software Setup:
Windows 10
Python 3.11.9
Pyserial 3.5 (installed with pip on venv)
port settings:
self.port = serial....
0
votes
0
answers
285
views
Python pyserial can't access com0com virtual serial ports even though they appear in Device Manager and com0com GUI
I've set up virtual COM ports with com0com (COM20 and COM21), but I'm having trouble accessing them through Python's pyserial.
What I've tried
I can successfully create the port pair using com0com's ...
0
votes
2
answers
85
views
Python, pyserial, No module named 'serial'
I am using python to interogate a USB Serial device (a nino tnc)
I have 3 separate systems.
Linux ubuntu with no issues
Linux Rpi with no issues
Windows 10 with issues.
As it responds correctly in the ...
0
votes
0
answers
45
views
Problem with sending data over serial port with Python
I am currently working on software bootloader implementation and using Python to handle sending data from my PC and receiving acknowledgement signals. Problem that I stumbled upon is that I am getting ...
0
votes
2
answers
89
views
How to create an if statement with serial data?
How would I write the code so if I recieve 'hello' it runs a function?
import serial
ser = serial.Serial(port='/dev/tty.usbmodem11201',baudrate=9600)
while True:
value= ser.readline()
...
1
vote
2
answers
131
views
Why do any other baud rate than 9600 corrupt my serial communication from my python program to my elegoo uno?
I am working on a personal project that consists of synchronizing my addressable ws2811 light strip to Spotify. There is no real-time audio analysis. My python program reads a JSON file, and based on ...
1
vote
1
answer
105
views
pyserial-asyncio client/server in Python 3.8 not communicating immediately
I'm learning python and asyncio and after having success with asyncio for a TCP client/server I took my first stab at creating a serial client/server using pyserial-asyncio running in bash on a ...
0
votes
2
answers
250
views
Unable to read the full response coming over rs-485 from a Modbus device
I have been trying to communicate with a I-7000 IO module device that supports Modbus. In general I am able to successfully send commands such as writing to a coil or reading a coil but I face one ...
0
votes
1
answer
554
views
Failing to get response from serial port using pyserial
I'm trying to connect to a device using a serial port. I tried two ways – 1) pyserial in Python and 2) PuTTY. I managed to connect to the device and use it, using PuTTY. However, in Python I can only ...
-1
votes
1
answer
102
views
Sending dictionary value with hex numbers over serial in python
I have a dictionary with commands (ASCII with extended characters and hex numbers), that should be sent over serial to a microcontroller.
But I'm not able to get the right format for the value to be ...
1
vote
0
answers
112
views
Losing bytes over PySerial.write()
I've been consistently running into a problem when running some basic code using the PySerial library in Python.
Specifically, when I use the write function given by PySerial, I lose bytes of the ...
1
vote
1
answer
150
views
Serial.read in python is losing data
I wrote the function below to read data from a serial port. When I call it to read 33 bytes, it stops reading halfway. The bytearray msg returned contains only the first few bytes, the rest is lost. ...
0
votes
0
answers
159
views
How to reset a COM Port through python program
I am using a pymodbus library to fetch data through modbus protocol. I am using a MOXA Nport 5150 RS485 to Ethernet converter for fetching data through Real COM Mode in Windows Server 2022. For a ...
0
votes
1
answer
70
views
Pyserial and fft
I want to read real time data from my arduibo, plot it in time domain and then do fft of that data and plot that (frequency domain) but I have no clue how to do it.
can’t seem to transfer data array ...
0
votes
0
answers
39
views
Minicom Not Exiting Cleanly in Python Script, Blocking Access to Serial Port for Subsequent Operations
I am working on a Python-based testing script for an OBU board accessed via /dev/ttyUSB0. The script tests various peripherals like Bluetooth (/dev/ttyLP1) and GNSS (/dev/ttyLP3) using separate ...
0
votes
0
answers
26
views
Closing port is not working effectively in pyqt app
I run this function on a buttton click. When I try closing the port I do not get any error, but by trying to connect to port one more time, I get this erro "Cannot configure port, something went ...
1
vote
0
answers
54
views
How to check Serial Write is complete in Raspberry Pi Python
Hi In my Project my raspberry pi act as a server and whenever the data came from the tcp client it is writing the same data in Serial Uart but when doing write operation in Serial Uart some character ...
1
vote
0
answers
382
views
Changing Serial Port Parity at Run time Python Serial
Hi i am working with python serial project i want to change the serial port parity value at runtime it is not working properly especially in odd parity mode it is not sending correct data
import ...
0
votes
1
answer
98
views
How to regulate two way serial communication between python and arduino?
My question is kind of general, so I haven't included any code here. I am working on a project to control hardware and read sensors with an arduino board via a Python/tkinter interface on a PC. The ...
1
vote
0
answers
68
views
Problem with pymodbus Modbus RTU (Serial) between PLC with NUL values?
I am trying to get data from my PLC to my PC(Python).
Currently I'm using Modbus RTU Serial communication with pymodbus.
But there are some problems with the sent/received data, and I don't know if it'...
1
vote
0
answers
109
views
The COM port is connected with pySerial but doesn't return data
I'm trying to use the pySerial library to access an FPV controller through the COM port. I have this code:
port = '/dev/cu.usbmodem0x80000001'
baudrate = 115200
import serial
import time
def ...
0
votes
0
answers
54
views
Linebreaks (CRLF) at beginning of line read from serial port via PySerial
I am trying to write commands and read responses to/from a serial port (RS232) on a laboratory pump. I have the pump connected to my PC via a USB-to-serial adaptor, and have been able to send commands ...
1
vote
1
answer
130
views
denied access to com port 5
I am trying to write a python script that receives serial input from an Arduino (with servo and ultrasonic sensor) on com5 to plot a radar like graph. I have done everything I have found on forums ...
0
votes
0
answers
175
views
Pyserial 'Access Denied' Error when using shared COM port
I am currently running a python program where pyserial reads incoming serial data to then output given signals with an Arduino using pyfirmata based on that data received. However, this data needs to ...
1
vote
0
answers
66
views
Adafruit gps breakout output encoded bytes not NMEA sentences
Using python 3.7, and pyserial readline on an Adafruit GPS breakout only outputs encoded byte data. How do i decode? It is not utf-8, or ASCII.
Here is a sentence:
b'[}\xc5\xc5\xf5\x9d\x9d\x8d\x9f\x8d\...
0
votes
0
answers
54
views
How to diagnose a serial communication crash that happens randomly and very seldom?
I'm connecting to a Lakeshore 336 Temperature controller from Linux Mint via pyserial. My app works relatively well and has operated for months at a time without error. However, it sometimes happen ...
0
votes
0
answers
47
views
Python randomly stops writing to file
I am reading from serial ports and writing the output to a text file. Yet no matter where I put cal, the program will stop reading from it or writing the output after a few seconds. The mm and light ...
0
votes
0
answers
300
views
Serial Commands for Mettler-Toledo FiveEasy Plus pH meter
I am trying to create an automated setup for measuring pH values of solutions. As part of this, I will interface with a Mettler-Toledo FiveEasy Plus pH meter using a RS232-USB cable connected to my PC....
0
votes
0
answers
75
views
pyvisa equivalent for serial.serial.rts=False
I have a specific instrument that needs to deassert the RTS line before communication can work. On an old script I was doing a basic serial.serial.rts=False. What is the equivalent with pyvisa?
I ...
0
votes
1
answer
36
views
Communication problems with pySerial over RS-232
I want to use pySerial to communicate with an Agilent 33250A using the built in RS-232 port. I went through the RS-232 configuration in the user manual and wrote the following code, which should set ...
-2
votes
1
answer
147
views
Problem with getting info from qrcode scanner via UART on python
I have qr and bar Code Reader GM875. I connected it to raspberry pi 4 model b via uart, and wrote python code to get result, but it don't work correctly. from my script i get wrong data bytes like ...
1
vote
1
answer
83
views
Arduino and Python Pyserial communication
I am trying to write a code that will allow me to send output to my microcontroller (Sparkfun Redboard) using Python code.
I want to pass different variables (CMJ or SJ) I want the built-in LED to ...
0
votes
0
answers
22
views
PySeriel - Accept (write) confirmation prompt from network sensor
I'm working on collecting a few common configuration steps for jumping network sensors via the console port.
Most of what I'll tried is working great, however I have noticed that if I send a command ...
1
vote
0
answers
49
views
Error on not refreshing the values in GUI from Tkinter
I am an absolute beginner for coding and I'm currently trying to design a turbine performance display using an Arduino Uno that will communicate the voltage reading using the input of pin A1.
This ...
0
votes
1
answer
38
views
PyCharm remote deployment with screen affects serial interface
I have a flask app.py that I'm developing on my local machine.
The flask app uses a serial interface (pyserial) that is connected to a remote machine.
I setup PyCharm for remote deployment on the ...
1
vote
0
answers
66
views
Python: detect regularly disconnecting faulty USB device and reinitialize instance
I have a USB device that sometimes sends serial data through USB port. Issue is that the device is faulty and sometimes for no reason it disconnects and connects again to PC. Not too large of an issue,...
1
vote
1
answer
72
views
Python serial receives data packets at a lower rate than they are being sent
I set up a test where two uart-to-usb adapters are connected together. I send 14 byte data packets at a rate around 100 Hz. The receive thread only seems to be able to operate up to around 60 Hz ...
0
votes
1
answer
150
views
Python serial send byte array with byte values
I would like to send such array for example via pyserial:
[49, 56, 48] or [82]
I tried such solution before sending:
print(list(str(180).encode()))
And it gives me array as I want. But when I tried ...
0
votes
2
answers
201
views
Strange Python issue
I use Win 10, I was trying to connect Python to Arduino using serial.Serial, and it gave an attribute error. I think this error is fixed, but now it says:
Also, Arduino doesn't connect, I am in ...
1
vote
2
answers
1k
views
Cannot interrupt uboot "Hit any key to stop autoboot:" with pySerial
I have a python script that is supposed to run a Linux update on an iMX6 device. I can reboot Linux via serial connection. I can see the device rebooting (console output is transferred). However, when ...
0
votes
1
answer
142
views
PySerial write not respecting baudrate on Mac and Linux (but it does on Windows)
I'm attempting to write a byte stream to a serial device (EDIT: connected via USB) using PySerial in order to upload a file. The device manufacturer recently switched from a Teensy-based board to a ...
1
vote
0
answers
79
views
COM Port not opening when running as .EXE using Pyinstaller
I have a Python application that opens a serial connection to a COM port. This COM port is a USB connected to some external hardware. When I run the application from the terminal, it works as expected....