Allen, Wayde <wallen <at> its.bldrdoc.gov>
2015-07-08 15:36:54 GMT
So rather than trying to add a Galil controller to the Hamlib backend, I've been tinkering with writing my code to communicate with hamlib via a psuedo terminal. I was thinking the easycomm 2 protocol looked like it was pretty well documented so I'd just need
to have my C++ code interpret the easycomm commands and instruct the Galil controller to respond appropriately.
The Linux null-modem emulator <http://sourceforge.net/projects/tty0tty/> seems to work pretty well for setting up the pseudo terminal pairs, and I've cobbled together a program to read and write on the serial port. If I run the null modem program to generate
the pseudo terminal pair /dev/pts/23 <=> /dev/pts/24 I can then run rotctl as:
rotctl -vvvvv -m202 -r /dev/pts/23
and run my program connected to /dev/pts/24. This all seems to be fine. If I use the set position command "P" in rotctl, my program successfully gets the command string, an example being:
AZ45.0 EL78.0 UP000 XXX DN000 XXX
What I'm not finding documentation on is what the protocol should be for the get position command "p". My program receives a single exclamation point "!", and that is consistent with what rotctl is reporting that it sent. OK, that's easy enough to decode, but
what do I send back? I've tried just replying with a string like what rotctl sends to the rotator, namely:
AZ270.0 EL90.0 UP000 XXX DN000
but rotctl doesn't seem to understand that. The response is:
Rotator command: p
write_block(): TX 1 bytes
0000 21 !
read_string(): RX 31 characters
0000 41 5a 32 37 30 2e 30 20 45 4c 39 30 2e 30 20 55 AZ270.0 EL90.0 U
0010 50 30 30 30 20 58 58 58 20 44 4e 30 30 30 20 P000 XXX DN000
easycomm_rot_get_position: unknown replay (AZ270.0 EL90.0 UP000 XXX DN000 )
get_pos: error = Command rejected by the rig
I'll go see if I can figure this out from the hamlib source code, but if it is documented somewhere that could save me some time.
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
Hamlib-developer mailing list
Hamlib-developer <at> lists.sourceforge.net