So I have developed a Win32 C++ program which basically communicates over RS232 interface to receive some data from a legacy hardware. I'm trying to port this application onto a RaspberryPi, so I first wanted to check the feasibility of doing this. I have already checked with PySerial, however the low level controls that are required by my Applications are not provided by PySerial, for example, there is an IOCTL setting which sets the IOCTL_SERIAL_LSRMST_INSERT using the following C++ code:
Code: Select all
lsrmst[0] = 255;
DeviceIoControl(file,IOCTL_SERIAL_LSRMST_INSERT,lsrmst,1,NULL,0,&junk,(LPOVERLAPPED) NULL);There is no API in PySerial to do this at this point in time.Enables or disables the placement of line status and modem status values into the regular data stream that an application acquires through the ReadFile function.When this line-status and modem-status data placement mode is enabled, status values are preceded in the data stream by an escape character. The user-definable escape character is set by the IOCTL_SERIAL_LSRMST_INSERT control code.
If I want to use these kind of advanced settings on the serial port, which programming language/APIs would be the best to take to go about programming it. TIA!
Regards,
nachiketh