Discussion:
[Hamlib-developer] Where to start.
Max Lock
2010-10-18 15:00:58 UTC
Permalink
Hi All,

I'm new to hamlib and would like to develop a backend for a Phillips
PRM80 series radio running an open replacement firmware
(prm80.sourceforge.net)

The radio itself has a simple 4800-7-S-1 serial link with a very basic
command set. However I'm no C++ programmer, I'm a Linux sysadmin by trade.
So where to start, can anyone recommend one of the back ends to use as a
template that I can hack as my own?

Would it be better for me to document the radios command set for someone
else to help? I've had a quick look at the dummy back end but it's taking
me a long time to fully understand.

All suggestions welcome.

-Cheers Max G7UOZ
Nate Bargmann
2010-10-18 21:30:46 UTC
Permalink
* On 2010 18 Oct 10:38 -0500, Max Lock wrote:
>
> Hi All,
>
> I'm new to hamlib and would like to develop a backend for a Phillips
> PRM80 series radio running an open replacement firmware
> (prm80.sourceforge.net)
>
> The radio itself has a simple 4800-7-S-1 serial link with a very basic
> command set. However I'm no C++ programmer, I'm a Linux sysadmin by trade.
> So where to start, can anyone recommend one of the back ends to use as a
> template that I can hack as my own?

You're in luck, Max. C++ knowledge is not required as Hamlib backends
are coded in C. ;-)

> Would it be better for me to document the radios command set for someone
> else to help? I've had a quick look at the dummy back end but it's taking
> me a long time to fully understand.

Yes, let's start with some command documentation. It may be similar
enough to something that already exists that we can create a skelton
backend for you to hack on, even easier, it may be generic enough that
it can be a model in an existing backend family.

73, de 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://n0nb.us/index.html
Max Lock
2010-10-19 08:38:39 UTC
Permalink
Thanks Nate,

I'll put together a small document with the basics and post to the list
if that's the correct place?

-Cheers Max.

On Mon, 18 Oct 2010 16:30:46 -0500, Nate Bargmann <***@n0nb.us> wrote:

> Yes, let's start with some command documentation. It may be similar
> enough to something that already exists that we can create a skelton
> backend for you to hack on, even easier, it may be generic enough that
> it can be a model in an existing backend family.
>
> 73, de Nate >>
Nate Bargmann
2010-10-19 11:03:18 UTC
Permalink
* On 2010 19 Oct 05:35 -0500, Max Lock wrote:
>
> Thanks Nate,
>
> I'll put together a small document with the basics and post to the list
> if that's the correct place?

Yes. To the list is the proper place as everyone will get a chance to
see it.

73, de 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://n0nb.us/index.html
Max Lock
2010-10-21 10:56:44 UTC
Permalink
Hi Nate,

Here's enough documentation to control the basics of the radio, I can
probably do the rest :)

-Cheers Max


The serial connection to the radio is 4800 7-S-1

So, upon power up, we receive the following text followed by a '>'
symbol which is the command prompt, this is always displayed when the
radio is ready for a command. All commands are entered with no trailing
carriage return.

PRM8060 144 Firmware (c) F4FEZ / F8EGQ
Version 4.0, 17/03/2009.
>

Entering the letter 'H' with no newline displays a help menu.

Commandes disponibles :
[0] = Reset.
[1] a [5] = Show 80c552 port state P1 to P5.
[C] = Print channels list.
[D] = Set system byte.
[E] = Show system state (Mode-Chan-Chanstate-Sql-Vol-Lock-RX freq-TX
freq).
[F] = Set squelch.
[H] = Print this help page.
[I] = Erase and init RAM and EEPROM.
[K] = Set lock byte.
[L] = Print latch state.
[M] = Edit external RAM manualy.
[N] = Set current channel.
[O] = Set volume.
[P] = Edit/Add channel.
[Q] = Set channels number.
[R] = Set synthetiser frequencies.
[U] = Print 80c552 internal RAM.
[S] = Copy EEPROM to external RAM.
[T] = Set current channel state.
[V] = Print firmware version.
[X] = Copy external RAM to EEPROM.
[Y] = Print first 2 kb from the EEPROM I2C 24c16.
[Z] = Print external RAM ($0000 to $07FF).

