OmuxNET Python3.4 now on github

I have put OmuxNET on github under MIT license. See:

It is a Python3.4 implementation of the Optomux Protocol for Linux serial ports. I use Mint 17.3. Haven’t tested on other flavors of Linux. I mainly wrote it to gain some proficiency in Python and learn some Linux serial stuff, and because as a retired software engineer I am tired of working on the house.

On my machine I can launch it in a bash shell as:
python3.4 -i OmuxNET.py

Refer to the ReadME.pdf or look at the end of OmuxNET.py for the main section to see a quick example of how to run it.

Now I will move on to Mistic as I have time.

1 Like

I have most of the mistic command structure in place, including the checksum, 4 types of crc, and ASCII/binary mode. I have verified the generated packets for maybe 20 or so commands against the examples in the manual. I may structure the return values in tuples similar to what I did in the Optomux code.

The binary mode looks like a challenge due to the use of a 9 bit serial word to flag the address bit on transmit. But I’ll likely have all the ASCII stuff working on my limited hardware in a week or so.

This is just an example of sending power_up_clear and identify_type commands to my B3000 at address 0.

mn = OmstNET()
ttys = mn.tty.list_ttys()
mn.tty.open(ttys[1],115200)
for i in range(4):
print(mn.power_up_clear(i))
print(mn.identify_type(i))

opened ‘/dev/ttyUSB0:115200,N,8,1’
(‘A’, ‘A41\r’)
(‘A’, ‘B3000 (digital address) Multifunction I/O Unit’)
(‘A’, ‘A41\r’)
(‘A’, ‘B3000 (digital address) Multifunction I/O Unit’)
(‘A’, ‘A41\r’)
(‘A’, ‘B3000 (analog address) Multifunction I/O Unit’)
(‘A’, ‘A41\r’)
(‘A’, ‘B3000 (analog address) Multifunction I/O Unit’)

1 Like