Difference between revisions of "Project:TecanWireProtocolProject"

From London Hackspace Wiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
 
The aim of this project is to understand the Tecan wire protocol so we can control the robot using and arbitrary client that has a serial port.
 
The aim of this project is to understand the Tecan wire protocol so we can control the robot using and arbitrary client that has a serial port.
  
Source code ''will'' be heere https://github.com/london-biohackers/python-tecan-genesis
+
Source code ''will'' be here https://github.com/london-biohackers/python-tecan-genesis
  
 
Aims of the project are
 
Aims of the project are

Revision as of 21:22, 5 June 2015

The aim of this project is to understand the Tecan wire protocol so we can control the robot using and arbitrary client that has a serial port.

Source code will be here https://github.com/london-biohackers/python-tecan-genesis

Aims of the project are

  1. connect to the machine over serial from a library (hardware handshake etc)
$ python tecan_stuffs.py 
The Tecan Reports FIRMWARE version:
AYM1@GENESIS-V1.61-07/2001A
  1. initialize the machine
  2. read the current position of the Lihi
  3. read the current position of the Roma
  4. control the Lihi
  5. control the RoMa
  6. handle collision condition from robot


We used portmon to dump the data from the serial port

59	0.00000335	RSPDRV.exe	IRP_MJ_CLEANUP	Serial0	SUCCESS		
60	0.01551789	RSPDRV.exe	IRP_MJ_CLOSE	Serial0	SUCCESS		
61	0.00006453	RSPDRV.exe	IRP_MJ_CREATE	Serial0	SUCCESS	Options: Open 	
62	0.00000782	RSPDRV.exe	IOCTL_SERIAL_PURGE	Serial0	SUCCESS	Purge: TXABORT RXABORT TXCLEAR RXCLEAR	
63	0.00000279	RSPDRV.exe	IRP_MJ_FLUSH_BUFFERS	Serial0	SUCCESS		
64	0.00000335	RSPDRV.exe	IOCTL_SERIAL_PURGE	Serial0	SUCCESS	Purge: TXABORT RXABORT TXCLEAR RXCLEAR	
65	0.00000223	RSPDRV.exe	IOCTL_SERIAL_SET_QUEUE_SIZE	Serial0	SUCCESS	InSize: 2048 OutSize: 2048	
66	0.00000223	RSPDRV.exe	IOCTL_SERIAL_GET_BAUD_RATE	Serial0	SUCCESS		
67	0.00000251	RSPDRV.exe	IOCTL_SERIAL_GET_LINE_CONTROL	Serial0	SUCCESS		
68	0.00000196	RSPDRV.exe	IOCTL_SERIAL_GET_CHARS	Serial0	SUCCESS		
69	0.00000223	RSPDRV.exe	IOCTL_SERIAL_GET_HANDFLOW	Serial0	SUCCESS		
70	0.00000196	RSPDRV.exe	IOCTL_SERIAL_GET_BAUD_RATE	Serial0	SUCCESS		
71	0.00000168	RSPDRV.exe	IOCTL_SERIAL_GET_LINE_CONTROL	Serial0	SUCCESS		
72	0.00000168	RSPDRV.exe	IOCTL_SERIAL_GET_CHARS	Serial0	SUCCESS		
73	0.00000196	RSPDRV.exe	IOCTL_SERIAL_GET_HANDFLOW	Serial0	SUCCESS		
74	0.00000810	RSPDRV.exe	IOCTL_SERIAL_SET_BAUD_RATE	Serial0	SUCCESS	Rate: 9600	
75	0.00000559	RSPDRV.exe	IOCTL_SERIAL_SET_RTS	Serial0	SUCCESS		
76	0.00000419	RSPDRV.exe	IOCTL_SERIAL_SET_DTR	Serial0	SUCCESS		
77	0.00000363	RSPDRV.exe	IOCTL_SERIAL_SET_LINE_CONTROL	Serial0	SUCCESS	StopBits: 1 Parity: NONE WordLength: 8	
78	0.00000223	RSPDRV.exe	IOCTL_SERIAL_SET_CHAR	Serial0	SUCCESS	EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13	
79	0.00000363	RSPDRV.exe	IOCTL_SERIAL_SET_HANDFLOW	Serial0	SUCCESS	Shake:1 Replace:40 XonLimit:2048 XoffLimit:512	
80	0.00000196	RSPDRV.exe	IOCTL_SERIAL_GET_TIMEOUTS	Serial0	SUCCESS		
81	0.00000196	RSPDRV.exe	IOCTL_SERIAL_SET_TIMEOUTS	Serial0	SUCCESS	RI:10 RM:0 RC:0 WM:0 WC:0	
82	0.00000335	RSPDRV.exe	IOCTL_SERIAL_PURGE	Serial0	SUCCESS	Purge: TXABORT RXABORT TXCLEAR RXCLEAR	
83	0.00000196	RSPDRV.exe	IOCTL_SERIAL_GET_BAUD_RATE	Serial0	SUCCESS		
84	0.00000168	RSPDRV.exe	IOCTL_SERIAL_GET_LINE_CONTROL	Serial0	SUCCESS		
85	0.00000196	RSPDRV.exe	IOCTL_SERIAL_GET_CHARS	Serial0	SUCCESS		
86	0.00000196	RSPDRV.exe	IOCTL_SERIAL_GET_HANDFLOW	Serial0	SUCCESS		
87	0.20741267	RSPDRV.exe	IRP_MJ_READ	Serial0	TIMEOUT	Length 14: 02 40 41 31 03 31 02 51 41 31 40 38 03 58 	
88	0.00004163	RSPDRV.exe	IRP_MJ_WRITE	Serial0	SUCCESS	Length 10: 02 41 41 31 52 4E 54 31 03 49 	
89	0.00003185	RSPDRV.exe	IRP_MJ_WRITE	Serial0	SUCCESS	Length 6: 02 40 41 31 03 31 	
90	0.07780346	RSPDRV.exe	IRP_MJ_READ	Serial0	TIMEOUT	Length 34: 02 40 4D 31 03 3D 02 53 4D 31 40 47 45 4E 45 53 49 53 2D 56 31 2E 36 31 2D 30 37 2F 32 30 30 31 03 4B 	
91	0.00484363	RSPDRV.exe	IRP_MJ_WRITE	Serial0	SUCCESS	Length 10: 02 43 4D 31 52 46 56 30 03 4C 	
92	0.00003129	RSPDRV.exe	IRP_MJ_WRITE	Serial0	SUCCESS	Length 6: 02 40 4D 31 03 3D 	
93	65.24853773	RSPDRV.exe	IRP_MJ_READ	Serial0	TIMEOUT	Length 14: 02 40 4D 31 03 3D 02 54 4D 31 40 31 03 58 	
94	0.00004777	RSPDRV.exe	IRP_MJ_WRITE	Serial0	SUCCESS	Length 12: 02 44 4D 31 52 53 44 30 2C 31 03 51 	
95	0.00002766	RSPDRV.exe	IRP_MJ_WRITE	Serial0	SUCCESS	Length 6: 02 40 4D 31 03 3D 	
96	0.06222886	RSPDRV.exe	IRP_MJ_READ	Serial0	TIMEOUT	Length 14: 02 40 41 31 03 31 02 52 41 31 40 38 03 5B 	