To display the list of programmed channels, send 'C' with no carriage
return. The number of channels is variable up to 99.

>Channels list :
00 : 2D80 01
01 : 2D81 01
02 : 2D82 01
03 : 2D83 01
04 : 2D84 01
05 : 2D85 01
06 : 2D86 01
07 : 2D87 01
08 : 2D88 01
09 : 2D89 01
10 : 2D8A 01

>

To set a channel, send the character 'N' then send the channel number
in decimal.

To display the system state, send the character 'E'

>1240080AFF0033F02D40

The returned string is formatted as follows, all values are integers
expressed in hex.
In this example Mode is 0x12, Channel is 0x40, Chanstate is 0x08,
Squelch is 0x0A, Volume is 0xFF, Lock is 0x00, RXFreq is 0x33F0, TXfreq
is 0x2D40

I've no idea what mode relates to yet. :)
Channel is the channel number in hex.
Chanstate is a 4 bit binary value converted to hex. bit 0 enables tx
frequency shift. bit 1 sets negative tx shift, bit 2 sets positive
shift, bit 3 sets channel scanning lock out.
Squelch and volume are hex encoded decimal.

Frequency can be calculated as frequency / 12.5 then convert to hex, so
TXfreq 0x2D40 equals 11584 multiplied 12.5 giving 144800 meaning
144.800Mhz.

In this example the actual transmit frequency is the same as the
receive frequency despite two differing values as the chanstate
indicates that tx frequency shift is not enabled so we can ignore it.

To set the squelch, send the character 'F' followed by a 2 digit
decimal value 00 to 15.
To set the volume, send the character 'O' followed by a 2 digit decimal
value 00 to 15.
To set the channel, send the character 'N' followed by a 2 digit
decimal value 00 to 99.
Nate Bargmann
2010-10-21 11:30:25 UTC
Permalink
* On 2010 21 Oct 05:58 -0500, Max Lock wrote:
> Hi Nate,
>
> Here's enough documentation to control the basics of the radio, I can
> probably do the rest :)

Wow! That is completely unlike anything I've seen yet. Perhaps
Stephane or someone else will have an idea on how to proceed with this.
I'm rather puzzled and addled with cold medication at the moment. ;-)

73, de 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://n0nb.us/index.html
Dave
2010-10-21 11:59:10 UTC
Permalink
:-)

I may have been quiet doing other things, but I've now got more info re
my Skanti TRP8xxx series radio, in particular how to read back parameters
and settings. So I plan to get back into this when other projects and
commitments have quietened down somewhat.

Am I right in assuming, it'd be best to swamp out all the existing Hamlib
stuff, and start afresh with the current version. If so, I'll need to
know exactly how to do that, in a Debian context. It's been a while
since that machine was even turned on, and I was never that sure footed
in there anyway.

Regards All.

Dave G0WBX.


On 21 Oct 2010 at 6:30, Nate Bargmann wrote:

> * On 2010 21 Oct 05:58 -0500, Max Lock wrote:
> > Hi Nate,
> >
> > Here's enough documentation to control the basics of the radio, I
> > can probably do the rest :)
>
> Wow! That is completely unlike anything I've seen yet. Perhaps
> Stephane or someone else will have an idea on how to proceed with
> this. I'm rather puzzled and addled with cold medication at the
> moment. ;-)
>
> 73, de 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://n0nb.us/index.html
>
Stephane Fillod
2010-10-27 08:14:33 UTC
Permalink
Hi Dave,

Good to see you again :-)

Thu, Oct 21, 2010, Dave skribis:
> I may have been quiet doing other things, but I've now got more info re
> my Skanti TRP8xxx series radio, in particular how to read back parameters
> and settings. So I plan to get back into this when other projects and
> commitments have quietened down somewhat.

Let us know when you're ready to test the alread released skanti
backend. It's available in many distros and also as binary for Windows.

We'll integrate the read back of parameters when you will send the
info about it.

> Am I right in assuming, it'd be best to swamp out all the existing Hamlib
> stuff, and start afresh with the current version. If so, I'll need to
> know exactly how to do that, in a Debian context. It's been a while
> since that machine was even turned on, and I was never that sure footed
> in there anyway.

Yes, start afresh, with an quite up-to-date distro (no older than one or
two years).

Cheers
--
Stephane - F8CFE
Dave
2010-10-30 18:48:52 UTC
Permalink
Hi again.

Help!

I know this is silly, but is there a detailed blow by blow guide or
document somewhere, detailing what to remove, erase, etc, and how to
"cleanly" install a new set of sources etc? Without bringing a system to
it's knees...

Also, how to untie / break the link between something like Grig or
FlDigi, and their installed versions of Hamlib, and link to whatever
might be rebuilt locally from sources, so I can test as I go with third
party programs, not just the command line tool?

I'm still using a recent Debian install, but do not find it particularly
easy to navigate arround the folder structure (alien teritory in effect)
always ending up with several nearly identical windows open, a slow
system, and giving up in frustration, before I "Aviate" the PC out of the
window. (I can see the power and use for symbolic links, but it's too
easy to get into a never ending loop, when looking for something.)

Lastly, is there a decent 'C' source editor about? Something that can
guide an experienced programmer, but a 'C' novice with syntax
highlighting and checking, much like Code::Blocks, TextPad & Delphi etc
can do?

I've spent years with Delphi (Pascal) in Windows, and various Assembler
tools, PIC, Z80, 878x (heck even Data General Nova series) but I've done
relatively little with 'C', though it's the only programming "Language" I
have ever had any formal training in (somewhere over 20 years ago, I've
even got a qualification in it, fat lot of use that is!) So I have my
trusty K&R book on hand... I did use C::B on Windows a couple of years
ago for work, but that was just for some minor editing of command strings
in GPIB instrument drivers.

I'd very much like to participate in this project, but I'm finding the
tools to be unfathomable and/or poorly documented, therefore becoming
totally frustrated, coming from a DOS/Windows background.

I always seem to be fighting the OS, as much as struggling with the code.

Why is it for example, when working on a self contained PC, with cursor
manipulation keys and mouse etc, nearly all the Linux editors I've seen
are all trying to emulate something like an ASR33 on a remote IBM
mainframe, with more secret command codes than James Bond ever had!

Anyone up for some serious Elmering? I have no one local who's
interested in programming at this level (least not on Linux) & the local
LUG mainly seems interested in "marketing" Linux, rather than doing any
developing. (Unless it involves perl scripts.)

Being in the UK of course makes it even more dificult, what with time
zones etc. I have ICQ, MSN and Skype identities if needed, and email of
course, but none on the Linux system, so copy/paste from one to t'other,
is a little problematical at the moment (USB sticks work though.)

Sorry to winge on...

Now to do something constructive, sort this blasted table out, so I can
see what I'm doing with those USB sticks!

Regards.

Dave G0WBX.




On 27 Oct 2010 at 10:14, Stephane Fillod wrote:

> Hi Dave,
>
> Good to see you again :-)
>
> Thu, Oct 21, 2010, Dave skribis:
> > I may have been quiet doing other things, but I've now got more info
> > re my Skanti TRP8xxx series radio, in particular how to read back
> > parameters and settings. So I plan to get back into this when other
> > projects and commitments have quietened down somewhat.
>
> Let us know when you're ready to test the alread released skanti
> backend. It's available in many distros and also as binary for
> Windows.
>
> We'll integrate the read back of parameters when you will send the
> info about it.
>
> > Am I right in assuming, it'd be best to swamp out all the existing
> > Hamlib stuff, and start afresh with the current version. If so,
> > I'll need to know exactly how to do that, in a Debian context. It's
> > been a while since that machine was even turned on, and I was never
> > that sure footed in there anyway.
>
> Yes, start afresh, with an quite up-to-date distro (no older than one
> or two years).
>
> Cheers
> --
> Stephane - F8CFE
>
Nate Bargmann
2010-10-31 01:21:29 UTC
Permalink
* On 2010 30 Oct 13:49 -0500, Dave wrote:
> Hi again.
>
> Help!
>
> I know this is silly, but is there a detailed blow by blow guide or
> document somewhere, detailing what to remove, erase, etc, and how to
> "cleanly" install a new set of sources etc? Without bringing a system to
> it's knees...

Have you browsed through README.betatester and README.developer in the
main directory of the Hamlib source distribution? What I do is
documented in the README.developer file. I create a "build" directory
along side the "hamlib" source directory. This keeps almost all of the
generated files out of the source directory.

> Also, how to untie / break the link between something like Grig or
> FlDigi, and their installed versions of Hamlib, and link to whatever
> might be rebuilt locally from sources, so I can test as I go with third
> party programs, not just the command line tool?

The easiest way is to simply uninstall all other installations of
Hamlib. Unfortunately, Debian will helpfully offer to remove the
programs that depend on Hamlib, as you've found.

Having two versions installed can be done. In fact, as I understand it,
if your locally compiled Hamlib is installed to the default directories
by "sudo make install" (or "make install" as root), then the system
library loader should prefer it over the Debian packages.

It is crucial that you do a "make uninstall" of any older versions of
Hamlib before installing the latest SVN versions as the backend
libraries are put in their own directory now.


> I'm still using a recent Debian install, but do not find it particularly
> easy to navigate arround the folder structure (alien teritory in effect)
> always ending up with several nearly identical windows open, a slow
> system, and giving up in frustration, before I "Aviate" the PC out of the
> window. (I can see the power and use for symbolic links, but it's too
> easy to get into a never ending loop, when looking for something.)

Have you tried Midnight Commander? It is the Swiss Army Chainsaw of
file managers. You can configure it to use lynx like motion where the
right/left arrows will let you navigate the directory structure easily.
I've been using it for 14 years now.

Also, just like most things, there is no substitute for simply working
in the new environment and gaining familiarity. I found the newe
Windows layouts to be maddening as well. It's all about familiarity.

> Lastly, is there a decent 'C' source editor about? Something that can
> guide an experienced programmer, but a 'C' novice with syntax
> highlighting and checking, much like Code::Blocks, TextPad & Delphi etc
> can do?

I use geany which is an X Window editor that uses GTK in a nice UI.
It's highlighting is pretty good. Sometimes I will use KDE's Kate which
is about the same in layout and features. I'm not much into IDEs as I
run make from a Konsole tab and use Alt-Tab to switch between it and the
editor (I use KDE on this desktop).


> I've spent years with Delphi (Pascal) in Windows, and various Assembler
> tools, PIC, Z80, 878x (heck even Data General Nova series) but I've done
> relatively little with 'C', though it's the only programming "Language" I
> have ever had any formal training in (somewhere over 20 years ago, I've
> even got a qualification in it, fat lot of use that is!) So I have my
> trusty K&R book on hand... I did use C::B on Windows a couple of years
> ago for work, but that was just for some minor editing of command strings
> in GPIB instrument drivers.
>
> I'd very much like to participate in this project, but I'm finding the
> tools to be unfathomable and/or poorly documented, therefore becoming
> totally frustrated, coming from a DOS/Windows background.
>
> I always seem to be fighting the OS, as much as struggling with the code.
>
> Why is it for example, when working on a self contained PC, with cursor
> manipulation keys and mouse etc, nearly all the Linux editors I've seen
> are all trying to emulate something like an ASR33 on a remote IBM
> mainframe, with more secret command codes than James Bond ever had!

Sounds like you've been suckered into using Vim or Emacs. ;-) BTW, I'm
typing this email in Vim but it's the only place I use it as it
integrates well with Mutt.

Take it slow. I've been working with Hamlib for nearly a decade and I'm
still learning new stuff. After a few "ah ha!" moments, you'll be
rolling right along.

> Anyone up for some serious Elmering? I have no one local who's
> interested in programming at this level (least not on Linux) & the local
> LUG mainly seems interested in "marketing" Linux, rather than doing any
> developing. (Unless it involves perl scripts.)
>
> Being in the UK of course makes it even more dificult, what with time
> zones etc. I have ICQ, MSN and Skype identities if needed, and email of
> course, but none on the Linux system, so copy/paste from one to t'other,
> is a little problematical at the moment (USB sticks work though.)
>
> Sorry to winge on...
>
> Now to do something constructive, sort this blasted table out, so I can
> see what I'm doing with those USB sticks!

It almost sounds as though you're trying to do all of this from
character displays (virtual terminals) rather than using a desktop like
Gnome or KDE, or even XFCE which is fairly light weight. I can work in
VTs, but I'm an X guy and use the GUI all the time.

It will probably help a lot if you can get your Debian box networked
with your other computer(s) to share files and such.

HTH,

73, de 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://n0nb.us/index.html
Stephane Fillod
2010-10-27 08:09:35 UTC
Permalink
Hi Max,

Using your documentation, I've checked into SVN repository a basic
backend for the prm80 family of rigs. The name of the backend is prm80,
and the ID of the PRM8060 is 2801. Please read the file README.betatester,
and if you're into code tinkering, also file README.developer.

Testing latest developement can be done by checking out svn repo
if you're familiar with, or downloading a daily-snapshot
from Nate's site (wait for today's 20101027.tar.gz):

http://n0nb.users.sourceforge.net/

Make sure you'll be sending us console traces with -vvvvv verbose level
of rigctl. rigctl commands available are 'f', 'i', 'l AF', 'l SQL', 'e',
'E', 'h', 'L AF', 'L SQL' (AF and SQL value is a real number normalised
between 0.0 and 1.0).

Now some questions for you. What is the operating system where you
intend to do the testing?

Thu, Oct 21, 2010, Max Lock skribis:
> Here's enough documentation to control the basics of the radio, I can
> probably do the rest :)
>
> -Cheers Max
>
>
> The serial connection to the radio is 4800 7-S-1

