How to make extension to KiwiSDR
Hello.
Is there step-by-step tutorial available how to make extension to KiwiSDR ?
I have been trying to make simple antenna switch extension which contains three buttons. If I click button, a script that send snmp command to my relay switch should be executed. I tried to copy & modify ~/Beagle_SDR_GPS/extensions/example -> ~/Beagle_SDR_GPS/extensions/ant_switch and ~/Beagle_SDR_GPS/web/extensions/example -> ~/Beagle_SDR_GPS/web/extensions/ant_switch. Then rename files, modify code and recompile (cd ~/Beagle_SDR_GPS; make ; make install; reboot). Compile and install gives no errors. My extension never appears in extensions dropdown list. There is just S_Meter, integrate, iq_display, loran_c and wspr. I am stuck.
Is there step-by-step tutorial available how to make extension to KiwiSDR ?
I have been trying to make simple antenna switch extension which contains three buttons. If I click button, a script that send snmp command to my relay switch should be executed. I tried to copy & modify ~/Beagle_SDR_GPS/extensions/example -> ~/Beagle_SDR_GPS/extensions/ant_switch and ~/Beagle_SDR_GPS/web/extensions/example -> ~/Beagle_SDR_GPS/web/extensions/ant_switch. Then rename files, modify code and recompile (cd ~/Beagle_SDR_GPS; make ; make install; reboot). Compile and install gives no errors. My extension never appears in extensions dropdown list. There is just S_Meter, integrate, iq_display, loran_c and wspr. I am stuck.
Comments
Tue Nov 22 22:02:27 2016 0:00:02 .... ext_register: #1 "example"
Tue Nov 22 22:02:27 2016 0:00:02 .... ext_register: #2 "integrate"
Tue Nov 22 22:02:27 2016 0:00:02 .... ext_register: #3 "iq_display"
Tue Nov 22 22:02:27 2016 0:00:02 .... ext_register: #4 "loran_c"
Tue Nov 22 22:02:27 2016 0:00:02 .... ext_register: #5 "s4285" (note: not released yet)
Tue Nov 22 22:02:27 2016 0:00:02 .... ext_register: #6 "test" (note: not released yet)
Tue Nov 22 22:02:27 2016 0:00:02 .... ext_register: #7 "wspr"
Yes.
>If you run the server from the command line is ant_switch listed in the extensions registered list?
No.
> In ant_switch_main() is the call to ext_register(&ant_switch_ext) uncommented so ext_register() will be called?
It was commented out. Fixed now.
I found that I have to modify ext.h and add my extension there too before got working.
// extensions to compile
#if 1
#define EXT_ANT_SWITCH
#endif
Now my extension is visible on dropdown list.
Solved. Thank you again!