SequentMicrosystems / megabas-rpi

Command Line, Python lib, Node-Red and CODESYS driver for Building Automation Card
https://www.sequentmicrosystems.com
MIT License
8 stars 1 forks source link

Need documentation on accessing RS-485 bus from pi #1

Closed cmc0619 closed 3 years ago

cmc0619 commented 3 years ago

Can't figure out how (or if possible) to access RS-485 bus from raspberry pi as a device.

alexburcea2877 commented 3 years ago

Hi,

It is possible to access RS-485 bus with the Raspberry USART port. 1) You need to update the board firmware, instructions here: https://github.com/SequentMicrosystems/megabas-rpi/blob/master/update/README.md 2) Disable modbus communication with command "megabas 0 rs485wr 0 9600 1 0 1" , assuming that you already install the megabas command ( https://github.com/SequentMicrosystems/megabas-rpi/blob/master/README.md) 3) place 2 jumpers on the pindeader in the place marked with "RXD" and "TXD" . Now you can use any tool or application to read and write data thru RS485.

Let me know if something is unclear.

În vin., 18 sept. 2020 la 20:20, cmc0619 notifications@github.com a scris:

Can't figure out how (or if possible) to access RS-485 bus from raspberry pi as a device.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SequentMicrosystems/megabas-rpi/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3ZCWRTOHOCI4LBR3MRPCTSGOJHJANCNFSM4RSI5U3Q .

cmc0619 commented 3 years ago

I'm on the right track then! I have done all this. Does it appear as a device? Like a RS-485 USB dongle shows up as /dev/USB0.

alexburcea2877 commented 3 years ago

No, is just connected to the Raspberry USART port (GPIO14, GPIO15), you have to enable the USART from the "raspi-config" and use-it , some reference you can find here: https://www.electronicwings.com/raspberry-pi/raspberry-pi-uart-communication-using-python-and-c

În lun., 21 sept. 2020 la 23:13, cmc0619 notifications@github.com a scris:

I'm on the right track then! I have done all this. Does it appear as a device? Like a RS-485 USB dongle shows up as /dev/USB0.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SequentMicrosystems/megabas-rpi/issues/1#issuecomment-696346872, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3ZCWVSVNKFFCTWTDEIMADSG6XVNANCNFSM4RSI5U3Q .

cmc0619 commented 3 years ago

I understand now! Thanks!