mbenz | 1 Jan 14:01 2005
Picon

Aw: RE: RE: VB.6 and hamlib-win32-1.2.3

Hello,

totay I was able to read and write the frequency to hamlib.dll out of VB.NET.  (using DummyRig)

Stephane, you were right: "C is using cdecl convention."
Thanks for the hint. :-))

I Changed the "Declare DLL" to this: (the Var-Types are not set 100% right jet)

++++++++++++++++
    <DllImport("libhamlib-1-2-3-2.dll", CallingConvention:=CallingConvention.Cdecl,
CharSet:=CharSet.Auto)> _
    Public Shared Function rig_set_debug(ByVal debug_level As rig_debug_level_e) As Integer
        ' bleibt Leer  
    End Function
    <DllImport("libhamlib-1-2-3-2.dll", CallingConvention:=CallingConvention.Cdecl,
CharSet:=CharSet.Auto)> _
    Public Shared Function rig_init(ByVal rig_model As Integer) As Integer
        ' bleibt Leer  
    End Function
    <DllImport("libhamlib-1-2-3-2.dll", CallingConvention:=CallingConvention.Cdecl,
CharSet:=CharSet.Auto)> _
    Public Shared Function rig_open(ByVal RIGptr As Integer) As Integer
        ' bleibt Leer  
    End Function
    <DllImport("libhamlib-1-2-3-2.dll", CallingConvention:=CallingConvention.Cdecl,
CharSet:=CharSet.Auto)> _
    Public Shared Function rig_close(ByVal RIGptr As Integer) As Integer
        ' bleibt Leer  
    End Function
(Continue reading)

mbenz | 1 Jan 18:43 2005
Picon

Howto set Serial Port using hamlib.dll?


Hello List,

can someone give me a hint, how to set SerialPort Parameter using the hamlib.dll?

many Tnx

73 de Michael

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Mark J. Fine | 1 Jan 20:13 2005

[ANN] Smart Gnome Control v0.3 - First Beta Release

Smart Gnome Control is a graphical user interface to multiple 
communications receivers via the Hamlib library. The specific purpose is 
to let you control your communications receiver from a personal 
computer, and to simplify the hobby of shortwave radio listening. The 
Smart Gnome Control interface is designed to automatically reconfigure 
according to the known capabilities of your receiver. It is also 
designed to provide database-driven tuning, memory and logging 
capabilities, based on FineWare's (discontinued) Smart Control series of 
receiver control packages for Windows. The Smart Gnome Control interface 
is written for Linux and Cygwin in GNU C/C++, using Glade, Gdk/Gtk+ and 
Gnome widgets. It also requires version 1.2.2 of Hamlib.

Smart Gnome Control requires:
* hamlib 1.2.2
* gtk+ 1.2 (not 2.0)
* gnome 1.4 (not 2.0)
* gdk-pixbuf 0.8 or later
* GConf 1.0.4 or later (not 2.0)
These packages (except hamlib) are included in every modern 
non-specialized linux distribution. You will also need the so-called 
development files of each package which include the header files and 
static libraries.

I hope you'll have fun using Smart Gnome Control. If you find any bugs 
or have any comments feel free to contact me. Bugs and feature requests 
should be submitted using the bug tracker on the project page: 
http://sourceforge.net/projects/sgcontrol. Hamlib-related bugs should be 
sent to the hamlib developer mailing list at 
hamlib-developer <at> lists.sourceforge.net.

(Continue reading)

benzm | 1 Jan 18:32 2005
Picon

Howto set Serial Port using hamlib.dll?

Hallo List,

can someone give me a hint, how to set SerialPort Parameter using the hamlib.dll?

many Tnx

73 de Michael

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Alexandru Csete | 4 Jan 10:53 2005
Picon
Picon

Re: Howto set Serial Port using hamlib.dll?

Quoting benzm <at> nexgo.de:

> Hallo List,
> 
> can someone give me a hint, how to set SerialPort Parameter using the
> hamlib.dll?
> 

I dont't really know about the hamlib.dll, but on Unix it can be done by
acessing rig->state.rigport.pathname after rig_init(model) has been called, for
example:

strncpy (myrig->state.rigport.pathname, "/dev/ttyS0", FILPATHLEN);

but the "/dev/ttyS0" is probably not good in windows. FILPATHLEN is the max
length of the string and is defined in hamlib.

You can try to see in the source code; there should be some windows specific
code where hamlib is initialising the default port.

> 
> many Tnx
> 
> 73 de Michael
> 

Cheers

Alex
OZ9AEC
(Continue reading)

Tomi Manninen | 4 Jan 11:16 2005
Picon

Re: Hamlib and Kenwood TS-2000

On Mon, 27 Dec 2004, Dave Platt wrote:

> I believe that both of these sets of symptoms are due to the same
> cause:  the TS-2000 seems to have trouble with rapidly-issued
> back-to-back commands, and seems to need a post-write delay in its
> Hamlib configuration.  50 milliseconds seems to be sufficient to
> eliminate the rigctl startup-time errors;  I haven't yet rebuilt
> gMFSK to see if it's also made happy by this change.

You shouldn't need to rebuild gMFSK to test this. It's dynamically
linked after all. :)

--

-- 
Tomi Manninen / OH2BNS / KP20ME04

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
benzm | 4 Jan 14:18 2005
Picon

Aw: Re: Howto set Serial Port using hamlib.dll?

 Hi Alex,

thank you for the Information,

as I found out FILPATHLEN is 100 Char long an defined in rig.h

"/dev/ttys0" is in Windows "com9"  (I start rigctl with this Parameters: "rigctl -vvvvv -r com9 -s 9600 -m 120"
 by the way rigctl now runs well on my USB2Serial Converter :-))

so far it was the easy part :-))

myrig is a Pointer (OK?) this Pointer leads to the Struckture "state.rigport.pathname"
that has to be given the value "com9"  (/dev/ttys0 for Linux)

I guess the Pointer "Method" is the only way to adjust the Port right?
(I was hoping to use one of the API function prototypes for this)

I did some Google, and found out, Pointers are not Suported by VB.Net

73 de Michael

----- Original Nachricht ----
Von:     Alexandru Csete <alexc <at> phys.au.dk>
An:      hamlib-developer <at> lists.sourceforge.net
Datum:   04.01.2005 10:53
Betreff: Re: [Hamlib-developer] Howto set Serial Port using hamlib.dll?

> Quoting benzm <at> nexgo.de:
> 
> > Hallo List,
(Continue reading)

Nate Bargmann | 4 Jan 15:30 2005
Picon

Re: Re: Howto set Serial Port using hamlib.dll?

* benzm <at> nexgo.de <benzm <at> nexgo.de> [2005 Jan 04 08:09 -0600]:
>  Hi Alex,
> 
> thank you for the Information,
> 
> as I found out FILPATHLEN is 100 Char long an defined in rig.h
> 
> "/dev/ttys0" is in Windows "com9"  (I start rigctl with this Parameters: "rigctl -vvvvv -r com9 -s 9600 -m 120"
>  by the way rigctl now runs well on my USB2Serial Converter :-))

Hmmmm, I always thought that /dev/ttyS0 corresponded to DOS/Windows
COM1 (0x3F8, IRQ 4), /dev/ttyS1 -> COM2 (0x2F8, IRQ 3), etc.  But then
modern Windows may virtualize it differently.

73, de Nate >>

--

-- 
 Wireless | Amateur Radio Station N0NB          |  Successfully Microsoft
  Amateur radio exams; ham radio; Linux info  <at>   | free since January 1998.
             http://www.qsl.net/n0nb/           |  "Debian, the choice of
             My Kawasaki KZ-650 SR  <at>             |     a GNU generation!"
        http://www.networksplus.net/n0nb/       |   http://www.debian.org

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
Alexandru Csete | 4 Jan 17:56 2005
Picon
Picon

Re: Aw: Re: Howto set Serial Port using hamlib.dll?

On Tue, 4 Jan 2005 benzm <at> nexgo.de wrote:

[...]
> myrig is a Pointer (OK?) this Pointer leads to the Struckture "state.rigport.pathname"
> that has to be given the value "com9"  (/dev/ttys0 for Linux)
> 

Not quite exactly, but almost. 'myrig' is a pointer to a structure of type
'rig'. This structure has three elements:

struct rig {
  struct rig_caps *caps;
  struct rig_state state;
  struct rig_callbacks callbacks;
};

Note, that here 'state' is a structure of type 'rig_state' while caps is a
pointer to a structure of type 'rig_caps'. This is what makes the
difference between the use of '->' and '.' - one would write
'caps->some_element' and 'state.other_element'.
Anyway, you can now see that the structure 'state' has an element called
'rigport' which again is a structure where one of the elements is called
'pathname'

> I guess the Pointer "Method" is the only way to adjust the Port right?
> (I was hoping to use one of the API function prototypes for this)
> 

Looking in the rig.h I noticed that rig->state.rigport is for internal
use only. That means that someone must have had the intention of adding an
(Continue reading)

Chuck Hemker | 5 Jan 03:24 2005

Re: Aw: Re: Howto set Serial Port using hamlib.dll?

On Tue, 04 Jan 2005 14:18:06 +0100 (CET)
benzm <at> nexgo.de said:

>  Hi Alex,
> 
> thank you for the Information,
> 
> as I found out FILPATHLEN is 100 Char long an defined in rig.h
> 
> "/dev/ttys0" is in Windows "com9"  (I start rigctl with this
> Parameters: "rigctl -vvvvv -r com9 -s 9600 -m 120"
>  by the way rigctl now runs well on my USB2Serial Converter :-))
> 
> so far it was the easy part :-))
> 
> myrig is a Pointer (OK?) this Pointer leads to the Struckture
> "state.rigport.pathname" that has to be given the value "com9" 
> (/dev/ttys0 for Linux)
> 
> I guess the Pointer "Method" is the only way to adjust the Port right?
> (I was hoping to use one of the API function prototypes for this)

When I looked for a way to do this a while back, I found rig_set_conf
and rig_token.  I'm not sure if that is the prefered way, but it works
for me.  Attached is a portion of my code that uses it.  Tested on
Linux, not sure about Windows.

Attachment (radio.c): text/x-csrc, 2608 bytes

Gmane