Posted to tcl by grummund at Thu Jun 01 18:08:45 GMT 2017view raw

  1. #!/usr/bin/expect -f
  2.  
  3. set device /dev/ttyUSB0
  4. spawn -open [open $device RDWR]
  5. stty 9600 cs8 parenb -cstopb -raw -outf8 < $device
  6.  
  7. fconfigure $spawn_id -encoding binary
  8.  
  9. send "\xE0\x10\x4E\x74\x00\x02\x04\x42\x78\x00\x00\x4F\x85"
  10. expect "\xE0\x10\x4E\x74\x00\x02\x01\x4B"
  11.  
  12. exit
  13.  
  14.