hardware handshake

Stop bits: 1 Parity : None Word len : 8 Speed : ?

77	0.00000363	RSPDRV.exe	IOCTL_SERIAL_SET_LINE_CONTROL	Serial0	SUCCESS	StopBits: 1 Parity: NONE WordLength: 8	
78	0.00000223	RSPDRV.exe	IOCTL_SERIAL_SET_CHAR	Serial0	SUCCESS	EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13	
79	0.00000363	RSPDRV.exe	IOCTL_SERIAL_SET_HANDFLOW	Serial0	SUCCESS	Shake:1 Replace:40 XonLimit:2048 XoffLimit:512	
80	0.00000196	RSPDRV.exe	IOCTL_SERIAL_GET_TIMEOUTS	Serial0	SUCCESS		
81	0.00000196	RSPDRV.exe	IOCTL_SERIAL_SET_TIMEOUTS	Serial0	SUCCESS	RI:10 RM:0 RC:0 WM:0 WC:0	
82	0.00000335	RSPDRV.exe	IOCTL_SERIAL_PURGE	Serial0	SUCCESS	Purge: TXABORT RXABORT TXCLEAR RXCLEAR	

message format

each message seems to be a STX terminated by a ETX and a xor of the message bytes appended as an error detection;

96	0.06222886	RSPDRV.exe	IRP_MJ_READ	Serial0	TIMEOUT	Length 14: 02 40 41 31 03 31 02 52 41 31 40 38 03 5B 


02   <---- STX byte
40 41 31    <---- MESSAGE bytes
03   <---- ETX byte
31   <---- some sort of xor check looks like (byte1 xor byte2 xor Byte3 +1)

02
52 41 31 40 38
03
5B