This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

M-Bus (Meter-Bus) library and examples
#16
Hi everyone, 
i'm trying to following this guide and the one on the main site https://openrb.com/m-bus-integration-in-lm/ to measure water consumption.
We have bought Tecbase Mbus 10 RS232-MBus gateway and we have connected it on our LM5 Lite (i.MX6) SW: 20210521. We are not using the external RS-232 USB converter but the internal RS-232 port of LM5 near the second RS-485 port. We have connected LM5-Tx to MbusGW-Rx and viceversa and both the GND wires.
Following the guide, i can't even scan the bus or getting communicating with it. 
So i've tryied some logging with a scheduled script, changing baudrate from 300 to 9600 but nothing happens:
Code:
if not port then
  require('serial')
  port = serial.open('/dev/RS232', { baudrate = 2400 })
  port:flush()
  line = ''
end

char, err = port:read(1, 60)
log(char, err)

But the request always goes in timeout, getting a response like this:
Code:
* arg: 1
  * nil
* arg: 2
  * string: timeout

I have tryed enabling both RTU 2 and 3 as '/dev/RS232' setting the connection as 'Full-Duplex', but nothing changed.

Can anyone further help or have some ideas on how debug this?
Reply


Messages In This Thread
RE: M-Bus (Meter-Bus) library and examples - by Zen - 17.01.2023, 16:56

Forum Jump: