[PLUG] tcl question
Kyle Accardi
sandbox at pacifier.com
Mon May 12 23:54:01 UTC 2003
I'm diving headfirst into tcl with someone else's code. Since his code
works (just want to better it) and the books I have aren't that good, it
makes sense to learn off this app.
Figured the breadth of knowlege here might give a quick response.
Has to do with the 'binary format' bit below. I can't figure out why it is
necessary & how it even works. (I did read 'man binary' a few times). The
idea is to send commands to a serial attached device. The command set is
analogous to the Hayes AT set.
Why does 'puts' yield nothing? And why would a device that is expecting a
packet of hex values need a binary conversion?
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" "$@"
set bin_cmd [ binary format "H2H2" 11 00 ]
puts stderr bin_cmd=$bin_cmd
exit
Cheers,
Kyle Accardi
More information about the PLUG
mailing list