Groups | Search | Server Info | Login | Register
Groups > comp.protocols.kermit.misc > #17
| Newsgroups | comp.protocols.kermit.misc |
|---|---|
| References | <b2118d91-abe7-4967-b026-42c421648141@h34g2000yqd.googlegroups.com> |
| Organization | Gizmos & Gadgets, Ltd. |
| Subject | Re: Sending commands to serial port - question |
| From | bonomi@host122.r-bonomi.com (Robert Bonomi) |
| Message-ID | <o9GdnezRzL05wy_TnZ2dnUVZ_tOdnZ2d@posted.nuvoxcommunications> (permalink) |
| Date | 2011-11-03 04:28 -0500 |
In article <b2118d91-abe7-4967-b026-42c421648141@h34g2000yqd.googlegroups.com>, Tom <tdenham735@gmail.com> wrote: >Hello, > >I'm new to Kermit...this is my first very simple script. > >I am running Ubuntu and trying to make a script to automate a way to >send commands to a serial device. > >I need to toggle the device with ^S004AUX0 (off) and ^S004AUX1 (on). > >I'm able to connect like so: > >#!/usr/bin/kermit + > >set modem type Serial ; There is no modem >set line /dev/ttyUSB0 ; Specify device name >set carrier-watch off ; If DTR and CD are not cross- >connected >set speed 9600 ; Or other desired speed >set flow xon/xoff ; If you can't use RTS/CTS >set parity none ; (or "mark" or "space", if >necessary) >set stop-bits 1 ; (rarely necessary) >connect ; this is where I get lost on the >automation and have to enter manual. > >From here I can type ^S004AUX0 and toggle the device off (or on), but >would like to automate this part. It's probably pretty simple for >anyone who's used kermit more than a day:) > >Can this be automated in the kermit script? Trivially. the secret is "do -not- use 'connect'". At the kermit prompt, type "help output". > If so...can someone show >an example? kermit> output ^S004AUX0 Note: if '^S' is [CTRL-S], aka [XOFF], aka [DC3], you probably want 'set flow-control none' -- if that control-s is echoed back to the port on the PC, kermit's xon/xoff flow-control support wills *STOP* sending any further characters to the device until an XON/[CTRL-Q]/ [DC1] character is received from the other device.
Back to comp.protocols.kermit.misc | Previous | Next — Previous in thread | Find similar
Sending commands to serial port - question Tom <tdenham735@gmail.com> - 2011-11-02 08:17 -0700 Re: Sending commands to serial port - question Tom <tdenham735@gmail.com> - 2011-11-02 08:25 -0700 Re: Sending commands to serial port - question pechter@pechter.dyndns.org (Bill Pechter) - 2011-11-02 17:38 +0000 Re: Sending commands to serial port - question Christian Corti <use@reply.to> - 2011-11-02 18:15 +0100 Re: Sending commands to serial port - question bonomi@host122.r-bonomi.com (Robert Bonomi) - 2011-11-03 04:28 -0500
csiph-web