This was the problematic serial question.

*From:*Doug Basberg [mailto:dbasb...@comcast.net]
*Sent:* Friday, January 30, 2015 5:29 PM
*To:* 'tu...@python.org'
*Subject:* doing rs232 serial with binary data ?? with pyserial??

Hello group;

I am new to python and worked mostly in C & C++ (and assembly). I do embedded controls and usually use the internet or LAN to log data and do controls.

So, in Python I found pyserial and wish to use it to send binary to controlled devices (in this case to a Modbus protocol solar charge controller (TriStar TS-60).

In C++ I would setup ‘structs’ or class attributes to hold the byte oriented commands and controller responses and then send them to rs232 as binary. I do not see how to do that with pyserial.

What I need is to send and receive binary (not strings) over rs232. In this case from/to a Raspberry Pi (RPI) controller to/from the solar charge controller. The RPI runs apache server to handle the network.

Any suggestions will be greatly appreciated. I have been using Python2.7 so far.

Thanks

Doug



_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to