Comments (11)
Hmm, could you provide some details about your environment? OS, hardware, etc.
from mbusd.
I have differents setups...
A couple x86 machines and another Raspberry2, all running Openmediavault, debian (Kernels 4.4, 3.16 & 4.04). Tryied with CH340 and PL-2303HX usb to 485 adapters.
In all setups comms are ok with 8N1 devices. When I try -m 8O1 or -m 8N2 to access other devices, is not working; instead (no mather -m option) always could stablish comm with 8N1 devices....
from mbusd.
Are you sure RTU endpoints are configured properly for 8O1/8N2 comms? At least 8E1 should work, as reported by other users.
from mbusd.
I tryied it with the adaptor in windows using qmodbusmaster and I can communicate with each device with it's config, so it seems the endpoints are correctly configured.
Will do more tests today...
from mbusd.
I tested again with some adapters and mode always seems to be set in 8N1. I tested a device with integrated bridge (TCP2RTU) and it works as expected when configuring parity and stop bits. No luck with mbusd.
Is there any position for -m parameter to be used? I mean, first parameter? last one? after or before -p?
from mbusd.
No, there is no specific position for -m option. BTW, mode string is checked for validity, so you could provide some invalid mode string (like -m 8N3) to check option is recognized at least.
from mbusd.
Yes, I tried with invalid strings and the checking is working ok.....
But after '-m 8N2' or '-m 8E1' seems only talking with 8N1 endpoints, not 8N2 nor 8E1....
from mbusd.
@hammondb4 made some fixes, please test tty mode setup using mbusd master version and PL2303-based adapter (not CH340 because it seems its driver still lacks support of parity/stop bits, see https://github.com/torvalds/linux/blob/master/drivers/usb/serial/ch341.c#L363).
from mbusd.
@3cky Sorry for the delay. I'll be trying it this monday with PL2303 adapter. Will redownload master src and recompile it again and report it.
from mbusd.
@3cky Ok. Tested it with PL2303 adapter and 8N2 mode and now it's working fine. Seems the problem it's solved using this adapter. Thanks @3cky
Also, could someone recommend one nice usb adapter? Tried CH340 and PL2303 and both seems similar, despite the mode issue. Any other options?
PS: Also want to ask about your config about retries (-N), pause (-R) and wait (-W) parameters; which configs are working better for you? I have one slower device wich is giving me problems...only 19200 speed. It's ok with lower pause time and higher wait times?
from mbusd.
@hammondb4 great, thanks for testing! So I close this issue and will release 0.2.3 within the next couple days.
About adapters - personally I tend to avoid using CH340 in production, just because it also known as "the worst usb serial chip in the world". :) PL2303 performs much better, if it's not poor chinese fake.
Main tunable config value is response wait time, it seems its default value (50 ms) is too small in many cases, so 500-1000 ms is more suitable.
from mbusd.
Related Issues (20)
- Error when building on Raspberry Pi HOT 2
- Docker build failing HOT 1
- Docker-compose.yaml file ? HOT 4
- segv on high frequent register fetch
- usr/bin/mbusd: line 1: syntax error: unexpected "(" when running docker
- help
- Support for 43 / 14 (0x2B / 0x0E) Read Device Identification.
- 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.