Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mbusd doesn't work via systemd #67

Closed
ddokupil opened this issue Oct 4, 2020 · 2 comments
Closed

mbusd doesn't work via systemd #67

ddokupil opened this issue Oct 4, 2020 · 2 comments
Labels

Comments

@ddokupil
Copy link

ddokupil commented Oct 4, 2020

At my configurations, both RPI3 with openhabian ands NanoPI mbusd works fine when executed by
$sudo mbusd -L/tmp/mbusd.log -p /dev/ttyUSB0 -s 9600 -P 502 -d -v9
but fails when started as a service with no error indicated:

Oct 04 13:41:59 openhab mbusd[6494]: 04 Oct 2020 13:41:59 conn_open(): accepting connection from 192.168.1.196
Oct 04 13:42:00 openhab mbusd[6494]: 04 Oct 2020 13:42:00 conn_close(): closing connection from 192.168.1.196
Oct 04 13:42:01 openhab mbusd[6494]: 04 Oct 2020 13:42:01 conn_open(): accepting connection from 192.168.1.196
Oct 04 13:42:02 openhab mbusd[6494]: 04 Oct 2020 13:42:02 conn_close(): closing connection from 192.168.1.196

But my modbus SW shows timeout.

My config file:

sudo nano /etc/mbusd/mbusd-ttyUSB0.conf

# Serial port device name
device = /dev/ttyUSB0
# Serial port speed (Folow on your PLC or Modbus Device config)
speed = 9600
# Serial port mode (Folow on your PLC or Modbus Device config)
mode = 8e1
# RS-485 data direction control type (addc, rts, sysfs_0, sysfs_1)
trx_control = addc
# Sysfs file to use to control data direction
# trx_sysfile =
############# TCP port settings #############
# TCP server port number
port = 502
# Maximum number of simultaneous TCP connections
maxconn = 64
# Connection timeout value in seconds
timeout = 60
######### Request/response settings #########
# Maximum number of request retries
retries = 3
# Pause between requests in milliseconds
pause = 100
# Response wait time in milliseconds
wait = 500

@3cky
Copy link
Owner

3cky commented Nov 28, 2020

Hello @ddokupil, sorry for such a late response.

mode = 8e1

Are you sure you need 8e1 and not 8n1 mode here? You wrote it works fine when you run mbusd from the command line with default mode which is 8n1.

@stale
Copy link

stale bot commented Jun 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 2, 2021
@stale stale bot closed this as completed Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants