How to connect a ttl to rs485 generic adapter with a raspberry pi 4 and node red (modbus)

Hi all, how are you?

I'm trying to connect a raspberry pi to a motogenerator controller through rs485 using a generic ttl to rs485 converter, this converter has 4 input pins on the ttl side: DE, RE, DI and RO, DE and RE are the pins to control direction of the data but I can't see any configuration on the modbus nodes to assign those pins to any gpio on the raspberry pi.

Is anything that I can use to confugure those signals or is better to buy a usb to rs485 adapter?

Thanks in advance for the help.

Welcome to the forum @vra

Unless the device comes with instructions for setting up on a pi then it would certainly be easier to use a usb adaptor, which should just work.

And if you choose for an other RS485 have a look for one that has automatic switch between RX and TX.

Thanks @edje11 and @Colin for the help, in fact I was viewing a rs485 hat for a raspberry and they use a secondary and dip switches to enable/desable write/read on the interface.