Bill Somerville | 24 Jan 16:16 2015

Pull request - positive command verification for Kenwood style CAT

Hi Nate & All,

this PR implements positive command verification for Kenwood style CAT 
rigs. It comes about after dealing with some of these rigs which 
sometime ignore commands or return a busy reply. Where no reply is 
normally expected the code now sends a benign second command ("ID;") to 
make sure something can be read. This avoids a costly time out and 
allows any unexpected response to be captured. The prior strategy was to 
flush any unexpected reply leaving us in the dark about failures.

There are also some rationalizations and re-factorings resulting from 
the above strategy.

Also a patch to recognise correctly the AFSK data modes of the Elecraft K2.

The following changes since commit 80f921954b93ef3be1bddf56f5bde30bd4e5e377:

   New IC-M700PRO backend (2015-01-21 23:57:08 +0100)

are available in the git repository at:

   git://git.code.sf.net/u/bsomervi/hamlib k2-afsk-modes

for you to fetch changes up to bfbb1adc4463726ef0457613ee5afd3b6a2f67b6:

   Improve command verification for Kenwood & Elecraft (2015-01-24 
14:59:59 +0000)

----------------------------------------------------------------
Bill Somerville (10):
(Continue reading)

joeastro | 18 Jan 21:32 2015
Picon

can you help with the start up source file? for -m 401 a pcr-1000 icom receiver sdr

HI..

i have now grabbed 3 types of start ups to the pcr-1000 receiver.

1. the wxtoimg.exe that i use to get noaa images.
2. the hamlib start up
3. the pcr1000 software from icom start up..

i did some with the unit turned off.. so i have startup failed..and startup good with
the unit power turned on.

what i need to find out is where is the pcr.r ? file that hamlib uses to read
the commands from the -m 401    input command?

i noticed in reading through some of the hamlib pages that some file
was mentioned. but i dont know the name. is it pcr.r

i can open it in a HEX programe and modify the sequence and codes..

if sending the captured powerup sequences form com1 to anyone
that can make a new start up file? i can do that.

let me know.

joe perry
wb6dco
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Hamlib-developer mailing list
Hamlib-developer <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hamlib-developer
Eric Schumacher | 18 Jan 06:38 2015
Picon
Picon

icom pcr1000 start up errors rigctl -m 401 -r com1 -vvvv

Hello Joe

I am a user of Hamlib and Gpredict. I suggest that you are depending too
much on the default settings in the two programs. The string that I  would
use in your case would be as follows:

C:\Documents and Settings\ME>rigctld -m 401 -r com1 -s 9600 -T 127.0.0.1 -t
4533 -vvvvv

In the above string I show the localhost address (127.0.0.1) The actual IP
address of the computer Gpredict is running on (192.168.1.5 in my case)
would be even better. Just type  IPCONFIG   at the command prompt and your
PC will report it.

Another observation, the directory you have rigctld in is shown as ME. The
usual directory for rigctl is BIN  which is usually in the directory
hamlib-win32-3.0~git\bin

The signifiance of this observation is not known to me and if rigctld is
running for you your string C:\Documents and Settings\ME>  should be OK.

73 Eric
WB6KCN

-----Original Message-----
From: hamlib-developer-request <at> lists.sourceforge.net
[mailto:hamlib-developer-request <at> lists.sourceforge.net] 
Sent: Saturday, January 17, 2015 6:19 PM
To: hamlib-developer <at> lists.sourceforge.net
Subject: Hamlib-developer Digest, Vol 103, Issue 5

Send Hamlib-developer mailing list submissions to
	hamlib-developer <at> lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.sourceforge.net/lists/listinfo/hamlib-developer
or, via email, send a message with subject or body 'help' to
	hamlib-developer-request <at> lists.sourceforge.net

You can reach the person managing the list at
	hamlib-developer-owner <at> lists.sourceforge.net

When replying, please edit your Subject line so it is more specific than
"Re: Contents of Hamlib-developer digest..."

Today's Topics:

   1. icom pcr1000 start up errors rigctl -m 401 -r	com1 -vvvv
      (joeastro <at> aol.com)

----------------------------------------------------------------------

Message: 1
Date: Sat, 17 Jan 2015 17:10:29 -0500
From: joeastro <at> aol.com
Subject: [Hamlib-developer] icom pcr1000 start up errors rigctl -m 401
	-r	com1 -vvvv
To: hamlib-developer <at> lists.sourceforge.net.
Message-ID: <8D200B98A08CAD3-18FC-2A500 <at> webmail-va097.sysops.aol.com>
Content-Type: text/plain; charset="us-ascii"

HI .. here is the output.

the rotctld -m 901 -r com4 -vvvv worked  very well. .the rot2prog force12
connected when i clicked the connect gPredict antenna rotor button.. BUT IT
crashed the windows xp gpredict gui.. they all locked up.
and crashed.  

here is the bad part. icom pcr1000     your rigctld -m 401 -r com1 -vvvv
does not work.. it just errors on the start up of the rig?

here is the output.. thanks using wxtoimg.exe with pcr1000 to get noaa
weather.. but gPredict did not turn on the pcr1000 audio? 

joe perry
wb6dco
joeastro <at> aol.com

   224  Kenwood                TS-680S                 0.8.1           Beta
   225  Kenwood                TS-140S                 0.8.1           Beta
   226  Kenwood                TM-D700                 0.5             Beta
   227  Kenwood                TM-V7                   0.5             Beta
   228  Kenwood                TS-480                  0.8.5
Untested
   229  Elecraft               K3/KX3                  20120615        Beta
   230  Kenwood                TRC-80                  0.8             Alpha
   231  Kenwood                TS-590S                 0.8.1           Beta
   232  SigFox                 Transfox                20111223        Alpha
   233  Kenwood                TH-D72A                 0.5.1           Alpha
   234  Kenwood                TM-D710                 0.5
Untested
   302  Icom                   IC-1275                 0.7             Beta
   303  Icom                   IC-271                  0.7
Untested
   304  Icom                   IC-275                  0.7.1           Beta
   306  Icom                   IC-471                  0.7
Untested
   307  Icom                   IC-475                  0.7.1           Beta
   309  Icom                   IC-706                  0.7.1
Untested
   310  Icom                   IC-706MkII              0.7.1
Untested
   311  Icom                   IC-706MkIIG             0.7.2
Stable
   312  Icom                   IC-707                  0.7
Untested
   313  Icom                   IC-718                  0.7.1           Beta
   314  Icom                   IC-725                  0.7.1
Stable
   315  Icom                   IC-726                  0.7
Stable
   316  Icom                   IC-728                  0.7
Untested
   319  Icom                   IC-735                  0.7.1           Beta
   320  Icom                   IC-736                  0.7
Untested
   321  Icom                   IC-737                  0.7
Untested
   322  Icom                   IC-738                  0.7
Untested
   323  Icom                   IC-746                  0.7.1           Beta
   324  Icom                   IC-751                  0.7.1           Beta
   326  Icom                   IC-756                  0.7.1           Alpha
   327  Icom                   IC-756PRO               0.7
Untested
   328  Icom                   IC-761                  0.7.1
Stable
   329  Icom                   IC-765                  0.7
Stable
   330  Icom                   IC-775                  0.7.1
Untested
   331  Icom                   IC-781                  0.7.1
Untested
   332  Icom                   IC-820H                 0.7             Alpha
   334  Icom                   IC-821H                 0.7             Alpha
   335  Icom                   IC-970                  0.7
Untested
   336  Icom                   IC-R10                  0.7
Untested
   337  Icom                   IC-R71                  0.7
Untested
   338  Icom                   IC-R72                  0.7
Untested
   339  Icom                   IC-R75                  0.7             Beta
   340  Icom                   IC-R7000                0.7.0           Alpha
   341  Icom                   IC-R7100                0.7.0
Untested
   342  Icom                   ICR-8500                0.7.1           Beta
   343  Icom                   IC-R9000                0.7.1           Alpha
   344  Icom                   IC-910                  0.7.1           Beta
   345  Icom                   IC-78                   0.7
Untested
   346  Icom                   IC-746PRO               0.7
