Git Product home page Git Product logo

Comments (11)

3cky avatar 3cky commented on July 1, 2024

Hmm, could you provide some details about your environment? OS, hardware, etc.

from mbusd.

hammondb4 avatar hammondb4 commented on July 1, 2024

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.

3cky avatar 3cky commented on July 1, 2024

Are you sure RTU endpoints are configured properly for 8O1/8N2 comms? At least 8E1 should work, as reported by other users.

from mbusd.

hammondb4 avatar hammondb4 commented on July 1, 2024

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.

hammondb4 avatar hammondb4 commented on July 1, 2024

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.

3cky avatar 3cky commented on July 1, 2024

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.

hammondb4 avatar hammondb4 commented on July 1, 2024

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.

3cky avatar 3cky commented on July 1, 2024

@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.

hammondb4 avatar hammondb4 commented on July 1, 2024

@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.

hammondb4 avatar hammondb4 commented on July 1, 2024

@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.

3cky avatar 3cky commented on July 1, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.