goburrow / serial

Go (golang) serial library for modbus
https://github.com/goburrow/modbus
MIT License
191 stars 90 forks source link

feature request: support for Linux RS485-specific ioctl() calls. #6

Closed jonseymour closed 7 years ago

jonseymour commented 7 years ago

Are there any plans to support the RS485-specific ioctl's that Linux provides?

(See, for example, https://github.com/jacobsa/go-serial/blob/master/serial/open_linux.go#L172-L176)

My use case is to use goburrow/modbus library on a BeagleBone with a MikroElektronika RS485 transceiver. My understanding at this point is that I will need to control the direction of the transceiver with a GPIO pin and that the driver will do that for me, provided I enable RS485 support with an ioctl() call and I provide the appropriate device tree overlay)

nqv commented 7 years ago

Thanks for your request. Defining serial APIs which this library depends on is in my todo list. Will try this weekend so you can use any serial libraries you want.

jonseymour commented 7 years ago

@nqv I am actually ok using goburrow/serial with goburrow/modbus, I just need it to support the linux-specific RS485 configuration in some manner. I'll probably create a patch that does what I need it do and send you a PR for your consideration

nqv commented 7 years ago

Looking forward to your PR. Thank you in advance.

jonseymour commented 7 years ago

See PR #9