-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UART/network interaction #72
Comments
@sbirrari thanks for submitting a detailed issue. A few questions:
|
Thank you for reviewing my issue!
|
@sbirrari Thanks for confirming. We'd like to reproduce this on our end. Can you please provide an example sending program? And perhaps some info on how you're using the PC to send the data - for example, are you using a USB-to-serial? |
I can provide an executable for Windows written in Delphi and its source code, would it be ok for you? |
We will try to reproduce the problem writing and using a sending program that can run under Linux. |
Attached the source code of a simple test sending program. At the moment it runs only on Windows, it was the faster solution to send a test program, we need more time if a Linux version is absolutely needed. The executable is a console program, you can launch it using the syntax "TestUart [COM_port]:[serial parameters]", for example "TestUart COM2:38400,n,8,1". Using this executable the problem happens from 38400 baud. |
@sbirrari ok, we'll try to reproduce this. We'll get back to you if we run into issues |
@sbirrari should have some updates on this within the next week |
Hi @sbirrari, we've been able to reproduce your issue. Along with some additional testing, we've came to the conclusion the overrun is caused by an unknown issue in the First test - screenAs the first and simplest test, we used a serial tool on a PC to send data, and observed it on the Omega2 using the ✅ We observed no lost data when the network was reset. See issue-72-testing-screen.pdf for full details. Second Test - testserial C programSecond, we wanted to reproduce the behaviour you reported. Two versions of ✅ We confirmed normal operation at 9600 baud when pulling out or inserting the ethernet cable. Third Test - Python programGiven the two data points above, we wanted to rule out any issues with the ✅ This program was tested at 9600, 115200, 230400, and 460800 baud rates. In all cases, there was no data loss when pulling out or inserting the ethernet cable See issue-72-testing-c-python.pdf for details on the C and Python testing. RecommendationsWe recommend looking into the Python Program DetailsUse the stable v0.3.4 firmware, run the following commands to install the required packages:
Here is the source code, the baudrate can be adjusted by changing line 35:
|
@greenbreakfast, thank you so much for the detailed tests and analysis. |
@greenbreakfast
Launch the TestUart program, then the Python one (let's call it PySer). Please take in consideration that the issue can be at the driver/kernel level. |
@sbirrari with this new python program we were able to confirm there is data loss if the ethernet cable is connected or disconnected when running over 9600 baud. @jempatel can you please try debugging this on the kernel driver level? See the attached report for testing details and the previous comment in this issue for the updated python program source. You'll need to be running the stable v0.3.4 firmware and run these commands to install the python dependencies issue-72-pyser-testing-report.pdf Let me know if there's anything else you need. |
@greenbreakfast, @jempatel thank you again for your interest in this issue. |
@greenbreakfast, @jempatel, have you any update on this issue? |
Board: Omega2S+
Carrier: Omega2 PRO + Ethernet expansion
Image: onion_omega2-22.03.5-20230925.bin
In my project I extensively use the serial port to communicate between the board and an external data acquisition device.
I report small data losses when the network connection state changes.
In detail in my test:
Just after the command ends the communication is perturbated and some data is lost.
The same thing happens for example removing and inserting again the nework cable.
Beyond the checks made by the receiving program itself, I can also confirm the data loss from the "overrun" counter of the "serial_icounter_struct" received issuing a TIOCGICOUNT ioctl, that increments after the fact.
I performed this test because I saw the same issue using the omega2pro-v0.3.4-b257.bin image (OpenWRT 18.06), that is the image on which I developed my project.
I provide the source of the receiving program
testserial.txt
Do you know what causes the problem and can maybe suggest a workaround?
The text was updated successfully, but these errors were encountered: