Hi,
i have a modified receiver, which i can tune using the USB interface and the libusb-driver. It consits of a ATtiny26 controller with software-USB-support and AD9832 DDS chip.
Now i want to add this receiver to hamlib. My two questions are:
1.) Is it possible to add custom receivers without a complete recompile of hamlib? So just build a *.dll and copy it to the appropriate folder?
2.) My first tries using VC6 under windows were not sucessful (many syntax errors at compiling e.g. kit/.). Is this possible (compiling on windows) or do i have to compile under linux?
- Andreas -
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1) It should be possible to add custom receivers without a complete recompile of Hamlib. Hamlib has been designed for it, but never tested (nobody asked!). I should put out a documentation explaining what header files from Hamlib are needed and how to proceed, maybe with an example.
The (small) problem yet to solve will be how the backend name (ie. name of the .dll) can be deduced from a rig number. You may piggyback and existing number and its name (defined in riglist.h), but it would be better to allocate a range of rig number for "external" backends (plugins) with a generic dll file name (what name?). Another solution may be to add a special Hamlib function which registers a rig number with a backend name, but applications would then have to provide support for another configuration option. Any other idea?
2) To my knowledge, VC6 is not C99 compliant. You do need a C99 compliant compiler to recompile completly Hamlib. If you do know VC6 is C99 compliant, you can send us the compilation errors of kit/ and we'll try to fix it. Hamlib compiles fine Windows objects with MinGW GCC or Cygwin GCC. Applications can be linked against MinGW-generated Hamlib DLL without problems by VC6 (the hamlib/rig.h file has lower requirements). So either you rely on the precompiled win32 dist of Hamlib or you recompile it with MSYS/MinGW.
Projects like the Dream DRM receiver (VC) are using Hamlib under Windows with no problem.
Talking about your USB device, can you give us some more info about it and share it? A web page explaining how you built it, and encourage others to tinker in that path would be nice. I see you are using the libusb (-win32 I guess), which is good since your driver can easily be ported to Linux, BSD, OS X, etc. If you want, and if it is of some interest for people, the driver can be put in the "kit" backend of Hamlib.
--
Stephane
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stephane,
thanks for your response.
to 2.: Since my last post I was able to sucessfully compile Hamlib with MSYS/MinGW and implement my custom device. I can now use Dream and tune the Yachtboy 400 via USB.
In order to link the libusb-library I had to manualy edit the created makefile and add the corresponding lib.a file. My knowledge about configure and makefile is very poor, so this may not be the best way - but it works (tested only on Win2k).
If you are able to receive big emails (8MB) I can send you my compressed project folder with all files concerning Hamlib and all the firmware/driver/schematic about my device. It is a custom modification of one receiver and at the current state I have no additional detailed documentation about it despite my project folder. It also consists of some (public) docs about USB I have collected and other public material maybe with copyright. Because of that I dont want to put it on a web page - but in principle from my side its free and I can send it per email.
to 1.: Before reading the code and studying the docs I thought that there is some kind of dynamically linking of all backends which are in a specified folder and that Hamlib does enumeration of all dll-files and devices which are available at the start of Hamlib.
Now AFAIK and as you stated above, the backend definitions have to be in a global list in order to access them. I have done some programming of audio/video stuff and there it is usual to have a plugin folder to put the compiled stuff (e.g. filter) in and thats it. The program automatically accesses the plugins.
But all in all I am really glad that Hamlib exists and I can use it. So, thank you and the other programmers for the work.
- Andreas -
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
i have a modified receiver, which i can tune using the USB interface and the libusb-driver. It consits of a ATtiny26 controller with software-USB-support and AD9832 DDS chip.
Now i want to add this receiver to hamlib. My two questions are:
1.) Is it possible to add custom receivers without a complete recompile of hamlib? So just build a *.dll and copy it to the appropriate folder?
2.) My first tries using VC6 under windows were not sucessful (many syntax errors at compiling e.g. kit/.). Is this possible (compiling on windows) or do i have to compile under linux?
- Andreas -
Hi Andreas,
1) It should be possible to add custom receivers without a complete recompile of Hamlib. Hamlib has been designed for it, but never tested (nobody asked!). I should put out a documentation explaining what header files from Hamlib are needed and how to proceed, maybe with an example.
The (small) problem yet to solve will be how the backend name (ie. name of the .dll) can be deduced from a rig number. You may piggyback and existing number and its name (defined in riglist.h), but it would be better to allocate a range of rig number for "external" backends (plugins) with a generic dll file name (what name?). Another solution may be to add a special Hamlib function which registers a rig number with a backend name, but applications would then have to provide support for another configuration option. Any other idea?
2) To my knowledge, VC6 is not C99 compliant. You do need a C99 compliant compiler to recompile completly Hamlib. If you do know VC6 is C99 compliant, you can send us the compilation errors of kit/ and we'll try to fix it. Hamlib compiles fine Windows objects with MinGW GCC or Cygwin GCC. Applications can be linked against MinGW-generated Hamlib DLL without problems by VC6 (the hamlib/rig.h file has lower requirements). So either you rely on the precompiled win32 dist of Hamlib or you recompile it with MSYS/MinGW.
Projects like the Dream DRM receiver (VC) are using Hamlib under Windows with no problem.
Talking about your USB device, can you give us some more info about it and share it? A web page explaining how you built it, and encourage others to tinker in that path would be nice. I see you are using the libusb (-win32 I guess), which is good since your driver can easily be ported to Linux, BSD, OS X, etc. If you want, and if it is of some interest for people, the driver can be put in the "kit" backend of Hamlib.
--
Stephane
Hi Stephane,
thanks for your response.
to 2.: Since my last post I was able to sucessfully compile Hamlib with MSYS/MinGW and implement my custom device. I can now use Dream and tune the Yachtboy 400 via USB.
In order to link the libusb-library I had to manualy edit the created makefile and add the corresponding lib.a file. My knowledge about configure and makefile is very poor, so this may not be the best way - but it works (tested only on Win2k).
If you are able to receive big emails (8MB) I can send you my compressed project folder with all files concerning Hamlib and all the firmware/driver/schematic about my device. It is a custom modification of one receiver and at the current state I have no additional detailed documentation about it despite my project folder. It also consists of some (public) docs about USB I have collected and other public material maybe with copyright. Because of that I dont want to put it on a web page - but in principle from my side its free and I can send it per email.
to 1.: Before reading the code and studying the docs I thought that there is some kind of dynamically linking of all backends which are in a specified folder and that Hamlib does enumeration of all dll-files and devices which are available at the start of Hamlib.
Now AFAIK and as you stated above, the backend definitions have to be in a global list in order to access them. I have done some programming of audio/video stuff and there it is usual to have a plugin folder to put the compiled stuff (e.g. filter) in and thats it. The program automatically accesses the plugins.
But all in all I am really glad that Hamlib exists and I can use it. So, thank you and the other programmers for the work.
- Andreas -