Giter VIP home page Giter VIP logo

Comments (4)

testuser7 avatar testuser7 commented on June 28, 2024

You can try: im871a:CMD(nc -lk 192.168.1.1:5001)

from wmbusmeters.

weetmuts avatar weetmuts commented on June 28, 2024

I think that socat might work with the right setup.

The thing is that when you override the wmbus device with a CMD, it blocks outgoing messages to the dongle
also it ignores and serial speed settings etc.

This is because the override feature was developed to perform testing with simulated dongles.
It just happened to work for the rtlwmbus/rawtty since they a pure input feeds anyway.

However the im871a and the other hardware dongles are two way protocols. You tell the dongle what kind of radio messages you want to listen to, transmit a read-out message to C2 meters, etc.

The question of how to run wmbusmeters on one device and connect the dongle to another device has come up before. It is an interesting and valuable problem to be solved.

Please try socat first!

from wmbusmeters.

PovilasID avatar PovilasID commented on June 28, 2024

Yah I tried socat first just hoping it will magically work. It did not, so I came here to check maybe somebody has already had this issue and solved it.
Socat has a bunch of options and I successfully avoided learning how these dongles actually work, till now. I am going to try and do some debugging but if you have any hints that could narrow my scope I would greatly appreciate it though considering how much I do not know I do not expect to be successful... It is quite likely I am just going to take some raspberry pi like device that can be USB powered plug that into router and try to run this container on it. Either way, this will not be fun.

from wmbusmeters.

spectrality-github avatar spectrality-github commented on June 28, 2024

I have similar setup just with wired Mbus. My Mbus master USB adapter (from AliExpress) connected to OpenWrt device with ser2net running. And I'm waiting for native Mbus TCP support. #1040

Solution how to access remote serial port using socat is described here: https://www.lucid-control.com/accessing-usb-io-module-network-linux-socat/

You just need run socat before wmbusmeters
socat -d -d pty,group-late=tty,link=/root/ttyMBUS0,mode=660,rawer,echo=0,b2400,waitslave,ignoreeof tcp:192.168.x.x:2003 &
And use /root/ttyMBUS0 as device in wmbusmeters config.

But socat process will stop when ser2net is closing TCP connection by timeout or connection problems or when wmbusmeters is not sending data. And to restore connectivity you will need to restart socat and wmbusmeters

my ser2net config is:
2003:raw:30:/dev/mbusUSB0:2400 8DATABITS EVEN 1STOPBIT -RTSCTS LOCAL -XONXOFF

from wmbusmeters.

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.