OmstNET released to GitHub


#1

Python OmstNET for Linux

I have posted OmstNET Python3.4 for Linux to GitHub.

OmstNET communicates in ASCII mode over serial ports in Linux. I have tested it at 115,200 on both hardware and two different USB serial port devices under Linux Mint 17.3 on an AMD A10 PC. Refer to the ReadMe.pdf file for information on running the software along with some code samples and example gnome terminal session printouts.


#2

Thank-you for this. Awesome stuff.


#3

I have binary mode working but am still messing with crc calculations and trying to predict the device baud jumpers and system options bits from the response packets. The unit sends a nak 2 error in response to a command with the wrong crc. I should be able to use the crc it delivered in the nak to pick apart it’s system options settings, ie was it initialized with 0 or -1, is it ccitt or crc16, and forward or reverse. Not working yet, by almost there.

The binary transfer is a bit inefficient in Linux because at least my version does not allow mark and space parity making me twiddle the parity mode between odd and even to meet the transmit requirements for the 9th bit. I do see that there is at least one avr usb to 9 bit converter out there which requires sending 16 bits over usb for each serial byte sent so that the msb can contain the 9th address flag bit. However, at least I can test binary mode.


#4

I have put the binary mode updates on GitHub. I tested by running the verify_commands function in OmstTST.py. I changed the crc and binary mode jumpers on my B3000 and cycled power to check out the 4 possible combinations.

Refer to ReadMe.pdf for particulars. However, my Linux Mint 17.3 does not support CMSPAR so I have to call termios to change the parity bit for each byte in the command to keep the address parity bit a mark, and the data parity bit a space.

Thinking about it, if I were to make a USB to 9 bit converter specifically for Mistic, I would have the PC send Mistic ASCII packets. The USB to serial converter would parse the Mistic ASCII packets, and convert them on the fly to Mistic binary packets and send them out the 9 bit UART.


#5

Bought a B3000-ENET off of EBAY. Plugged it in to my SNAPB12M rack, powered it up, set IP address, and have successfully sent a ‘POWER UP CLEAR’ message and parsed the response. So it may be baby steps, but I am now embarking on a Python interface via OptoMMP as time allows. It will give me a chance to move up from serial and learn some sockets stuff in Python.


#6

Hi Doug, it’s awesome to hear you’re getting into OptoMMP with Python, that’s what I’ve been working with this past week! Here’s a link to my in-development github repo that has some scripts, getUptime.py, eRead.py, and eWrite.py, that might help show you one way of doing things. I’ll post them with more substantial documentation soon, but until then feel free to ask any questions.
I hope it helps!


#7

I have the ReadQuadlet, ReadBlock, WriteQuadlet, and WriteBlock working in my Python code. I got some failures reading values such as:

  • FFFF F030 0080 20 S-ZT Device’s part number (string)
  • FFFF F030 00A0 10 S-ZT Firmware version date
  • FFFF F030 00B0 10 S-ZT Firmware version time

so I launched IoManager.

It turns out that not all memory addresses described in the OptoMMP users guide are implemented in my B3000-ENET.

I haven’t found documentation for the B3000-ENET that specifies which memory map values are in fact supported. I would think this would be available somewhere. I would not expect to have to iterate through the entire OptoMMP spec trying each address and looking for failures to determine this.