Modbus and Arduino

I think you are going at this wrong.
You know openHAB works okay with Modbus, you have it working with another device,
You know your arduino worked with Modbus, you had it working to some other PC program.
So more than likely you just had some small setting wrong. Who knows, you kept your setting secret.

Also reminder that you cannot have Modbus and ordinary serial share the COM4 port.

You would need to link a String type Item to the serial binding.
To get it working, look in openhab.log an events.log to see what is happening.
When it is working, put the String Item on your sitemap as a Text Item.

Hello. I understood, why Openhab don’t work with arduino. Because in arduino library in modbus slave you need read all register all at once. Openhab can read registers one by one. I create test project on STM 32 and it’s work
Now I have other problem. I installed Openhab on Raspberry 3 on clean raspberry system and I setup it’s from teamViewer by remote. I use USB-485 devise and I don’t understand how I can setup Serial Port in Raspberry

openHAB Modbus binding will read between 1 and 120 registers at once, depending how you set it up. How you chose to set it up before was kept secret.

What are you trying to do with serial, send data to openHAB? What part are you having trouble with?

Yes. But how I can set modbus thins if I need read for examle 10 parameters in 10 registers at the same time?

in the Serial Port Configuration I need write number and name port, which I use. In Windows I write COMx, but in RPI I need /dev/ttyUSB0 or /dev/ttyAMA0 and etc. How can I define it?

That’s straightforward. With openHAB Modbus binding, you would define a Serial Bridge Thing, a Poller Bridge Thing that covered your range of registers, and ten data Things that referred to your “parameters”.
It’s all in the docs, examples at bottom

But you’re not using Modbus.

Yes, that’s right. So, what have you actually got connected to your RPi, GPIO wires or a USB dongle or an add-on board? Have you looked at any other threads in this forum about serial ports?

This might help