Stable
   347  Icom                   IC-756PROII             0.7             Alpha
   351  Ten-Tec                Omni VI Plus            0.2             Beta
   352  Optoelectronics        OptoScan535             0.3             Beta
   353  Optoelectronics        OptoScan456             0.3             Beta
   354  Icom                   IC ID-1                 0.7
Untested
   355  Icom                   IC-703                  0.7
Untested
   356  Icom                   IC-7800                 0.7.2
Untested
   357  Icom                   IC-756PROIII            0.7.1           Beta
   358  Icom                   IC-R20                  0.7
Untested
   360  Icom                   IC-7000                 0.7.2           Beta
   361  Icom                   IC-7200                 0.7             Beta
   362  Icom                   IC-7700                 0.7.1
Stable
   363  Icom                   IC-7600                 0.7             Beta
   364  Ten-Tec                Delta II                0.1
Untested
   365  Icom                   IC-92D                  0.7
Untested
   366  Icom                   IC-R9500                0.7.1
Untested
   367  Icom                   IC-7410                 0.7
Untested
   368  Icom                   IC-9100                 0.7
Untested
   369  Icom                   IC-RX7                  0.7
Untested
   401  Icom                   IC-PCR1000              0.8             Beta
   402  Icom                   IC-PCR100               0.8             Beta
   403  Icom                   IC-PCR1500              0.8             Beta
   404  Icom                   IC-PCR2500              0.8             Beta
   501  AOR                    AR8200                  0.6.1           Alpha
   502  AOR                    AR8000                  0.6.1           Beta
   503  AOR                    AR7030                  0.4.1           Beta
   504  AOR                    AR5000                  0.6.1           Beta
   505  AOR                    AR3030                  0.4
Untested
   506  AOR                    AR3000A                 0.5             Beta
   508  AOR                    AR2700                  0.6
Untested
   513  AOR                    AR8600                  0.6.1           Beta
   514  AOR                    AR5000A                 0.6             Alpha
   515  AOR                    AR7030 Plus             0.1             Beta
   516  AOR                    SR2200                  0.1             Beta
   605  JRC                    NRD-525                 0.1             Alpha
   606  JRC                    NRD-535D                0.6
Stable
   607  JRC                    NRD-545 DSP             0.6             Beta
   801  Uniden                 BC780xlt                0.3
Untested
   802  Uniden                 BC245xlt                0.3
Untested
   803  Uniden                 BC895xlt                0.3
Untested
   804  Radio Shack            PRO-2052                0.3
Untested
   806  Uniden                 BC250D                  0.3
Untested
   810  Uniden                 BCD-396T                0.3             Alpha
   811  Uniden                 BCD-996T                0.3             Alpha
   812  Uniden                 BC898T                  0.3
Untested
   902  Drake                  R-8A                    0.5.1           Beta
   903  Drake                  R-8B                    0.5
Untested
  1004  Lowe                   HF-235                  0.3             Alpha
  1103  Racal                  RA6790/GM               0.1
Untested
  1105  Racal                  RA3702                  0.1             Alpha
  1204  Watkins-Johnson        WJ-8888                 0.2
Untested
  1402  Skanti                 TRP8000                 0.2
Untested
  1404  Skanti                 TRP 8255 S R            0.1
Untested
  1508  Winradio               WR-G303                 0.2.1           Beta
  1509  Winradio               WR-G313                 0.1             Beta
  1510  Winradio               WR-G305                 0.2.1
Untested
  1601  Ten-Tec                TT-550                  0.2             Beta
  1602  Ten-Tec                TT-538 Jupiter          0.6             Beta
  1603  Ten-Tec                RX-320                  0.6
Stable
  1604  Ten-Tec                RX-340                  0.3
Untested
  1605  Ten-Tec                RX-350                  0.1
Untested
  1607  Ten-Tec                TT-516 Argonaut V       0.2
Stable
  1608  Ten-Tec                TT-565 Orion            0.5             Beta
  1609  Ten-Tec                TT-585 Paragon          0.3             Beta
  1611  Ten-Tec                TT-588 Omni VII         0.3             Alpha
  1612  Ten-Tec                RX-331                  0.1             Beta
  1613  Ten-Tec                TT-599 Eagle            0.4
Untested
  1701  Alinco                 DX-77                   0.7             Beta
  1801  Kachina                505DSP                  0.3             Alpha
  2201  TAPR                   DSP-10                  0.2             Alpha
  2301  Flex-radio             SDR-1000                0.2
Untested
  2303  DTTS Microwave Society DttSP IPC               0.2             Alpha
  2304  DTTS Microwave Society DttSP UDP               0.2             Alpha
  2401  RFT                    EKD-500                 0.4             Alpha
  2501  Elektor                Elektor 3/04            0.4
Stable
  2502  SAT-Schneider          DRT1                    0.2             Beta
  2503  Coding Technologies    Digital World Traveller 0.1.1
Stable
  2506  AmQRP                  DDS-60                  0.1             Alpha
  2507  Elektor                Elektor SDR-USB         0.3.1
Stable
  2508  mRS                    miniVNA                 0.1             Alpha
  2509  SoftRock               Si570 AVR-USB           0.2             Beta
  2511  KTH-SDR kit            Si570 PIC-USB           0.2             Beta
  2512  FiFi                   FiFi-SDR                0.5             Beta
  2513  AMSAT-UK               FUNcube Dongle          0.2             Beta
  2514  N2ADR                  HiQSDR                  0.2
Untested
  2701  Rohde&Schwarz          ESMC                    0.1             Alpha
  2702  Rohde&Schwarz          EB200                   0.1
Untested
  2801  Philips/Simoco         PRM8060                 0.1             Alpha
  2901  ADAT www.adat.ch       ADT-200A                1.36            Beta

C:\Documents and Settings\ME>rotctl -l
 Rig #  Mfg                    Model                   Version
Status
     1  Hamlib                 Dummy                   0.2             Beta
     2  Hamlib                 NET rotctl              0.3             Beta
   201  Hamlib                 EasycommI               0.3             Beta
   202  Hamlib                 EasycommII              0.3             Beta
   301  XQ2FOD                 Fodtrack                0.2
Stable
   401  Idiom Press            Rotor-EZ                2010-02-14      Beta
   402  Idiom Press            RotorCard               2010-02-14
Untested
   403  Hy-Gain                DCU-1/DCU-1X            2010-08-23
Untested
   404  DF9GR                  ERC                     2010-08-23b     Alpha
   501  SARtek                 SARtek-1                0.2
Untested
   601  Yaesu                  GS-232A                 0.3             Beta
   602  Yaesu/Kenpro           GS-232                  0.1             Beta
   603  Yaesu                  GS-232B                 0.2             Beta
   604  F1TE                   GS232/F1TE Tracker      0.1             Beta
   701  WA6UFQ                 PcRotor                 0.1
Untested
   801  Heathkit               HD 1780 Intellirotor    0.1             Beta
   901  SPID                   Rot2Prog                1.0
Stable
   902  SPID                   Rot1Prog                1.0
Stable
  1001  M2                     RC2800                  0.1.1           Beta
  1101  EA4TX                  ARS RCI AZ&EL           0.1             Beta
  1102  EA4TX                  ARS RCI AZ              0.1             Beta
  1201  AMSAT                  IF-100                  0.1
Untested
  1301  LA7LKA                 ts7400                  0.1             Beta
  1401  Celestron              NexStar                 0.1
Untested

C:\Documents and Settings\ME>rigctl -m 401 -r com1
rig_open: error = Protocol error

C:\Documents and Settings\ME>rigctld -m 401 -r com1 -v
rig_open: error = Protocol error

C:\Documents and Settings\ME>rigctld -m 401 -r com1 -vvvv rigctld, Hamlib
1.2.15.3 Report bugs to <hamlib-developer <at> lists.sourceforge.net>

rig:rig_init called
rig: loading backend pcr
pcr: init called
rig_register (402)
rig_register (401)
rig_register (403)
rig_register (404)
rig:rig_open called
rig_open: error = Protocol error

C:\Documents and Settings\ME>rigctld -m 401 -r com1 -vvvv rigctld, Hamlib
1.2.15.3 Report bugs to <hamlib-developer <at> lists.sourceforge.net>

rig:rig_init called
rig: loading backend pcr
pcr: init called
rig_register (402)
rig_register (401)
rig_register (403)
rig_register (404)
rig:rig_open called
rig_open: error = Command rejected by the rig

C:\Documents and Settings\ME>rigctld -m 401 -r com1 -vvvvv rigctld, Hamlib
1.2.15.3 Report bugs to <hamlib-developer <at> lists.sourceforge.net>

rig:rig_init called
rig: loading backend pcr
pcr: init called
rig_register (402)
rig_register (401)
rig_register (403)
rig_register (404)
rig:rig_open called
pcr_send: cmd = H101, len = 4
write_block(): TX 5 bytes
0000    48 31 30 31 0a                                      H101.
pcr_send: cmd = H101, len = 4
write_block(): TX 5 bytes
0000    48 31 30 31 0a                                      H101.
pcr_transaction: cmd = H1?
pcr_send: cmd = H1?, len = 3
write_block(): TX 4 bytes
0000    48 31 3f 0a                                         H1?.
pcr_read_block
read_block(): RX 1 bytes
0000    0a                                                  .
read_block(): RX 5 bytes
0000    48 31 30 30 0d                                      H100.
pcr_read_block: RX 6 bytes
pcr_parse_answer: len = 6
rig_open: error = Command rejected by the rig

C:\Documents and Settings\ME>rigctl -m 401 -r com1 -vvvvv rigctl, Hamlib
1.2.15.3 Report bugs to <hamlib-developer <at> lists.sourceforge.net>

rig:rig_init called
rig: loading backend pcr
pcr: init called
rig_register (402)
rig_register (401)
rig_register (403)
rig_register (404)
rig:rig_open called
pcr_send: cmd = H101, len = 4
write_block(): TX 5 bytes
0000    48 31 30 31 0a                                      H101.
pcr_send: cmd = H101, len = 4
write_block(): TX 5 bytes
0000    48 31 30 31 0a                                      H101.
pcr_transaction: cmd = H1?
pcr_send: cmd = H1?, len = 3
write_block(): TX 4 bytes
0000    48 31 3f 0a                                         H1?.
pcr_read_block
read_block(): RX 1 bytes
0000    0a                                                  .
read_block(): RX 5 bytes
0000    47 30 30 0d 47                                      G00.G
pcr_read_block: RX 6 bytes
pcr_parse_answer: len = 6
rig_open: error = Protocol error

C:\Documents and Settings\ME>rigctld -m 401 -r com1 -v
rig_open: error = Protocol error

C:\Documents and Settings\ME>rigctld -m 401 -r COM1 -vvvv rigctld, Hamlib
1.2.15.3 Report bugs to <hamlib-developer <at> lists.sourceforge.net>

rig:rig_init called
rig: loading backend pcr
pcr: init called
rig_register (402)
rig_register (401)
rig_register (403)
rig_register (404)
rig:rig_open called
rig_open: error = Protocol error

C:\Documents and Settings\ME>rotctld -m 901 -r COM4 -vvvv rotctld, Hamlib
1.2.15.3 Report bugs to <hamlib-developer <at> lists.sourceforge.net>

rot:rot_init called
rot: loading backend spid
initrots2_spid called
rot_register (902)
rot_register (901)
rot:rot_open called
Opened rot model 901, 'Rot2Prog'
Backend version: 1.0, Status: Stable
Connection opened from 127.0.0.1:1042
^C
C:\Documents and Settings\ME>
C:\Documents and Settings\ME>this crashed gPredict gui and the rot2 gui
'this' is not recognized as an internal or external command, operable
program or batch file.

C:\Documents and Settings\ME>
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

----------------------------------------------------------------------------
--
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet

------------------------------

_______________________________________________
Hamlib-developer mailing list
Hamlib-developer <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hamlib-developer

End of Hamlib-developer Digest, Vol 103, Issue 5
************************************************

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
joeastro | 17 Jan 23:10 2015
Picon

icom pcr1000 start up errors rigctl -m 401 -r com1 -vvvv

HI .. here is the output.

the rotctld -m 901 -r com4 -vvvv worked  very well. .the rot2prog force12 connected when i clicked the
connect gPredict antenna rotor button.. BUT IT crashed the windows xp gpredict gui.. they all locked up.
and crashed. 

here is the bad part. icom pcr1000     your rigctld -m 401 -r com1 -vvvv
does not work.. it just errors on the start up of the rig?

here is the output.. thanks using wxtoimg.exe with pcr1000 to get noaa weather.. but gPredict did not
turn on the pcr1000 audio?

joe perry
wb6dco
joeastro <at> aol.com


   224  Kenwood                TS-680S                 0.8.1           Beta
   225  Kenwood                TS-140S                 0.8.1           Beta
   226  Kenwood                TM-D700                 0.5             Beta
   227  Kenwood                TM-V7                   0.5             Beta
   228  Kenwood                TS-480                  0.8.5           Untested
   229  Elecraft               K3/KX3                  20120615        Beta
   230  Kenwood                TRC-80                  0.8             Alpha
   231  Kenwood                TS-590S                 0.8.1           Beta
   232  SigFox                 Transfox                20111223        Alpha
   233  Kenwood                TH-D72A                 0.5.1           Alpha
   234  Kenwood                TM-D710                 0.5             Untested
   302  Icom                   IC-1275                 0.7             Beta
   303  Icom                   IC-271                  0.7             Untested
   304  Icom                   IC-275                  0.7.1           Beta
   306  Icom                   IC-471                  0.7             Untested
   307  Icom                   IC-475                  0.7.1           Beta
   309  Icom                   IC-706                  0.7.1           Untested
   310  Icom                   IC-706MkII              0.7.1           Untested
   311  Icom                   IC-706MkIIG             0.7.2           Stable
   312  Icom                   IC-707                  0.7             Untested
   313  Icom                   IC-718                  0.7.1           Beta
   314  Icom                   IC-725                  0.7.1           Stable
   315  Icom                   IC-726                  0.7             Stable
   316  Icom                   IC-728                  0.7             Untested
   319  Icom                   IC-735                  0.7.1           Beta
   320  Icom                   IC-736                  0.7             Untested
   321  Icom                   IC-737                  0.7             Untested
   322  Icom                   IC-738                  0.7             Untested
   323  Icom                   IC-746                  0.7.1           Beta
   324  Icom                   IC-751                  0.7.1           Beta
   326  Icom                   IC-756                  0.7.1           Alpha
   327  Icom                   IC-756PRO               0.7             Untested
   328  Icom                   IC-761                  0.7.1           Stable
   329  Icom                   IC-765                  0.7             Stable
   330  Icom                   IC-775                  0.7.1           Untested
   331  Icom                   IC-781                  0.7.1           Untested
   332  Icom                   IC-820H                 0.7             Alpha
   334  Icom                   IC-821H                 0.7             Alpha
   335  Icom                   IC-970                  0.7             Untested
   336  Icom                   IC-R10                  0.7             Untested
   337  Icom                   IC-R71                  0.7             Untested
   338  Icom                   IC-R72                  0.7             Untested
   339  Icom                   IC-R75                  0.7             Beta
   340  Icom                   IC-R7000                0.7.0           Alpha
   341  Icom                   IC-R7100                0.7.0           Untested
   342  Icom                   ICR-8500                0.7.1           Beta
   343  Icom                   IC-R9000                0.7.1           Alpha
   344  Icom                   IC-910                  0.7.1           Beta
   345  Icom                   IC-78                   0.7             Untested
   346  Icom                   IC-746PRO               0.7             Stable
   347  Icom                   IC-756PROII             0.7             Alpha
   351  Ten-Tec                Omni VI Plus            0.2             Beta
   352  Optoelectronics        OptoScan535             0.3             Beta
   353  Optoelectronics        OptoScan456             0.3             Beta
   354  Icom                   IC ID-1                 0.7             Untested
   355  Icom                   IC-703                  0.7             Untested
   356  Icom                   IC-7800                 0.7.2           Untested
   357  Icom                   IC-756PROIII            0.7.1           Beta
   358  Icom                   IC-R20                  0.7             Untested
   360  Icom                   IC-7000                 0.7.2           Beta
   361  Icom                   IC-7200                 0.7             Beta
   362  Icom                   IC-7700                 0.7.1           Stable
   363  Icom                   IC-7600                 0.7             Beta
   364  Ten-Tec                Delta II                0.1             Untested
   365  Icom                   IC-92D                  0.7             Untested
   366  Icom                   IC-R9500                0.7.1           Untested
   367  Icom                   IC-7410                 0.7             Untested
   368  Icom                   IC-9100                 0.7             Untested
   369  Icom                   IC-RX7                  0.7             Untested
   401  Icom                   IC-PCR1000              0.8             Beta
   402  Icom                   IC-PCR100               0.8             Beta
   403  Icom                   IC-PCR1500              0.8             Beta
   404  Icom                   IC-PCR2500              0.8             Beta
   501  AOR                    AR8200                  0.6.1           Alpha
   502  AOR                    AR8000                  0.6.1           Beta
   503  AOR                    AR7030                  0.4.1           Beta
   504  AOR                    AR5000                  0.6.1           Beta
   505  AOR                    AR3030                  0.4             Untested
   506  AOR                    AR3000A                 0.5             Beta
   508  AOR                    AR2700                  0.6             Untested
   513  AOR                    AR8600                  0.6.1           Beta
   514  AOR                    AR5000A                 0.6             Alpha
   515  AOR                    AR7030 Plus             0.1             Beta
   516  AOR                    SR2200                  0.1             Beta
   605  JRC                    NRD-525                 0.1             Alpha
   606  JRC                    NRD-535D                0.6             Stable
   607  JRC                    NRD-545 DSP             0.6             Beta
   801  Uniden                 BC780xlt                0.3             Untested
   802  Uniden                 BC245xlt                0.3             Untested
   803  Uniden                 BC895xlt                0.3             Untested
   804  Radio Shack            PRO-2052                0.3             Untested
   806  Uniden                 BC250D                  0.3             Untested
   810  Uniden                 BCD-396T                0.3             Alpha
   811  Uniden                 BCD-996T                0.3             Alpha
   812  Uniden                 BC898T                  0.3             Untested
   902  Drake                  R-8A                    0.5.1           Beta
   903  Drake                  R-8B                    0.5             Untested
  1004  Lowe                   HF-235                  0.3             Alpha
  1103  Racal                  RA6790/GM               0.1             Untested
  1105  Racal                  RA3702                  0.1             Alpha
  1204  Watkins-Johnson        WJ-8888                 0.2             Untested
  1402  Skanti                 TRP8000                 0.2             Untested
  1404  Skanti                 TRP 8255 S R            0.1             Untested
  1508  Winradio               WR-G303                 0.2.1           Beta
  1509  Winradio               WR-G313                 0.1             Beta
  1510  Winradio               WR-G305                 0.2.1           Untested
  1601  Ten-Tec                TT-550                  0.2             Beta
  1602  Ten-Tec                TT-538 Jupiter          0.6             Beta
  1603  Ten-Tec                RX-320                  0.6             Stable
  1604  Ten-Tec                RX-340                  0.3             Untested
  1605  Ten-Tec                RX-350                  0.1             Untested
  1607  Ten-Tec                TT-516 Argonaut V       0.2             Stable
  1608  Ten-Tec                TT-565 Orion            0.5             Beta
  1609  Ten-Tec                TT-585 Paragon          0.3             Beta
  1611  Ten-Tec                TT-588 Omni VII         0.3             Alpha
  1612  Ten-Tec                RX-331                  0.1             Beta
  1613  Ten-Tec                TT-599 Eagle            0.4             Untested
  1701  Alinco                 DX-77                   0.7             Beta
  1801  Kachina                505DSP                  0.3             Alpha
  2201  TAPR                   DSP-10                  0.2             Alpha
  2301  Flex-radio             SDR-1000                0.2             Untested
  2303  DTTS Microwave Society DttSP IPC               0.2             Alpha
  2304  DTTS Microwave Society DttSP UDP               0.2             Alpha
  2401  RFT                    EKD-500                 0.4             Alpha
  2501  Elektor                Elektor 3/04            0.4             Stable
  2502  SAT-Schneider          DRT1                    0.2             Beta
  2503  Coding Technologies    Digital World Traveller 0.1.1           Stable
  2506  AmQRP                  DDS-60                  0.1             Alpha
  2507  Elektor                Elektor SDR-USB         0.3.1           Stable
  2508  mRS                    miniVNA                 0.1             Alpha
  2509  SoftRock               Si570 AVR-USB           0.2             Beta
  2511  KTH-SDR kit            Si570 PIC-USB           0.2             Beta
  2512  FiFi                   FiFi-SDR                0.5             Beta
  2513  AMSAT-UK               FUNcube Dongle          0.2             Beta
  2514  N2ADR                  HiQSDR                  0.2             Untested
  2701  Rohde&Schwarz          ESMC                    0.1             Alpha
  2702  Rohde&Schwarz          EB200                   0.1             Untested
  2801  Philips/Simoco         PRM8060                 0.1             Alpha
  2901  ADAT www.adat.ch       ADT-200A                1.36            Beta

C:\Documents and Settings\ME>rotctl -l
 Rig #  Mfg                    Model                   Version         Status
     1  Hamlib                 Dummy                   0.2             Beta
     2  Hamlib                 NET rotctl              0.3             Beta
   201  Hamlib                 EasycommI               0.3             Beta
   202  Hamlib                 EasycommII              0.3             Beta
   301  XQ2FOD                 Fodtrack                0.2             Stable
   401  Idiom Press            Rotor-EZ                2010-02-14      Beta
   402  Idiom Press            RotorCard               2010-02-14      Untested
   403  Hy-Gain                DCU-1/DCU-1X            2010-08-23      Untested
   404  DF9GR                  ERC                     2010-08-23b     Alpha
   501  SARtek                 SARtek-1                0.2             Untested
   601  Yaesu                  GS-232A                 0.3             Beta
   602  Yaesu/Kenpro           GS-232                  0.1             Beta
   603  Yaesu                  GS-232B                 0.2             Beta
   604  F1TE                   GS232/F1TE Tracker      0.1             Beta
   701  WA6UFQ                 PcRotor                 0.1             Untested
   801  Heathkit               HD 1780 Intellirotor    0.1             Beta
   901  SPID                   Rot2Prog                1.0             Stable
   902  SPID                   Rot1Prog                1.0             Stable
  1001  M2                     RC2800                  0.1.1           Beta
  1101  EA4TX                  ARS RCI AZ&EL           0.1             Beta
  1102  EA4TX                  ARS RCI AZ              0.1             Beta
  1201  AMSAT                  IF-100                  0.1             Untested
  1301  LA7LKA                 ts7400                  0.1             Beta
  1401  Celestron              NexStar                 0.1             Untested

C:\Documents and Settings\ME>rigctl -m 401 -r com1
rig_open: error = Protocol error

C:\Documents and Settings\ME>rigctld -m 401 -r com1 -v
rig_open: error = Protocol error

C:\Documents and Settings\ME>rigctld -m 401 -r com1 -vvvv
rigctld, Hamlib 1.2.15.3
Report bugs to <hamlib-developer <at> lists.sourceforge.net>

rig:rig_init called
rig: loading backend pcr
pcr: init called
rig_register (402)
rig_register (401)
rig_register (403)
rig_register (404)
rig:rig_open called
rig_open: error = Protocol error

C:\Documents and Settings\ME>rigctld -m 401 -r com1 -vvvv
rigctld, Hamlib 1.2.15.3
Report bugs to <hamlib-developer <at> lists.sourceforge.net>

rig:rig_init called
rig: loading backend pcr
pcr: init called
rig_register (402)
rig_register (401)
rig_register (403)
rig_register (404)
rig:rig_open called
rig_open: error = Command rejected by the rig

C:\Documents and Settings\ME>rigctld -m 401 -r com1 -vvvvv
rigctld, Hamlib 1.2.15.3
Report bugs to <hamlib-developer <at> lists.sourceforge.net>