Hamlib had to be introduced with Mark and Space parity. This is now done,
but untested (I don't own such device).

> So, upon power up, we receive the following text followed by a '>'
> symbol which is the command prompt, this is always displayed when the
> radio is ready for a command. All commands are entered with no trailing
> carriage return.

Does the prompt '>' get sent by the radio after any command?

> PRM8060 144 Firmware (c) F4FEZ / F8EGQ
> Version 4.0, 17/03/2009.
> >
>
> Entering the letter 'H' with no newline displays a help menu.
>
> Commandes disponibles :
> [0] = Reset.

Is it a "dangerous" Reset (blanking memories, ..) or a simple warm reboot?

> [1] a [5] = Show 80c552 port state P1 to P5.
> [C] = Print channels list.
> [D] = Set system byte.
> [E] = Show system state (Mode-Chan-Chanstate-Sql-Vol-Lock-RX freq-TX freq).
> [F] = Set squelch.
> [H] = Print this help page.
> [I] = Erase and init RAM and EEPROM.
> [K] = Set lock byte.
> [L] = Print latch state.
> [M] = Edit external RAM manualy.
> [N] = Set current channel.
> [O] = Set volume.
> [P] = Edit/Add channel.
> [Q] = Set channels number.
> [R] = Set synthetiser frequencies.
> [U] = Print 80c552 internal RAM.
> [S] = Copy EEPROM to external RAM.
> [T] = Set current channel state.
> [V] = Print firmware version.
> [X] = Copy external RAM to EEPROM.
> [Y] = Print first 2 kb from the EEPROM I2C 24c16.
> [Z] = Print external RAM ($0000 to $07FF).

What is the difference between "[N] = Set current channel." and "[Q] =
Set channels number." ?

Is it possible to change only the current frequency? command 'R' ?

>
> To display the list of programmed channels, send 'C' with no carriage
> return. The number of channels is variable up to 99.
>
> >Channels list :
> 00 : 2D80 01

00 is the channel number, 2D80 is the frequency, but what means 01 ?

> 01 : 2D81 01
> 02 : 2D82 01
> 03 : 2D83 01
> 04 : 2D84 01
> 05 : 2D85 01
> 06 : 2D86 01
> 07 : 2D87 01
> 08 : 2D88 01
> 09 : 2D89 01
> 10 : 2D8A 01
>
> To set a channel, send the character 'N' then send the channel number
> in decimal.
>
> To display the system state, send the character 'E'
>
> >1240080AFF0033F02D40
>
> The returned string is formatted as follows, all values are integers
> expressed in hex.
> In this example Mode is 0x12, Channel is 0x40, Chanstate is 0x08,
> Squelch is 0x0A, Volume is 0xFF, Lock is 0x00, RXFreq is 0x33F0, TXfreq
> is 0x2D40

That's kind of strange, getting the volume is on 8 bits, while setting
it (with command 'O') is only on 4 bits. Is that OK?

> I've no idea what mode relates to yet. :)
> Channel is the channel number in hex.
> Chanstate is a 4 bit binary value converted to hex. bit 0 enables tx
> frequency shift. bit 1 sets negative tx shift, bit 2 sets positive
> shift, bit 3 sets channel scanning lock out.
> Squelch and volume are hex encoded decimal.

What is the difference between the "bit 3 sets channel scanning lock
out" of the Chanstate and the Lock field (0x00) of the system state?
What other value the Lock field may have?

> Frequency can be calculated as frequency / 12.5 then convert to hex, so
> TXfreq 0x2D40 equals 11584 multiplied 12.5 giving 144800 meaning
> 144.800Mhz.
>
> In this example the actual transmit frequency is the same as the
> receive frequency despite two differing values as the chanstate
> indicates that tx frequency shift is not enabled so we can ignore it.

Is the RX/TX frequency shift to be seen as a split mode (like HF rigs)
or is it to be seen as a repeater shift? Can it be cross-band?

Are the PRM80 models mono-band or can they be dual-band?
Is the PRM8060 VHF only?

73
--
Stephane - F8CFE
Max Lock
2010-10-27 12:10:21 UTC
Permalink
Hi Stephane,

Thanks for the code! I'll answer your questions below and test the code
this evening.

-Cheers Max :)

On Wed, 27 Oct 2010 10:09:35 +0200, Stephane Fillod <***@free.fr> wrote:

> Now some questions for you. What is the operating system where you
> intend to do the testing?

Debian, stable.

> Does the prompt '>' get sent by the radio after any command?

Yes, the prompt is sent whenever the radio is ready for a new command
after the previous command is complete.

>> Commandes disponibles :
>> [0] = Reset.
>
> Is it a "dangerous" Reset (blanking memories, ..) or a simple warm
reboot?

It is a warm boot.

> What is the difference between "[N] = Set current channel." and "[Q] =
> Set channels number." ?

Q, set channels number sets the number of memories that are 'active' they
have a default value before they are set. N, Set current channel sets the
frequency to that stored in the memory number specified.

> Is it possible to change only the current frequency? command 'R' ?

Yes, I'll take a look at it tonight.


>> To display the system state, send the character 'E'
>>
>> >1240080AFF0033F02D40
>>
>> The returned string is formatted as follows, all values are integers
>> expressed in hex.
>> In this example Mode is 0x12, Channel is 0x40, Chanstate is 0x08,
>> Squelch is 0x0A, Volume is 0xFF, Lock is 0x00, RXFreq is 0x33F0,
TXfreq
>> is 0x2D40
>
> That's kind of strange, getting the volume is on 8 bits, while setting
> it (with command 'O') is only on 4 bits. Is that OK?

Hmm I'm not sure, I'll double check it tonight.

>> Chanstate is a 4 bit binary value converted to hex. bit 0 enables tx
>> frequency shift. bit 1 sets negative tx shift, bit 2 sets positive
>> shift, bit 3 sets channel scanning lock out.
>
> What is the difference between the "bit 3 sets channel scanning lock
> out" of the Chanstate and the Lock field (0x00) of the system state?
> What other value the Lock field may have?

