Hi,
I have a Raspberry pi 4&5, with a RS485 CAN HAT (B) installed. I am trying to read the power usage from a Schneider 3355 iEM3355. I’ve enabled the spi interface and can verify that the serial ports are detected:
dmesg | grep spi
[ 7.091246] spi1.0: ttySC0 at I/O 0x0 (irq = 42, base_baud = 921600) is a SC16IS752
[ 7.171124] mcp251x spi0.0 can0: MCP2515 successfully initialized.
[ 7.172343] spi1.0: ttySC1 at I/O 0x1 (irq = 42, base_baud = 921600) is a SC16IS752
I have set the baurd rate 19200, No parity,1 stopbit, and slave address on the meter.
The problem is that I cannot get any response from the meter either with my python script or the modbus poll program (I’m wireed to port 0, but i have tried ttySC1 too).
mbpoll -m rtu -a 15 -b 19200 -s1 -P none -o 3 -v -r 3204 -B /dev/ttySC0
debug enabled
Set start reference=3204
Set device=/dev/ttySC0
mbpoll 1.0-0 - FieldTalk™ Modbus(R) Master Simulator
Copyright © 2015-2019 Pascal JEAN, GitHub - epsilonrt/mbpoll: command line utility to communicate with ModBus slave (RTU or TCP)
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type ‘mbpoll -w’ for details.
Opening /dev/ttySC0 at 19200 bauds (N, 8, 1)
Set response timeout to 3 sec, 0 us
Protocol configuration: Modbus RTU
Slave configuration…: address = [15]
start reference = 3204, count = 1
Communication…: /dev/ttySC0, 19200-8N1
t/o 3.00 s, poll rate 1000 ms
Data type…: 16-bit register, output (holding) register table
– Polling slave 15… Ctrl-C to stop)
[0F][03][0C][83][00][01][77][9C]
Waiting for a confirmation…
ERROR Connection timed out: select
Read output (holding) register failed: Connection timed out
– Polling slave 15… Ctrl-C to stop)
[0F][03][0C][83][00][01][77][9C]
Waiting for a confirmation…
^C— /dev/ttySC0 poll statistics —
2 frames transmitted, 0 received, 1 errors, 100.0% frame loss
I’ve Wired the A B G pins of the HAT to the D1 D0 and 0V pins of the meter.
I would appreciate any direction.
Thanks.