rig:rig_init called
rig: loading backend pcr
pcr: init called
rig_register (402)
rig_register (401)
rig_register (403)
rig_register (404)
rig:rig_open called
pcr_send: cmd = H101, len = 4
write_block(): TX 5 bytes
0000    48 31 30 31 0a                                      H101.
pcr_send: cmd = H101, len = 4
write_block(): TX 5 bytes
0000    48 31 30 31 0a                                      H101.
pcr_transaction: cmd = H1?
pcr_send: cmd = H1?, len = 3
write_block(): TX 4 bytes
0000    48 31 3f 0a                                         H1?.
pcr_read_block
read_block(): RX 1 bytes
0000    0a                                                  .
read_block(): RX 5 bytes
0000    48 31 30 30 0d                                      H100.
pcr_read_block: RX 6 bytes
pcr_parse_answer: len = 6
rig_open: error = Command rejected by the rig

C:\Documents and Settings\ME>rigctl -m 401 -r com1 -vvvvv
rigctl, Hamlib 1.2.15.3
Report bugs to <hamlib-developer <at> lists.sourceforge.net>

rig:rig_init called
rig: loading backend pcr
pcr: init called
rig_register (402)
rig_register (401)
rig_register (403)
rig_register (404)
rig:rig_open called
pcr_send: cmd = H101, len = 4
write_block(): TX 5 bytes
0000    48 31 30 31 0a                                      H101.
pcr_send: cmd = H101, len = 4
write_block(): TX 5 bytes
0000    48 31 30 31 0a                                      H101.
pcr_transaction: cmd = H1?
pcr_send: cmd = H1?, len = 3
write_block(): TX 4 bytes
0000    48 31 3f 0a                                         H1?.
pcr_read_block
read_block(): RX 1 bytes
0000    0a                                                  .
read_block(): RX 5 bytes
0000    47 30 30 0d 47                                      G00.G
pcr_read_block: RX 6 bytes
pcr_parse_answer: len = 6
rig_open: error = Protocol error

C:\Documents and Settings\ME>rigctld -m 401 -r com1 -v
rig_open: error = Protocol error

C:\Documents and Settings\ME>rigctld -m 401 -r COM1 -vvvv
rigctld, Hamlib 1.2.15.3
Report bugs to <hamlib-developer <at> lists.sourceforge.net>

rig:rig_init called
rig: loading backend pcr
pcr: init called
rig_register (402)
rig_register (401)
rig_register (403)
rig_register (404)
rig:rig_open called
rig_open: error = Protocol error

C:\Documents and Settings\ME>rotctld -m 901 -r COM4 -vvvv
rotctld, Hamlib 1.2.15.3
Report bugs to <hamlib-developer <at> lists.sourceforge.net>

rot:rot_init called
rot: loading backend spid
initrots2_spid called
rot_register (902)
rot_register (901)
rot:rot_open called
Opened rot model 901, 'Rot2Prog'
Backend version: 1.0, Status: Stable
Connection opened from 127.0.0.1:1042
^C
C:\Documents and Settings\ME>
C:\Documents and Settings\ME>this crashed gPredict gui and the rot2 gui
'this' is not recognized as an internal or external command,
operable program or batch file.

C:\Documents and Settings\ME>
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Hamlib-developer mailing list
Hamlib-developer <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hamlib-developer
Erick Schumacher | 12 Jan 00:08 2015
Picon
Picon

rotctl rig 202 /easycomm compatibility

Hello Nate

This email is to report that the attached version of hamlib is compatible
with either of K3NGs implementations of Easycomm2.  Below is a dump:
***********************************************
C:\Program Files
(x86)\hamlib-nate\hamlib-win32-3.0~git\hamlib-win32-3.0~git\bin>rotctl -m
202 -r com4 -s 9600 p -vvvvv
rotctl, Hamlib 3.0~git
Report bugs to <hamlib-developer <at> lists.sourceforge.net>

rot:rot_init called
initrots3_easycomm called
rot_register (201)
rot_register (202)
rot:rot_open called
Opened rot model 202, 'EasycommII'
Backend version: 0.3b-c399723, Status: Beta
easycomm_rot_get_position called
easycomm_transaction called: AZ EL

write_block(): TX 7 bytes
0000    41 5a 20 45 4c 20 0a                                AZ EL .
read_string(): RX 14 characters
0000    41 5a 31 39 30 2e 31 20 45 4c 37 31 2e 31           AZ190.1 EL71.1
easycomm_transaction read_string: AZ190.1 EL71.1
easycomm_rot_get_position got response: AZ190.1 EL71.1
190.100006
71.099998
rot:rot_close called
rot:rot_cleanup called

**************************************************

Two questions: In the above dump the two bearings sent to rotctl were 190.1
and 71.1   Why were they very slightly changed?

In hamlib rotctld how do I tell the versions apart. I want to make sure I am
using the correct version.  Will the patch above be mainlined into the
latest on sourceforge?  When?

Thank you for all your help
WB6KCN
Eric
-----Original Message-----
From: Nate Bargmann [mailto:n0nb <at> n0nb.us] 
Sent: Wednesday, December 10, 2014 4:42 PM
To: Erick Schumacher
Subject: Re: FW: [Hamlib-developer] rotctl rig 202 /easycomm compatibility

Hi Eric.

Please try this build which should address the serial issues you were
seeing.  I look forward to your results.

73, Nate

-- 

"The optimist proclaims that we live in the best of all
possible worlds.  The pessimist fears this is true."

Ham radio, Linux, bikes, and more: http://www.n0nb.us
Attachment (hamlib-win32-3.0~git.zip): application/zip, 1260 KiB
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
www.gigenet.com
_______________________________________________
Hamlib-developer mailing list
Hamlib-developer <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hamlib-developer
Michael Black | 10 Jan 19:27 2015
Picon

value_t

I noticed that value_t has only a float representation.

Since that only guarantees 6 digits of precision shouldn't this be a double?

Frequencies can obviously exceed 6 digits.

 

Mike W9MDB

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Hamlib-developer mailing list
Hamlib-developer <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hamlib-developer
Bob Freeman | 6 Jan 18:37 2015
Picon

CNCTRK Backend source for comments

Hello,

Am sending the source file for my CNCTRK backend used to pass AZ/EL data to a linuxcnc-enabled rotator.  A patch file is attached to take care of the bookkeeping required for making a new rotor type (I used 1501 for now) and changes needed for the compilation.  Comments and corrections are welcome.

Thanks,
Bob
KI4SBL

cnctrk.c
--------------------------------------------------------------------------------------
/*
 *  Hamlib Rotator backend - LinuxCNC no hardware port
 *  Copyright (c) 2015 by Robert Freeman
 *  Adapted from AMSAT code by Stephane Fillod
 *
 *   This library is free software; you can redistribute it and/or
 *   modify it under the terms of the GNU Lesser General Public
 *   License as published by the Free Software Foundation; either
 *   version 2.1 of the License, or (at your option) any later version.
 *
 *   This library is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *   Lesser General Public License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public
 *   License along with this library; if not, write to the Free Software
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <stdlib.h>
#include <string.h>  /* String function definitions */
#include <unistd.h>  /* UNIX standard function definitions */
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif

#include "hamlib/rotator.h"
#include "misc.h"
#include "register.h"
#include "math.h"

char axcmd[512];

static int
cnctrk_set_position(ROT *rot, azimuth_t az, elevation_t el)
{
    int retval;

    retval = system ("/usr/bin/axis-remote --ping");
    if (retval != 0)
        return retval;
 
    sprintf(axcmd, "/usr/bin/axis-remote --mdi 'G00 X %6.2f Y %6.2f' \n", az, el);
    return retval = system (axcmd);
   
    return RIG_OK;
}


/** CNCTRK implements essentially only the set position function.
    it assumes there is a LinuxCNC running with the Axis GUI */
const struct rot_caps cnctrk_rot_caps = {
  .rot_model =      ROT_MODEL_CNCTRK,
  .model_name =     "CNCTRK",
  .mfg_name =       "CNCTRK",
  .version =        "0.1",
  .copyright =         "LGPL",
  .status =         RIG_STATUS_UNTESTED,
  .rot_type =       ROT_TYPE_OTHER,
  .port_type =      RIG_PORT_NONE,
  .write_delay =  0,
  .post_write_delay =  0,
  .timeout =  200,
  .retry =  3,

  .min_az =     0,
  .max_az =      360,
  .min_el =     -20,
  .max_el =      180,

  .set_position =  cnctrk_set_position,
};


/* ************************************************************************* */

DECLARE_INITROT_BACKEND(cnctrk)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    rot_register(&cnctrk_rot_caps);

    return RIG_OK;
}


