Thread: [Hamlib-developer] RotorEZ 'p' command results
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: Orv B. <or...@or...> - 2003-02-12 17:24:03
|
Here's the output from rotctl, against type 401 (rotorEZ) 73 - Orv - W6BI [obeach@jake tests]$ ./rotctl -m 401 -s 4800 -r /dev/ttyS0 -vvvvv rot:rot_init called rot: loading backend rotorez rotorez: initrots_rotorez called rot_register (401) rot_register (402) rot_register (403) rotorez: rotorez_rot_init called rot:rot_open called Opened rot model 401, 'Rotor-EZ' Rot command: p rotorez: rotorez_rot_get_position called rotorez: rotorez_send_priv_cmd called TX 4 bytes 0000 41 49 31 3b AI1; RX 3 bytes 0000 3b 33 33 ;33 rotorez: azimuth = 0.0 degrees Azimuth: 0.000000 Elevation: 33.519203 Rot command: p rotorez: rotorez_rot_get_position called rotorez: rotorez_send_priv_cmd called TX 4 bytes 0000 41 49 31 3b AI1; RX 3 bytes 0000 33 3b 33 3;3 rotorez: azimuth = 3.0 degrees Azimuth: 3.000000 Elevation: 33.519203 Rot command: p rotorez: rotorez_rot_get_position called rotorez: rotorez_send_priv_cmd called TX 4 bytes 0000 41 49 31 3b AI1; RX 3 bytes 0000 33 33 3b 33; rotorez: azimuth = 33.0 degrees Azimuth: 33.000000 Elevation: 33.519203 Rot command: -- Orv Beach <or...@or...> |
|
From: Nate B. <n0...@ne...> - 2003-02-12 22:44:59
|
* Orv Beach <or...@or...> [2003 Feb 12 16:28 -0600]:
> TX 4 bytes
> 0000 41 49 31 3b AI1;
> RX 3 bytes
> 0000 3b 33 33 ;33
> TX 4 bytes
> 0000 41 49 31 3b AI1;
> RX 3 bytes
> 0000 33 3b 33 3;3
> TX 4 bytes
> 0000 41 49 31 3b AI1;
> RX 3 bytes
> 0000 33 33 3b 33;
Very interesting, Orv!
So, it appears the semi-colon is the first character of the returned
string. Of course it moves to the right on each successive read as
there are always characters left in the buffer from previous commands
(1, then 2, then 3, and so on).
Can you edit rotorez/rotorez.h, line 34 and change the line:
#define AZ_READ_LEN 3
to
#define AZ_READ_LEN 4
for me?
Then you should see consistent strings reported on the line below RX 4
bytes. It will do no harm to set it higher, say 5 or 6 as the read
function will merely have wait the time out time.
Please post that output and I should be able to fix it tonight.
73, de Nate >>
--
Wireless | Amateur Radio Station N0NB | "We have awakened a
Internet | n0...@ne... | sleeping giant and
Location | Bremen, Kansas USA EM19ov | have instilled in him
Amateur radio exams; ham radio; Linux info @ | a terrible resolve".
http://www.qsl.net/n0nb/ | - Admiral Yamamoto
|
|
From: Orv B. <or...@or...> - 2003-02-13 00:36:33
|
On Wed, 2003-02-12 at 14:44, Nate Bargmann wrote: [SNIP] > > Very interesting, Orv! > > So, it appears the semi-colon is the first character of the returned > string. Of course it moves to the right on each successive read as > there are always characters left in the buffer from previous commands > (1, then 2, then 3, and so on). > > Can you edit rotorez/rotorez.h, line 34 and change the line: > > #define AZ_READ_LEN 3 > > to > > #define AZ_READ_LEN 4 > > for me? > > Then you should see consistent strings reported on the line below RX 4 > bytes. It will do no harm to set it higher, say 5 or 6 as the read > function will merely have wait the time out time. > > Please post that output and I should be able to fix it tonight. > > 73, de Nate >> DONE. I changed it to 4, and it looks like that fixed it. The azimuth readout is now correct and consistent. Notice that I read it out several times and it showed 333 degrees on all tries. I then commanded the rotor to turn to 0 degrees. The readbacks after that consistently show it at 0 degrees (well, 359 degrees, which is rounded to 0). Nice work, Nate! 73 - Orv W6BI - [obeach@jake hamlib-1.1.4cvs-030210]$ cd tests [obeach@jake tests]$ ./rotctl -m 401 -s 4800 -r /dev/ttyS0 -vvvv rot:rot_init called rot: loading backend rotorez rotorez: initrots_rotorez called rot_register (401) rot_register (402) rot_register (403) rotorez: rotorez_rot_init called rot:rot_open called Opened rot model 401, 'Rotor-EZ' Rot command: p rotorez: rotorez_rot_get_position called rotorez: rotorez_send_priv_cmd called TX 4 bytes 0000 41 49 31 3b AI1; RX 4 bytes 0000 3b 33 33 33 ;333 rotorez: azimuth = 0.0 degrees Azimuth: 0.000000 Elevation: 33.519203 Rot command: p rotorez: rotorez_rot_get_position called rotorez: rotorez_send_priv_cmd called TX 4 bytes 0000 41 49 31 3b AI1; RX 4 bytes 0000 3b 33 33 33 ;333 rotorez: azimuth = 0.0 degrees Azimuth: 0.000000 Elevation: 33.519203 Rot command: p rotorez: rotorez_rot_get_position called rotorez: rotorez_send_priv_cmd called TX 4 bytes 0000 41 49 31 3b AI1; RX 4 bytes 0000 3b 33 33 33 ;333 rotorez: azimuth = 0.0 degrees Azimuth: 0.000000 Elevation: 33.519203 Rot command: P 000 Azimuth: Elevation: 000 rotorez: rotorez_rot_set_position called rotorez: rotorez_send_priv_cmd called TX 7 bytes 0000 41 50 31 30 30 30 3b AP1000; rotorez: rotorez_send_priv_cmd called TX 4 bytes 0000 41 4d 31 3b AM1; Rot command: p rotorez: rotorez_rot_get_position called rotorez: rotorez_send_priv_cmd called TX 4 bytes 0000 41 49 31 3b AI1; RX 4 bytes 0000 3b 33 35 39 ;359 rotorez: azimuth = 0.0 degrees Azimuth: 0.000000 Elevation: 33.519203 Rot command: p rotorez: rotorez_rot_get_position called rotorez: rotorez_send_priv_cmd called TX 4 bytes 0000 41 49 31 3b AI1; RX 4 bytes 0000 3b 33 35 39 ;359 rotorez: azimuth = 0.0 degrees Azimuth: 0.000000 Elevation: 33.519203 Rot command: p rotorez: rotorez_rot_get_position called rotorez: rotorez_send_priv_cmd called TX 4 bytes 0000 41 49 31 3b AI1; RX 4 bytes 0000 3b 33 35 39 ;359 rotorez: azimuth = 0.0 degrees Azimuth: 0.000000 Elevation: 33.519203 Rot command: -- Orv Beach <or...@or...> |
|
From: Nate B. <n0...@ne...> - 2003-02-13 01:31:51
|
Thanks for that output, Orv. That will help very much. It's obvious
that I should also make sure that the reported elevation is 0 degrees as
it appears rotorez only supports azimuth. Also, while the code is
ignoring the semi-colon, it's presence as part of the string is sure to
cause a bug at some point. Then again, the atof function that converts
the string to a floating point value probably strips it, but...
Thanks Orv!
73, de Nate >>
--
Wireless | Amateur Radio Station N0NB | "We have awakened a
Internet | n0...@ne... | sleeping giant and
Location | Bremen, Kansas USA EM19ov | have instilled in him
Amateur radio exams; ham radio; Linux info @ | a terrible resolve".
http://www.qsl.net/n0nb/ | - Admiral Yamamoto
|
|
From: Nate B. <n0...@ne...> - 2003-02-13 03:11:39
|
Hi Orv.
Please grab the latest CVS code if you can. Hopefully the fixes are
correct. Without units to test and ambiguous documentation...
Please run it through the wringer.
Oh well, that's why ham radio coding is such a blast, right? Right?
73, de Nate >>
--
Wireless | Amateur Radio Station N0NB | "We have awakened a
Internet | n0...@ne... | sleeping giant and
Location | Bremen, Kansas USA EM19ov | have instilled in him
Amateur radio exams; ham radio; Linux info @ | a terrible resolve".
http://www.qsl.net/n0nb/ | - Admiral Yamamoto
|
|
From: Alexandru C. <al...@ph...> - 2003-02-14 11:34:52
Attachments:
grig-rotator-hack.png
|
On Thu, 2003-02-13 at 01:36, Orv Beach wrote: > > Are there any GUI front ends extant for rotor control? > I started to add rotator support to Gnome RIG a couple of months ago, but I had to stop then. I've got a prototype for a rotator widget (see attached screen shot), but it is not functional yet. I will try to finish it as soon as possible and get back to you when it's done. 73, Alex, OZ9AEC |
|
From: Orv B. <or...@or...> - 2003-02-14 17:01:24
|
Thanks, Alex! I promise to beat all the bugs out of it for you ;-) 73 - Orv - W6BI On Fri, 2003-02-14 at 03:34, Alexandru Csete wrote: > On Thu, 2003-02-13 at 01:36, Orv Beach wrote: > > > > Are there any GUI front ends extant for rotor control? > > > > I started to add rotator support to Gnome RIG a couple of months ago, > but I had to stop then. I've got a prototype for a rotator widget (see > attached screen shot), but it is not functional yet. I will try to > finish it as soon as possible and get back to you when it's done. > > 73, > Alex, OZ9AEC -- Orv Beach <or...@or...> |