3

I don't know if I'm posting on the right place, I apologize if I’m not.

I have some trouble to use the RS-485 communication functionality of the Edgeport 8/s MEI (multiple electrical interface e.g. supports both RS-232 and RS-485) on Xbuntu 16.04.

Here is the system and some details:

The computer is partitioned with both Xubuntu 16.04 and Windows 7 Embedded. We're using an Edgeport 8/s to communicate with RS-485 device via Python. We have tested both RS-232 and RS-485 communication (configuration: half duplex, end bits, echo) on the Windows side without issue.
We have also tested RS-232 communications through the Edgeport on the Linux side without issue. To test RS-485 communication through the Edgeport on Xubuntu, I used a Python Script (using PySerial), however, I could not successfully communicate with the device.

I then went into a bit more detail and tried the following. I adjusted the Serial.rs485_mode attribute as follows:

Ser = serial.Serial(port='/dev/ttyUSB7', baudrate=9600, 
parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, 
bytesize=serial.EIGHTBITS, timeout = None )
Ser.rs485_mode = serial.rs485.RS485Settings(True,False,False,None,None)

When I run the script I get this error :

ValueError: Failed to set RS485 mode: [Errno 25] Inappropriate ioctl for device

This error occurs on the serial rs485 attribute line.

I was wondering about the edgeport driver on Linux, maybe it is bugged or just don't support RS485.

Any thoughts on this would be appreciated and useful.

Thanks,

J.V
  • 31
  • 2
  • hello, could you solve the problem? the same happens to me – Hector Oliveros Feb 21 '18 at 05:01
  • When I import serial.rs485 and use serial.rs485.RS485(port,baud,parity,stopbits,bytesize,timeout) instead of serial.Serial, then I can set the rs485 settings, but I still can't write commands to the 485 device. – Jake Gaston Aug 24 '18 at 14:33

0 Answers0