--------------------------------------------------------------------------------------
end of source file

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Hamlib-developer mailing list
Hamlib-developer <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hamlib-developer
Bob Freeman | 6 Jan 00:12 2015
Picon

New to the hamlib list

Hello,

Am a new subscriber to the list (thanks to some help from Stephane in sorting through gmail).

Am writing in the hopes of adding a new rotor type to hamlib. 

I have designed and built a new positioning system that is uses the LinuxCNC (linuxcnc.org) for motion planning and control.  In the interest of using this project with GPredict for satellite tracking I have developed a patch to the hamlib-1.2.15.3 release that seems to work pretty well.  The patch adds a new rotor, called cnctrk, that I wrote based on the AMSAT IF-100 rotor backend.  No I/O port is used - the routine just makes a system call to axis-remote (http://linuxcnc.org/docs/html/man/man1/axis-remote.1.html) to send AZ/EL data to a running LinuxCNC process.

Rather than send the patch on my first posting to the list, I'll ask: is there is a preferred method for sending files to the list?

The big caution or red flag here is that I am an antenna engineer and do not claim to be a programmer.  I hope that a knowledgeable person will be able to take a look at the proposed patch and provide some feedback -- along with some consideration for including the cnctrk backend into hamlib.

And, BTW, thanks for all the great work on hamlib!

Regards,
Bob
ki4sbl

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Hamlib-developer mailing list
Hamlib-developer <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hamlib-developer
Bob Nielsen | 4 Jan 01:29 2015
Picon

Support for IC-7100

Is (or will be) the IC-7100 supported by Hamlib?

Bob, N7XY

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
Michael Black | 3 Jan 19:25 2015
Picon

XG3 Patch

This is a patch and a file that is a new backend for the Elecraft XG3.

 

The following chart shows what is implemented and what is only available through the send_command API.

 

I plan on implementing the sweep functions as soon as somebody blesses the plan I submitted earlier for that.

 

Mike W9MDB

 

XG3 Cmd

Function

Implemented?

Get

Set

Notes

B

Cal Factor

N

send_command

send_command

See XG3 manual

C

Memory

Y

get_mem

set_mem

Sets active transmit freq to memory freq  0=160M 11=2M

F

Frequency

Y

get_freq

set_freq

Sets active transmit freq min=1.5MHz max 1.4GHz

G

LED

Y

get_parm

set_parm

BACKLIGHT 0.0-1.0 (4 levels supported)

H

Help

N

send_command

send_command

See XG3 manual

I

Info

N

send_command

send_command

See XG3 manual

L

Level

Y

get_level RFPOWER

set_level RFPOWER

Power level 0= 0 dBm, 1=-33 dBm, 2=-73 dBm, 3= -107dBm

M

Memory

Y

set ch/get freq MEM

set_ch/set_freq MEM

Two commands needed: set channel, then set freq of RIG_VFO_MEM

O

Output

Y

get_ptt

set_ptt

Turns output on/off RIG_VFO_ON RIG_VFO_OFF

P

Power Timer

Y

send_command

send_command

See XG3 manual

Q

Sweep

N

send_command

send_command

See XG3 manual

S

Sweep

N

send_command

send_command

See XG3 manual

T

Tech mode

N

send_command

send_command

See XG3 manual

X

Power

Y

 

set_powerstat

Only turns off

Y

Factory

N

send_command

send_command

See XG3 manual

 

 

 

Attachment (xg3.patch): application/octet-stream, 5181 bytes
/*
 *  Hamlib Kenwood backend - Elecraft XG3 description
 *  Copyright (c) 2002-2009 by Stephane Fillod
 *  Copyright (c) 2010 by Nate Bargmann, n0nb <at> arrl.net
 *  Copyright (c) 2014 by Michael BlacK, W9MDB, mdblack98 <at> yahoo.com
 *
 *   This library is free software; you can redistribute it and/or
 *   modify it under the terms of the GNU Lesser General Public
 *   License as published by the Free Software Foundation; either
 *   version 2.1 of the License, or (at your option) any later version.
 *
 *   This library is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *   Lesser General Public License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public
 *   License along with this library; if not, write to the Free Software
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 *  See the file 'COPYING.LIB' in the main Hamlib distribution directory for
 *  the complete text of the GNU Lesser Public License version 2.1.
 *
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <stdlib.h>
#include <string.h>

#include <hamlib/rig.h>
#include "serial.h"
#include "kenwood.h"
#include "elecraft.h"

#define XG3_LEVEL_ALL (RIG_LEVEL_RFPOWER)

#define XG3_PARM_ALL (RIG_PARM_BACKLIGHT)

#define XG3_VFO (RIG_VFO_A|RIG_VFO_MEM)

#define XG3_CHANNEL_CAPS { \
        .freq=1\
        }

#define NB_CHAN 12              /* see caps->chan_list */

struct xg3_priv_data
{
    /* current vfo already in rig_state ? */
    vfo_t curr_vfo;
    vfo_t last_vfo;
    ptt_t ptt;
    powerstat_t powerstat;
    value_t parms[RIG_SETTING_MAX];

    channel_t *curr;            /* points to vfo_a, vfo_b or mem[] */

    channel_t vfo_a;
    channel_t mem[NB_CHAN];

    char *magic_conf;
};

/* kenwood_transaction() will add this to command strings
 * sent to the rig and remove it from strings returned from
 * the rig, so no need to append ';' manually to command strings.
 */
static struct kenwood_priv_caps xg3_priv_caps = {
    .cmdtrm = EOM_KEN,
};

/* XG3 specific rig_caps API function declarations */
int xg3_init(RIG * rig);
int xg3_open(RIG * rig);
int xg3_set_vfo(RIG * rig, vfo_t vfo);
int xg3_get_vfo(RIG * rig, vfo_t * vfo);
int xg3_set_freq(RIG * rig, vfo_t vfo, freq_t freq);
int xg3_get_freq(RIG * rig, vfo_t vfo, freq_t * freq);
int xg3_get_ptt(RIG * rig, vfo_t vfo, ptt_t * ptt);
int xg3_set_ptt(RIG * rig, vfo_t vfo, ptt_t ptt);
int xg3_set_level(RIG * rig, vfo_t vfo, setting_t level, value_t val);
int xg3_get_level(RIG * rig, vfo_t vfo, setting_t level, value_t * val);
int xg3_set_powerstat(RIG * rig, powerstat_t status);
int xg3_get_powerstat(RIG * rig, powerstat_t * status);
int xg3_set_mem(RIG * rig, vfo_t vfo, int ch);
int xg3_get_mem(RIG * rig, vfo_t vfo, int *ch);
int xg3_set_parm(RIG *rig, setting_t parm, value_t val);
int xg3_get_parm(RIG *rig, setting_t parm, value_t *val);

/*
 * XG3 rig capabilities.
 * This kit can recognize a small subset of TS-570 commands.
 *
 * Part of info comes from http://www.elecraft.com/K2_Manual_Download_Page.htm#K2
 * look for KIO2 Programmer's Reference PDF
 */
const struct rig_caps xg3_caps = {
    .rig_model = RIG_MODEL_XG3,
    .model_name = "XG3",
    .mfg_name = "Elecraft",
    .version = "20150101",
    .copyright = "LGPL",
    .status = RIG_STATUS_BETA,
    .rig_type = RIG_TYPE_TRANSCEIVER,
    .ptt_type = RIG_PTT_RIG,
    .dcd_type = RIG_DCD_RIG,
    .port_type = RIG_PORT_SERIAL,
    .serial_rate_min = 9600,
    .serial_rate_max = 9600,
    .serial_data_bits = 8,
    .serial_stop_bits = 1,
    .serial_parity = RIG_PARITY_NONE,
    .serial_handshake = RIG_HANDSHAKE_NONE,
    .write_delay = 0,           /* Timing between bytes */
    .post_write_delay = 25,     /* Timing between command strings */
    .timeout = 25,
    .retry = 3,

    .has_get_level = XG3_LEVEL_ALL,
    .has_set_level = RIG_LEVEL_SET(XG3_LEVEL_ALL),
    .has_get_parm = XG3_PARM_ALL,
    .has_set_parm = XG3_PARM_ALL,
    .level_gran = {},           /* FIXME: granularity */
    .parm_gran = {},
    .extparms = kenwood_cfg_params,
    .max_ifshift = Hz(0),
    .targetable_vfo = RIG_TARGETABLE_FREQ,
    .transceive = RIG_TRN_RIG,
    .bank_qty = 0,
    .chan_desc_sz = 0,

    .chan_list = {
            {0, 11, RIG_MTYPE_MEM, XG3_CHANNEL_CAPS},
            RIG_CHAN_END,
        },

    .priv = (void *)&xg3_priv_caps,

    .rig_init = xg3_init,
    .rig_cleanup = kenwood_cleanup,
    .rig_open = xg3_open,
    .set_freq = xg3_set_freq,
    .get_freq = xg3_get_freq,
    .set_mem = xg3_set_mem,
    .get_mem = xg3_get_mem,
    .set_vfo = xg3_set_vfo,
    .get_vfo = xg3_get_vfo,
    .get_ptt = xg3_get_ptt,
    .set_ptt = xg3_set_ptt,
    .set_level = xg3_set_level,
    .get_level = xg3_get_level,
    .set_powerstat = xg3_set_powerstat,
    .get_powerstat = xg3_get_powerstat,
    .set_parm = xg3_set_parm,
    .get_parm = xg3_get_parm,
//  .send_morse =       kenwood_send_morse, // we could do this
};

/*
 * xg3_init()
 */
int xg3_init(RIG * rig)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __FUNCTION__);

    struct xg3_priv_data *priv;
    int i;

    priv = (struct xg3_priv_data *)malloc(sizeof(struct xg3_priv_data));

    if (!priv)
        return -RIG_ENOMEM;
    rig->state.priv = (void *)priv;
    rig->state.rigport.type.rig = RIG_PORT_SERIAL;
// Tried set_trn to turn transceiver on/off but turning it on isn't enabled in hamlib for some reason
// So we use PTT instead
//  rig->state.transceive = RIG_TRN_RIG; // this allows xg3_set_trn to be called
    priv->curr_vfo = RIG_VFO_A;
    priv->last_vfo = RIG_VFO_A;
    priv->ptt = RIG_PTT_ON;
    priv->powerstat = RIG_POWER_ON;
    memset(priv->parms, 0, RIG_SETTING_MAX * sizeof(value_t));

    for (i = 0; i < NB_CHAN; i++)
    {
        priv->mem[i].channel_num = i;
        priv->mem[i].vfo = RIG_VFO_MEM;
    }
    return RIG_OK;
}

/*
 * XG3 extension function definitions follow
 */

/*
 * xg3_open()
 */
int xg3_open(RIG * rig)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    if (!rig)
        return -RIG_EINVAL;

    int err;

    err = elecraft_open(rig);
    if (err != RIG_OK)
        return err;

    ptt_t ptt;
    xg3_get_ptt(rig, RIG_VFO_A, &ptt);  // set our PTT status

    return RIG_OK;
}

int xg3_set_level(RIG * rig, vfo_t vfo, setting_t level, value_t val)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    if (!rig)
        return -RIG_EINVAL;

    char levelbuf[16];

    switch (level)
    {
        case RIG_LEVEL_RFPOWER:
            if (val.f < 0 || val.f > 3)
                return -RIG_EINVAL;
            /* XXX check level range */
            sprintf(levelbuf, "L,%02d", (int)val.f);
            break;

        default:
            rig_debug(RIG_DEBUG_ERR, "Unsupported set_level %d", level);
            return -RIG_EINVAL;
    }

    return kenwood_simple_cmd(rig, levelbuf);
}

/*
 * kenwood_get_level
 */
int xg3_get_level(RIG * rig, vfo_t vfo, setting_t level, value_t * val)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    if (!rig || !val)
        return -RIG_EINVAL;

    char cmdbuf[32], replybuf[32];
    int retval;
    size_t replysize = sizeof(replybuf);
    struct rig_state *rs = &rig->state;

    switch (level)
    {
        case RIG_LEVEL_RFPOWER:
            sprintf(cmdbuf, "L;");
            retval = write_block(&rs->rigport, cmdbuf, strlen(cmdbuf));
            if (retval != RIG_OK)
            {
                rig_debug(RIG_DEBUG_VERBOSE, "%s write_block failed\n",
                    __func__);
                return retval;
            }
            retval = read_string(&rs->rigport, replybuf, replysize, ";", 1);
            if (retval < 0)
            {
                rig_debug(RIG_DEBUG_VERBOSE, "%s read_string failed\n",
                    __func__);
                return retval;
            }
            sscanf(replybuf, "L,%f", &val->f);
            return RIG_OK;

        case RIG_LEVEL_RAWSTR:
        case RIG_LEVEL_AF:
        case RIG_LEVEL_RF:
        case RIG_LEVEL_SQL:
        case RIG_LEVEL_MICGAIN:
        case RIG_LEVEL_AGC:
        case RIG_LEVEL_SLOPE_LOW:
        case RIG_LEVEL_SLOPE_HIGH:
        case RIG_LEVEL_CWPITCH:
        case RIG_LEVEL_KEYSPD:
        case RIG_LEVEL_IF:
        case RIG_LEVEL_APF:
        case RIG_LEVEL_NR:
        case RIG_LEVEL_PBT_IN:
        case RIG_LEVEL_PBT_OUT:
        case RIG_LEVEL_NOTCHF:
        case RIG_LEVEL_COMP:
        case RIG_LEVEL_BKINDL:
        case RIG_LEVEL_BALANCE:
            return -RIG_ENIMPL;

        default:
            rig_debug(RIG_DEBUG_ERR, "Unsupported get_level %d", level);
            return -RIG_EINVAL;
    }

    return RIG_OK;
}

/*
 * xg3_get_vfo
 */
int xg3_get_vfo(RIG * rig, vfo_t * vfo)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    struct xg3_priv_data *priv = (struct xg3_priv_data *)rig->state.priv;

    if (!rig || !vfo)
        return -RIG_EINVAL;

    *vfo = priv->curr_vfo;      // VFOA or MEM
    return RIG_OK;
}

/*
 * xg3_set_vfo
 */
int xg3_set_vfo(RIG * rig, vfo_t vfo)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    struct xg3_priv_data *priv = (struct xg3_priv_data *)rig->state.priv;

    if (!rig || !vfo)
        return -RIG_EINVAL;

    // We don't actually set the vfo on the XG3
    // But we need this so we can set frequencies on the band buttons
    priv->curr_vfo = vfo;
    return RIG_OK;
}

/*
 * xg3_set_freq
 */
int xg3_set_freq(RIG * rig, vfo_t vfo, freq_t freq)
{
    vfo_t tvfo;

    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    if (!rig)
        return -RIG_EINVAL;

    char cmdbuf[16];

    tvfo = (vfo == RIG_VFO_CURR ||
        vfo == RIG_VFO_VFO) ? rig->state.current_vfo : vfo;

    switch (tvfo)
    {
        case RIG_VFO_A:
            break;
        case RIG_VFO_MEM:
            break;
        default:
            rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %d\n", __func__, vfo);
            return -RIG_EINVAL;
    }
    if (tvfo == RIG_VFO_MEM)
    {
        int ch;
        xg3_get_mem(rig, vfo, &ch);
        sprintf(cmdbuf, "M,%02d,%011ld", ch, (long)freq);
    }
    else
    {
        sprintf(cmdbuf, "F,%011ld", (long)freq);
    }
    int err = kenwood_simple_cmd(rig, cmdbuf);

    return err;
}

/*
 * xg3_get_freq
 */
