Comments (7)
Many thanks for the quick turn around.
Will try to test a fix next week.
The actual system in question is several thousand miles away...
thankfully ssh makes that not too much of a problem!
from mbusd.
Apologies for the late response - the well the device was on was shut for a several weeks. System turned off.
We've been using the fix on some other sites and have not seen the original error messages there.
So i would vote to close the issue. Many thanks for the fast response and fix!
from mbusd.
One more datapoint...
We have also seen those errors with errno
set to EFAULT
eg.
mbusd[25373]: 30 Oct 2021 13:30:40 tty: error in read() (Bad address)
mbusd[25373]: 30 Oct 2021 17:38:18 tty: error in read() (Bad address)
from mbusd.
@AlexDavies501 thanks for the report! Could you provide some additional info about the software and hardware environment you're running? Kernel version, platform, etc.
from mbusd.
Hi.
Edited uname -a
output (removed the computer name) below:
Linux datahub 4.1.15-g33f8ed0f5cb3 #4 SMP PREEMPT Tue May 1 13:54:29 MST 2018 armv7l GNU/Linux
The hardware is a Technologics 7970 embedded computer. Has two serial ports. We run mbusd against one of these.
/usr/local/bin/mbusd -d -v2 -L - -c /usr/local/etc/mbusd/mbusd-ttyS1.conf -p /dev/ttyS1
The config file now looks like:
# Serial port device name
device = /dev/ttyS1
# Serial port speed
speed = 9600
# Serial port mode
mode = 8n1
# RS-485 data direction control type (addc, rts, sysfs_0, sysfs_1)
trx_control = addc
# Sysfs file to use to control data direction
# trx_sysfile =
############# TCP port settings #############
# TCP server address to bind
address = 0.0.0.0
# TCP server port number
port = 12502
# Maximum number of simultaneous TCP connections
maxconn = 32
# Connection timeout value in seconds
timeout = 60
######### Request/response settings #########
# Maximum number of request retries
retries = 0
# Pause between requests in milliseconds
pause = 100
# Response wait time in milliseconds
wait = 500
With the above config i see a dozen tty: error in read() (Resource temporarily unavailable)
errors for today, and 3 or 4 for each of the previous 4 days.
Originally, when we saw a lot more of these errors (several hundred per day), the config had retries=3
and wait=1000
.
There are 3 regular callers that create Modbus master connections to the TCP side of mbusd. These tend to do a poll of a handful of registers every 5 seconds. Also some occasional scripts manually called from the cmdline that make connections too.
There are two slave devices on the 485 network: a gateway device and a pressure transmitter.
from mbusd.
Hi, thanks for the info!
I've pushed some fixes regarding handling EAGAIN read() result. Сould you test mbusd compiled from the latest sources?
from mbusd.
Glad to hear the problem is sorted out! So I'm closing this issue, please feel free to reopen if needed.
from mbusd.
Related Issues (20)
- Error when building on Raspberry Pi HOT 2
- How to compile in mips architecture HOT 1
- How to read data from multiple RTU slaves? HOT 1
- service stops working after several hours - looking for help HOT 7
- Support more complex device names HOT 1
- /dev/ttyUSB0 is starting like /dev/ttyS0 HOT 1
- Crash due to missing `logw()` argument HOT 3
- '/W' requires an argument HOT 1
- version 0.5.1. HOT 1
- Modbus RTU - 6 Digit Holding Register HOT 2
- Missing device is retried forever [and blocks anything else] HOT 6
- publish docker image to ghcr & auto-build in github actions
- Add support to modbus ascii
- /dev/ttyS0? HOT 5
- Help with usb to RS485 - SH-U11 HOT 1
- CRC Enable/Disable HOT 3
- mbusd can support modbus function 20 (0x14) Read File Record and function 21 (0x15) Write File Record ..
- Using IOCTL for GPIO control HOT 4
- Make use of Linux RS-485 Support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mbusd.