1ROTCTL(1) Rotator Control Program ROTCTL(1)
2
3
4
6 rotctl - control antenna rotators
7
9 rotctl [OPTION]... [COMMAND]...
10
12 Control antenna rotators. rotctl accepts commands from the command
13 line as well as in interactive mode if none are provided on the command
14 line.
15
16 Keep in mind that Hamlib is BETA level software. While a lot of back‐
17 end libraries lack complete rig support, the basic functions are usu‐
18 ally well supported. The API may change without publicized notice,
19 while an advancement of the minor version (e.g. 1.1.x to 1.2.x) indi‐
20 cates such a change.
21
22 Please report bugs and provide feedback at the e-mail address given in
23 the REPORTING BUGS section. Patches and code enhancements are also
24 welcome.
25
27 This program follows the usual GNU command line syntax, with long
28 options starting with two dashes (`-').
29
30 Here is s summary of the supported options:
31
32 -m, --model=id
33 Select rotator model number. See model list (use 'rotctl -l').
34
35 NB: rotctl (or third party software) will use rig model 1901
36 when using rpc.rotd or rig model 2 for NET rotctl (rotctld).
37
38 -r, --rot-file=device
39 Use device as the file name of the port the rotator is con‐
40 nected. Often a serial port, but could be a USB to serial
41 adapter or USB port device. Typically /dev/ttyS0, /dev/ttyS1,
42 /dev/ttyUSB0, etc.
43
44 Default is /dev/rotator (may be a symbolic link to the actual
45 device).
46
47 -s, --serial-speed=baud
48 Set serial speed to baud rate. Uses maximum serial speed from
49 rotator backend capabilites as default.
50
51 -t, --send-cmd-term=char
52 Change the termination char for text protocol when using the
53 send_cmd command. The default value is <CR>. Non ASCII print‐
54 able characters can be specified as an ASCII number, in hexadec‐
55 imal format, prepended with 0x. You may pass an empty string for
56 no termination char. The string -1 tells rotctl to switch to
57 binary protocol. See the send_cmd command for further explana‐
58 tion.
59
60 -L, --show-conf
61 List all config parameters for the rotor defined with -m above.
62
63 -C, --set-conf=parm=val[,parm=val]*
64 Set config parameter. e.g. --set_conf=stop_bits=2
65
66 Use -L option for a list.
67
68 -u, --dump-caps
69 Dump capabilities for the rotor defined with -m above and exit.
70
71 -l, --list
72 List all model numbers defined in Hamlib and exit.
73
74 -v, --verbose
75 Set verbose mode, cumulative (see DIAGNOSTICS below).
76
77 -h, --help
78 Show summary of these options and exit.
79
80 -V, --version
81 Show version of rotctl and exit.
82
83 N.B. Some options may not be implemented by a given backend and will
84 return an error. This is most likely to occur with the --set-conf and
85 --show-conf options.
86
87 Please note that the backend for the rotator to be controlled, or the
88 rotator itself may not support some commands. In that case, the opera‐
89 tion will fail with a Hamlib error code.
90
92 Commands can be entered either as a single char, or as a long command
93 name. Basically, the commands do not take a dash in front of them, as
94 the options do. They may be typed in when in interactive mode or pro‐
95 vided as argument(s) in command line interface mode.
96
97 Since most of the Hamlib operations have a set and a get method, an
98 upper case letter will be used for set method whereas the corresponding
99 lower case letter refers to the get method. Each operation also has a
100 long name; in interactive mode, prepend a backslash to enter a long
101 command name.
102
103 Example: Use "\get_info" to see the rotor's info.
104
105 Please note that the backend for the rotator to be controlled, or the
106 rotator itself may not support some commands. In that case, the opera‐
107 tion will fail with a Hamlib error message.
108
109 A summary of commands is included below (In the case of "set" commands
110 the quoted string is replaced by the value in the description. In the
111 case of "get" commands the quoted string is the key name of the value
112 returned.):
113
114 P, set_pos 'Azimuth' 'Elevation'
115 Set position: Azimuth and Elevation as double precision floating
116 point values.
117
118 p, get_pos
119 Get position: 'Azimuth' and 'Elevation' as double precision
120 floating point values.
121
122 M, move 'Direction' 'Speed'
123 Move the rotator in a specific direction at the given rate.
124
125 Values are integers where Direction is defined as 2 = Up, 4 =
126 Down, 8 = Left, and 16 = Right. Speed is an integer between 1
127 and 100. Not all backends that implement the move command use
128 the Speed value. At this time only the gs232a utilizes the
129 Speed parameter.
130
131 S, stop
132 Stop the rotator.
133
134 K, park
135 Park the antenna.
136
137 C, set_conf 'Token' 'Value'
138 Set a configuration parameter. It is safe to give "Token" a
139 value of '0' (zero). "Value" may be a string up to 20 charac‐
140 ters.
141 See -L output
142
143 R, reset 'Reset'
144 Reset the rotator.
145
146 Integer value of '1' for Reset All.
147
148 _, get_info
149 Get misc information on the rotator.
150
151 At the moment returns 'Model Name'.
152
153 w, send_cmd 'Cmd'
154 Send raw command string to the rotator.
155 <CR> (or send-cmd-term, see -t option) is appended automatically
156 at the end of the command for text protocols. For binary proto‐
157 cols, enter values as \0xAA\0xBB
158
159 Locator Commands
160
161 These commands offer conversions of Degrees Minutes Seconds to other
162 formats, Maidenhead square locator conversions and distance and azimuth
163 conversions.
164
165 L, lonlat2loc 'Longitude' 'Latitude' 'Loc Len [2-12]'
166 Returns the Maidenhead locator for the given 'Longitude' and
167 'Latitude'.
168
169 Both are floating point values. The precision of the returned
170 square is controlled by 'Loc Len' which should be an even num‐
171 bered integer value between 2 and 12.
172
173 For example, "+L -170.000000 -85.000000 12\n" returns "Locator:
174 AA55AA00AA00\n".
175
176 l, loc2lonlat 'Locator'
177 Returns 'Longitude' and 'Latitude' in decimal degrees at the
178 approximate center of the requested grid square (despite the use
179 of double precision variables internally, some rounding error
180 occurs). West longitude is expressed as a negative value.
181 South latitude is expressed as a negative value. Locator can be
182 from 2 to 12 characters in length.
183
184 For example, "+l AA55AA00AA00\n" returns "Longitude:
185 -169.999983\nLatitude: -84.999991\n".
186
187 D, dms2dec 'Degrees' 'Minutes' 'Seconds' 'S/W'
188 Returns 'Dec Degrees', a signed floating point value.
189
190 Degrees and Minutes are integer values and Seconds is a floating
191 point value. S/W is a flag with '1' indicating South latitude
192 or West longitude and '0' North or East (the flag is needed as
193 computers don't recognize a signed zero even though only the
194 Degrees value only is typically signed in DMS notation).
195
196 d, dec2dms 'Dec Degrees'
197 Returns 'Degrees' 'Minutes' 'Seconds' 'S/W'.
198
199 Values are as in dms2dec above.
200
201 E, dmmm2dec 'Degrees' 'Dec Minutes' 'S/W'
202 Returns 'Dec Degrees', a signed floating point value.
203
204 Degrees is an integer value and Minutes is a floating point
205 value. S/W is a flag with '1' indicating South latitude or West
206 longitude and '0' North or East (the flag is needed as computers
207 don't recognize a signed zero even though only the Degrees value
208 only is typically signed in DMS notation).
209
210 e, dec2dmmm 'Dec Deg'
211 Returns 'Degrees' 'Minutes' 'S/W'.
212
213 Values are as in dmmm2dec above.
214
215 B, qrb 'Lon 1' 'Lat 1' 'Lon 2' 'Lat 2'
216 Returns 'Distance' 'Azimuth' where Distance is in km and Azimuth
217 is in degrees.
218
219 All Lon/Lat values are signed floating point numbers.
220
221 A, a_sp2a_lp 'Short Path Deg'
222 Returns 'Long Path Deg' or -RIG_EINVAL upon input error..
223
224 Both are floating point values within the range 0.00 to 360.00.
225
226 a, d_sp2d_lp 'Short Path km'
227 Returns 'Long Path km'.
228
229 Both are floating point values.
230
232 Start rotctl for RotorEZ using COM1:
233
234 $ rotctl -m 401 -r /dev/ttyS0
235
236 Start rotctl using rpc.rotd and querying the position:
237
238 $ rotctl -m 101 -r localhost \get_pos
239
240 Connect to a running rotctld with rotor model 2 ("NET rotctl") on the
241 local host and specifying the TCP port:
242
243 $ rotctl -m 2 -r localhost:4533
244
246 The -v, --version option allows different levels of diagnostics to be
247 output to stderr and correspond to -v for BUG, -vv for ERR, -vvv for
248 WARN, -vvvv for VERBOSE, or -vvvvv for TRACE.
249
250 A given verbose level is useful for providing needed debugging informa‐
251 tion to the email address below. For example, TRACE output shows all
252 of the values sent to and received from the radio which is very useful
253 for radio backend library development and may be requested by the
254 developers.
255
257 rotctl exits with:
258 0 if all operations completed normally;
259 1 if there was an invalid command line option or argument;
260 2 if an error was returned by Hamlib.
261
263 This suspiciously empty section...
264
266 Report bugs to <hamlib-developer@lists.sourceforge.net>.
267
268 We are already aware of the bug in the previous section :-)
269
271 Written by Stephane Fillod, Nate Bargmann, and the Hamlib Group
272
273 <http://www.hamlib.org>.
274
276 Copyright © 2000-2010 Stephane Fillod
277 Copyright © 2010 Nate Bargmann
278 Copyright © 2000-2010 the Hamlib Group
279
280 This is free software; see the source for copying conditions. There is
281 NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
282 PURPOSE.
283
285 hamlib(3), rpc.rotd(8) rotctld(8)
286
287
288
289
290Hamlib April 25, 2010 ROTCTL(1)