Python Simple Script for WIZ107SR

Source Github Link


WIZ107SR is a gateway module that converts serial protocol (RS-232) into TCP/IP protocol by using W7100A.

Link WIZ107SR materials – WIZ107SR

SW – Download & Install

Script descriptions – TCPClient

  • Init. serial port number and baudrate
serial.Serial("COM1", 57600)
  • Change to serial commond mode

Change to serial command mode; when serial command switch code is ‘123’.
Just only input serial command mode switch code of 3bytes without ‘\r\n’.
Serial command mode switch code is set by using ConfigTool.

  • Setting TCPClient mode
ser.write(b'LP5000rn') # Source port number : ex.) 5000
ser.write(b'RP3000rn') # TCP server port number : ex.) 3000
ser.write(b'RH192.168.10.100rn') # TCP server IP address : ex.) ''
ser.write(b'OP0rn') # Set TCP Client mode : OP0 - TCPClinet
ser.write(b'SVrn') # Save Setting
ser.write(b'RTrn') # Reboot
  • Send
  • recv
serial_recv_buf = 10
line =

FAQ; How know the status of TCP connections ?

We can know the TCP connection by using 8pin.

In the initial time, this pin is INPUT for Hardware Trigger(for
serial command mode). After that, this pin is OUTPUT for
connection status. When the connection is established, this pin
goes Low. And, it will go HIGH when connection is closed.