RS485 configuration for FX30S - Modbus RTU

looking at running a Modbus master on the FX30S and would need to setup the interface properly.
I have found some similar topics but they are years old so doublechecking what is the correct procedure to get this going.

  1. Setup the UART to service RS485
    (from manual)
    can be:
    14—RS-485 Linux application (Note: Not available for UART 2)
    can be:
    1—UART 1 (Default if UART number is not specified)
    2—UART 2

Does this does all the setup or I also need to control the GPIO, for some reason I can only find the hardware guide for the FX30S WP85.

after setting as linux application, do you see a new port /dev/ttyHSL0 appear after reset?

yes, it works after reboot.
Are you aware of any example code for the Modbus RTU Master using this interface?

no, i don’t have.

Not sure if this helps, you can have a look:

How do you activate the internal termination resistor for the FX30S with the wp77?
Manual mention the wp85 GPIO which will not work on the wp77 as this GPIO is not on the sys definitions.

what is relationship to MODBUS?

I need the RS585 layer to work properly, until then there is no point to look at the top protocol implementation.

is that related to internal termination resistor ???

Yes, there should be an option to activate the internal resistor on the rs485 interface. At least this was mentioned on the manual for the wp85

I thought it was just a uart interface …

Where does it mention in wp85 product technical specification?
I cannot find it.

just for anyone else looking into this, following is the command used for activating the RS485 termination resistor for the FX30S: (FX30S user guide page 33): /sys/devices/platform/msm_serial_hsl.0/rs485_term 1

the script should be included in the /usr/bin folder