There is no difference they are the same. the Lock field is only one bit,
so it's only locked or not.

>> Frequency can be calculated as frequency / 12.5 then convert to hex,
so
>> TXfreq 0x2D40 equals 11584 multiplied 12.5 giving 144800 meaning
>> 144.800Mhz.
>>
>> In this example the actual transmit frequency is the same as the
>> receive frequency despite two differing values as the chanstate
>> indicates that tx frequency shift is not enabled so we can ignore it.
>
> Is the RX/TX frequency shift to be seen as a split mode (like HF rigs)
> or is it to be seen as a repeater shift? Can it be cross-band?

It is to be seen as a repeater shift. The radio is single band only.

> Are the PRM80 models mono-band or can they be dual-band?
> Is the PRM8060 VHF only?

They are mono band only, there are currently 2m & 70cm versions see
http://sourceforge.net/apps/mediawiki/prm80/index.php?title=PRM80_bands

I hope this helps! :)
I could also make an RFC2217 connection to the radio available to you if
it might help?

-Thanks Max, G7UOZ
Max Lock
2010-10-27 19:43:09 UTC
Permalink
Hi Stephane,

OK, I've fired up rigctl and so far.....

***@vham:~/hamlib/bin# ./rigctl -vvvvv -m2801 -r /dev/tnc
rigctl, Hamlib 1.2.13svn
Report bugs to <hamlib-***@lists.sourceforge.net>

rig:rig_init called
rig: loading backend prm80
prm80: _init called
rig_register (2801)
rig:rig_open called
Opened rig model 2801, 'PRM8060'
Backend version: 0.1, Status: Untested

Rig command: f
TX 1 bytes
0000 45 E
RX 22 characters
0000 b1 36 30 30 30 b1 30 30 c6 c6 30 30 33 b4 33
30 .6000.00..003.30
0010 b2 44 35 30 8d 0a .D50..
get_freq: error = Protocol error

Rig command: i
TX 1 bytes
0000 45 E
RX 22 characters
0000 b1 36 30 30 30 b1 30 30 c6 c6 30 30 33 b4 33
30 .6000.00..003.30
0010 b2 44 35 30 8d 0a .D50..
get_split_freq: error = Protocol error

Rig command: l AF
Level: get_level: error = Invalid parameter

Rig command: l SQL
Level: get_level: error = Invalid parameter

Rig command: e
TX 1 bytes
0000 45 E
RX 22 characters
0000 b1 36 30 30 30 b1 30 30 c6 c6 30 30 33 b4 33
30 .6000.00..003.30
0010 b2 44 35 30 8d 0a .D50..
get_mem: error = Protocol error

Rig command: E
Memory#: 99
TX 3 bytes
0000 4e 39 39 N99

Rig command: h
Channel: 01
TX 3 bytes
0000 4e 30 31 N01
TX 1 bytes
0000 45 E
RX 14 characters
0000 c3 e8 e1 ee ee 65 6c a0 3a a0 30 b1 8d
0a .....el.:.0...
get_channel: error = Protocol error

Rig command: L AF
Level: Level Value: 00
TX 3 bytes
0000 4f 30 30 O00

Rig command: L SQL
Level: Level Value: 00
TX 3 bytes
0000 46 30 30 F00

Rig command: q
rig:rig_close called
rig:rig_cleanup called
***@vham:~/hamlib/bin#

> > >Channels list :
> > 00 : 2D80 01
>
> 00 is the channel number, 2D80 is the frequency, but what means 01 ?

OK, the 01 is the lock byte for the channel.

> That's kind of strange, getting the volume is on 8 bits, while setting
> it (with command 'O') is only on 4 bits. Is that OK?

I did some experimentation, the rotary encoder that sets the volume on
the radios front panel changes the volume with full resolution from 00
to FF. the value that the firmware accepts is 0 to F as you have
observed. the firmware sets the most significant byte only. the least
significant byte has no effect on the actual volume of the radio, so it
'steps' when using the rotary encoder.

Thanks for your help Stephane, it's very much appreciated. I'll
continue to play with the code....

-Max
Loading...