int xg3_get_freq(RIG * rig, vfo_t vfo, freq_t * freq)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    struct rig_state *rs;

    if (!rig || !freq)
        return -RIG_EINVAL;

    char freqbuf[50];
    int freqsize = sizeof(freqbuf);
    char cmdbuf[4];
    int retval;
    vfo_t tvfo;

    tvfo = (vfo == RIG_VFO_CURR ||
        vfo == RIG_VFO_VFO) ? rig->state.current_vfo : vfo;
    rs = &rig->state;
    switch (tvfo)
    {
        case RIG_VFO_A:
            break;
        case RIG_VFO_MEM:
            break;
        default:
            rig_debug(RIG_DEBUG_ERR, "%s: unsupported VFO %d\n", __func__, vfo);
            return -RIG_EINVAL;
    }

    if (tvfo == RIG_VFO_MEM)
    {
        int ch;
        xg3_get_mem(rig, vfo, &ch);
        sprintf(cmdbuf, "M,%02d;", ch);
    }
    else
    {
        sprintf(cmdbuf, "F;");
    }
    retval = write_block(&rs->rigport, cmdbuf, strlen(cmdbuf));
    if (retval != RIG_OK)
    {
        rig_debug(RIG_DEBUG_VERBOSE, "%s write_block failed\n", __func__);
        return retval;
    }
    retval = read_string(&rs->rigport, freqbuf, freqsize, ";", 1);
    if (retval < 0)
    {
        rig_debug(RIG_DEBUG_VERBOSE, "%s read_string failed\n", __func__);
        return retval;
    }
    int offset = tvfo == RIG_VFO_A ? 2 : 5;

    sscanf(freqbuf + offset, "%" SCNfreq, freq);

    return RIG_OK;
}

/*
 * xg3_set_powerstat
 */
int xg3_set_powerstat(RIG * rig, powerstat_t status)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    struct xg3_priv_data *priv = (struct xg3_priv_data *)rig->state.priv;
    const char *cmd = "X";

    if (status == RIG_POWER_OFF)
    {
        priv->powerstat = RIG_POWER_OFF;
        return kenwood_simple_cmd(rig, cmd);
    }

    rig_debug(RIG_DEBUG_VERBOSE, "%s invalid powerstat request status=%d\n",
        __func__, status);
    return -RIG_EINVAL;
}

/*
 * xg3_get_powerstat
 */
int xg3_get_powerstat(RIG * rig, powerstat_t * status)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    const char *cmd = "G";      // any command to test will do
    int retval = kenwood_simple_cmd(rig, cmd);
    if (retval != RIG_OK)
        return retval;

    struct rig_state *rs = &rig->state;
    struct xg3_priv_data *priv = (struct xg3_priv_data *)rig->state.priv;
    char reply[32];
    retval = read_string(&rs->rigport, reply, sizeof(reply), ";", 1);
    if (retval != RIG_OK)
    {
        *status = RIG_POWER_OFF;    // Error indicates power is off
        rig_debug(RIG_DEBUG_VERBOSE, "%s read_string failed\n", __func__);
        priv->powerstat = RIG_POWER_OFF;
    }
    else
    {
        *status = RIG_POWER_ON;
        priv->powerstat = RIG_POWER_ON;
    }
    return RIG_OK;              // Always OK since it's a binary state
}

/*
 * xg3_set_mem
 */
int xg3_set_mem(RIG * rig, vfo_t vfo, int ch)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    char cmdbuf[32];
    int retval;

    if (ch < 0 || ch > 11)
    {
        rig_debug(RIG_DEBUG_VERBOSE, "%s invalid channel#%02d\n", __func__, ch);
        return -RIG_EINVAL;
    }
    sprintf(cmdbuf, "C,%02d;", ch);
    retval = kenwood_simple_cmd(rig, cmdbuf);
    if (retval != RIG_OK)
    {
        rig_debug(RIG_DEBUG_VERBOSE, "%s invalid set_mem cmd=%d\n", __func__,
            cmdbuf);
        return -RIG_EINVAL;
    }
    return RIG_OK;
}

/*
 * xg3_get_mem
 */
int xg3_get_mem(RIG * rig, vfo_t vfo, int *ch)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    char cmdbuf[32];
    char reply[32];
    int retval;

    struct rig_state *rs = &rig->state;
    sprintf(cmdbuf, "C;");
    retval = kenwood_simple_cmd(rig, cmdbuf);
    if (retval != RIG_OK)
        return retval;

    retval = read_string(&rs->rigport, reply, sizeof(reply), ";", 1);
    if (retval < 0)
    {
        rig_debug(RIG_DEBUG_VERBOSE, "%s read_string failed\n", __func__);
        return retval;
    }
    sscanf(reply, "C,%d", ch);
    return RIG_OK;
}

/*
 * xg3_set_ptt
 */
int xg3_set_ptt(RIG * rig, vfo_t vfo, ptt_t ptt)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    struct xg3_priv_data *priv = (struct xg3_priv_data *)rig->state.priv;

    if (!rig)
        return -RIG_EINVAL;

    int retval;

    retval = kenwood_simple_transaction(rig,
        (ptt == RIG_PTT_ON) ? "O,01" : "O,00", 0);
    if (retval == RIG_OK)
        priv->ptt = RIG_PTT_ON;

    return retval;
}

/*
 * kenwood_get_ptt
 */
int xg3_get_ptt(RIG * rig, vfo_t vfo, ptt_t * ptt)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    struct xg3_priv_data *priv = (struct xg3_priv_data *)rig->state.priv;

    if (!rig || !ptt)
        return -RIG_EINVAL;

    char pttbuf[6];
    int retval;

    retval = kenwood_safe_transaction(rig, "O", pttbuf, 6, 5);
    if (retval != RIG_OK)
        return retval;

    *ptt = pttbuf[3] == '1' ? RIG_PTT_ON : RIG_PTT_OFF;
    priv->ptt = *ptt;

    return RIG_OK;
}

/*
 * xg3_set_parm
 */
int xg3_set_parm(RIG *rig, setting_t parm, value_t val)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    int ival;
    char cmdbuf[6];
    int retval=-RIG_EINVAL;

    switch (parm) 
    {
        case RIG_PARM_BACKLIGHT:
            ival = 3-(int)(val.f*3); // gives us 0-3 bright-to-dim
            rig_debug(RIG_DEBUG_ERR,"%s: BACKLIGHT %d\n", __func__,ival);
            sprintf(cmdbuf,"G,%02d",ival);
            retval = kenwood_simple_transaction(rig, cmdbuf, 0);
            break;
        default:
            rig_debug(RIG_DEBUG_ERR,"%s: Unsupported set_parm %d\n", __func__,parm);
            return -RIG_EINVAL;
    }
    return retval;
}

/*
 * xg3_get_parm
 */
int xg3_get_parm(RIG *rig, setting_t parm, value_t *val)
{
    rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);

    int ival;
    char replybuf[6];
    int retval=-RIG_EINVAL;

    switch (parm) 
    {
        case RIG_PARM_BACKLIGHT:
            retval = kenwood_safe_transaction(rig, "G", replybuf, 6, 5);
            if (retval == RIG_OK) {
                sscanf(&replybuf[3],"%d",&ival);
                (*val).f = (3-ival)/3.0;
            }
            break;
        default:
            rig_debug(RIG_DEBUG_ERR,"%s: Unsupported set_parm %d\n", __func__,parm);
            return -RIG_EINVAL;
    }
    return retval;
}
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Hamlib-developer mailing list
Hamlib-developer <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hamlib-developer
Mike Tubby | 3 Jan 13:04 2015

Hamlib Wiki broken?

Gents,

I am interested in using hamlib and rigctld in a project but when I go to the Wiki I get the following error:

An error has been encountered in accessing this page.

1. Server: hamlib.sourceforge.net 
2. URL path: /wiki 
3. Error notes: NONE 
4. Error type: 404 
5. Request method: GET 
6. Request query string: NONE 
7. Time: 2015-01-03 12:03:14 UTC (1420286594)

Reporting this problem: The problem you have encountered is with a project web site hosted by SourceForge.net. This issue should be reported to the SourceForge.net-hosted project (not to SourceForge.net).

If this is a severe or recurring/persistent problem, please do one of the following, and provide the error text (numbered 1 through 7, above):

  1. Contact the project via their designated support resources.
  2. Contact the project administrators of this project via email (see the upper right-hand corner of the Project Summary page for their usernames) at user-name <at> users.sourceforge.net

If you are a maintainer of this web content, please refer to the Site Documentation regarding web services for further assistance.

NOTE: As of 2008-10-23 directory index display has been disabled by default. This option may be re-enabled by the project by placing a file with the name ".htaccess" with this line:

Options +Indexes

Which is not very helpful.


Mike G8TIC


------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Hamlib-developer mailing list
Hamlib-developer <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hamlib-developer

Gmane