my software uses HamLib_w32, and it works perfectly up to HamLib version
4.4. With HamLib version 4.5.5, it returns this error, and I can't get it to
work. Any help is much appreciated.
Thank you.
rig_settings_load_all: settings_file (.hamlib_settings): No such file or
directory
rig_open: cwd=C:\Temp\Temp\MFCTestCat
rig_open: C:\Temp\Temp\MFCTestCat/hamlib_settings does not exist
my software uses HamLib_w32, and it works perfectly up to HamLib version
4.4. With HamLib version 4.5.5, it returns this error, and I can't get it to
work. Any help is much appreciated.
Thank you.
rig_settings_load_all: settings_file (.hamlib_settings): No such file or
directory
rig_open: cwd=C:\Temp\Temp\MFCTestCat
rig_open: C:\Temp\Temp\MFCTestCat/hamlib_settings does not exist
Thank you for the response. Unfortunately, it doesn't work even with version 4.6. I've also written a very simple code, but when it calls rig_open, it returns the attached error. It works perfectly when compiled with hamlib_w32 version 4.4, but it doesn't work with version 4.5 and later. I'm attaching the source code. Thank you.
Error:
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): Invalid argument
rig_open: cwd=\pc2\Temp\TestCat\MFCTestCat
rig_open: reading settings from \pc2\Temp\TestCat\MFCTestCat/hamlib_settings
rig_open: async_data_enable=0, async_data_supported=0
serial_open: \.\COM1
serial_setup: tcgetattr
serial_setup: unsupported rate specified: -858993460
port_open: serial_open(\.\COM1) status=-2, err=Bad file descriptor
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-2) Invalid configuration
Thank you for the response. Unfortunately, it doesn't work even with version 4.6. I've also written a very simple code, but when it calls rig_open, it returns the attached error. It works perfectly when compiled with hamlib_w32 version 4.4, but it doesn't work with version 4.5 and later. I'm attaching the source code. Thank you.
Error:
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): Invalid argument
rig_open: cwd=\pc2\Temp\TestCat\MFCTestCat
rig_open: reading settings from \pc2\Temp\TestCat\MFCTestCat/hamlib_settings
rig_open: async_data_enable=0, async_data_supported=0
serial_open: .\COM1
serial_setup: tcgetattr
serial_setup: unsupported rate specified: -858993460
port_open: serial_open(.\COM1) status=-2, err=Bad file descriptor
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-2) Invalid configuration
Hi Mike, thanks for the suggestion, but unfortunately, it doesn't fix the error. I'm attaching the content of the state.rigport and state.rigport.parm.serial structs for your review.
Can you please send debug output again with this change?
Also ensure your rigctl is using the correct library. If you have a Hamlib installed package the library will be in /usr/lib and if you compile the default location will be /usr/local/lib
This will tell which one it's using.
ldd rigctl
Hi Mike, thanks for the suggestion, but unfortunately, it doesn't fix the error. I'm attaching the content of the state.rigport and state.rigport.parm.serial structs for your review.
Hello Mike, my software (CatBkt https://www.maniaradio.it/en/catbkt.html) uses the HamLib_W32 library and has been working since 2011. I've always kept it updated with all the HamLib versions, and it works perfectly up to version 4.4. However, starting from HamLib version 4.5 and onwards, it doesn't work anymore and returns the error I mentioned in the previous post. To simplify the debugging process, I've written a very simple code attached to the previous post. The error remains the same even with the modification you provided.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Try 4.6 -- there was a bug which affected some backwards compatibility that was fixed.Are you recompiling your app or just dropping in the DLL? The old bug required a recompile with the rig.h file. But it should be fixed in the later version.
I still need the debug after you moved the path setting. https://n0nb.users.sourceforge.net/
Hello Mike, my software (CatBkt https://www.maniaradio.it/en/catbkt.html) uses the HamLib_W32 library and has been working since 2011. I've always kept it updated with all the HamLib versions, and it works perfectly up to version 4.4. However, starting from HamLib version 4.5 and onwards, it doesn't work anymore and returns the error I mentioned in the previous post. To simplify the debugging process, I've written a very simple code attached to the previous post. The error remains the same even with the modification you provided.
Yes, but then m_sPort is mapped to m_pRtx->state.rigport; however, I also added strcpy(m_pRtx->state.rigport.pathname, "COM3"); I don't seem to find any other places to insert the pathname. Attached is the debug output of the same program compiled with HamLib 4.4 (it works) and with HamLib 4.6 (Error)
Hi Mike,
i compared the rig_open function in version 4.4 with that in version 4.6, and I noticed that in 4.6, the rig_settings_load_all(NULL) function is called, which looks for a configuration file. Could this be the problem because I don't have that file?
73, Mauro IZ2BKT
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Mike,
i compared the rig_open function in version 4.4 with that in version 4.6, and I noticed that in 4.6, the rig_settings_load_all(NULL) function is called, which looks for a configuration file. Could this be the problem because I don't have that file?
Add this as the 1st line in your program to see what version of hamlib you are really using.
printf("Hamlib version: %s\n", hamlib_version2);
Your code works here....
Hamlib version: Hamlib 4.6~git 2023-10-27T20:11:19Z SHA=7c5d4d 64-bitrig_check_rig_caps: p1=00007ffcd1163960, p2=00007ffcd1169ee0, rig_model=00007ffcd1163960, macro_name=00007ffcd1169ee0initrigs4_icom: _init calledrig_init: rig_model=Icom IC-7100 20231007.6rig_init: rig has VFO_Arig_init: rig has VFO_Brig_init: rig has VFO_MEM 2:icom.c(619):icom_init enteredicom_init: done 2:icom.c(723):icom_init returning(0)rig_token_lookup called for civaddrrig_confparam_lookup called for civaddrrig_set_conf calledrig_confparam_lookup called for 1rig_set_conf: civaddr='136' 2:icom.c(5039):icom_set_conf entered 2:icom.c(5069):icom_set_conf returning(0)rig.c(886):rig_open enteredrig_settings_get_path: path=C:\JTSDK64-Tools\tools\msys64\home\mdbla/.config/hamlib_settingsrig_settings_load_all: settings_file (C:\JTSDK64-Tools\tools\msys64\home\mdbla/.config/hamlib_settings): No such file or directoryrig_open: cwd=C:\JTSDK64-Tools\tools\msys64\home\mdbla\src\hamtestrig_open: C:\JTSDK64-Tools\tools\msys64\home\mdbla\src\hamtest/hamlib_settings does not existrig_open: async_data_enable=0, async_data_supported=0serial_open: COM3serial_setup: tcgetattrserial_setup: cfsetispeed=19200,0x000eserial_setup: cfsetospeed=19200,0x000eserial_setup: data_bits=8serial_setup: parity=0serial_setup: Handshake=Noneserial_setup: tcsetattr TCSANOWser_set_dtr: DTR=0
Hamlib version: Hamlib 4.6~git 2023-10-20T04:35:20Z SHA=01292b 32-bit
rig_check_rig_caps: p1=6CFEDD00, p2=6CFF3450, rig_model=6CFEDD00, macro_name=6CFF3450
initrigs4_icom: _init called
rig_init: rig_model=Icom IC-7100 20231007.6
rig_init: rig has VFO_A
rig_init: rig has VFO_B
rig_init: rig has VFO_MEM
2:icom.c(619):icom_init entered
icom_init: done
2:icom.c(723):icom_init returning(0)
rig_token_lookup called for civaddr
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): No such file or directory
rig_open: cwd=S:\Programmazione\HamLib_Test\HamLib_Test\Release
rig_open: S:\Programmazione\HamLib_Test\HamLib_Test\Release/hamlib_settings does not exist
rig_open: async_data_enable=0, async_data_supported=0
serial_open: \.\COM1
serial_open(230): open failed#1
serial_open: Unable to open \.\COM1 - No such file or directory
port_open: serial_open(\.\COM1) status=-6, err=No such file or directory
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-6) IO error
2:icom.c(735):icom_cleanup entered
2:icom.c(755):icom_cleanup returning(0)
rig_open return error
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): No such file or directory
rig_open: cwd=S:\Programmazione\HamLib_Test\HamLib_Test\Release
rig_open: S:\Programmazione\HamLib_Test\HamLib_Test\Release/hamlib_settings does not exist
rig_open: async_data_enable=0, async_data_supported=0
serial_open: \.\COM1
serial_open(230): open failed#1
serial_open: Unable to open \.\COM1 - No such file or directory
port_open: serial_open(\.\COM1) status=-6, err=No such file or directory
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-6) IO error
IO error
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hamlib version: Hamlib 4.6~git 2023-10-20T04:35:20Z SHA=01292b 32-bit
rig_check_rig_caps: p1=6CFEDD00, p2=6CFF3450, rig_model=6CFEDD00, macro_name=6CFF3450
initrigs4_icom: _init called
rig_init: rig_model=Icom IC-7100 20231007.6
rig_init: rig has VFO_A
rig_init: rig has VFO_B
rig_init: rig has VFO_MEM
2:icom.c(619):icom_init entered
icom_init: done
2:icom.c(723):icom_init returning(0)
rig_token_lookup called for civaddr
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): No such file or directory
rig_open: cwd=S:\Programmazione\HamLib_Test\HamLib_Test\Release
rig_open: S:\Programmazione\HamLib_Test\HamLib_Test\Release/hamlib_settings does not exist
rig_open: async_data_enable=0, async_data_supported=0
serial_open: .\COM1
serial_open(230): open failed#1
serial_open: Unable to open .\COM1 - No such file or directory
port_open: serial_open(.\COM1) status=-6, err=No such file or directory
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-6) IO error
2:icom.c(735):icom_cleanup entered
2:icom.c(755):icom_cleanup returning(0)
rig_open return error
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): No such file or directory
rig_open: cwd=S:\Programmazione\HamLib_Test\HamLib_Test\Release
rig_open: S:\Programmazione\HamLib_Test\HamLib_Test\Release/hamlib_settings does not exist
rig_open: async_data_enable=0, async_data_supported=0
serial_open: .\COM1
serial_open(230): open failed#1
serial_open: Unable to open .\COM1 - No such file or directory
port_open: serial_open(.\COM1) status=-6, err=No such file or directory
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-6) IO error
Hi,
my software uses HamLib_w32, and it works perfectly up to HamLib version
4.4. With HamLib version 4.5.5, it returns this error, and I can't get it to
work. Any help is much appreciated.
Thank you.
rig_settings_load_all: settings_file (.hamlib_settings): No such file or
directory
rig_open: cwd=C:\Temp\Temp\MFCTestCat
rig_open: C:\Temp\Temp\MFCTestCat/hamlib_settings does not exist
rig_open: async_data_enable=0, async_data_supported=0
serial_open: \.\COM1 <file: .="" com1=""> </file:>
serial_open(229): open failed#1
serial_open(229): open failed#2
serial_open(229): open failed#3
serial_open(229): open failed#4
serial_open: Unable to open \.\COM1 <file: .="" com1=""> - Bad file descriptor</file:>
port_open: serial_open(\.\COM1 <file: .="" com1=""> ) status=-6, err=Bad file
descriptor</file:>
rig_open: rs->comm_state==0?=0
1:rig.c(1013):rig_open returning(-6) IO error
1:rig.c(1383):rig_close entered
1:rig.c(1395):rig_close returning(-1) Invalid parameter
1:icom.c(725):icom_cleanup entered
1:icom.c(750):icom_cleanup returning(0)
IO error
73 de Mauro, IZ2BKT
Try the latest 4.6 here
https://n0nb.users.sourceforge.net/
Mike W9MDB
On Tuesday, October 17, 2023 at 11:32:43 AM CDT, iz2bkt iz2bkt@users.sourceforge.net wrote:
Hi,
my software uses HamLib_w32, and it works perfectly up to HamLib version
4.4. With HamLib version 4.5.5, it returns this error, and I can't get it to
work. Any help is much appreciated.
Thank you.
rig_settings_load_all: settings_file (.hamlib_settings): No such file or
directory
rig_open: cwd=C:\Temp\Temp\MFCTestCat
rig_open: C:\Temp\Temp\MFCTestCat/hamlib_settings does not exist
rig_open: async_data_enable=0, async_data_supported=0
serial_open: .\COM1 <file: .="" com1=""> </file:>
serial_open(229): open failed#1
serial_open(229): open failed#2
serial_open(229): open failed#3
serial_open(229): open failed#4
serial_open: Unable to open .\COM1 <file: .="" com1=""> - Bad file descriptor</file:>
port_open: serial_open(.\COM1 <file: .="" com1=""> ) status=-6, err=Bad file
descriptor</file:>
rig_open: rs->comm_state==0?=0
1:rig.c(1013):rig_open returning(-6) IO error
1:rig.c(1383):rig_close entered
1:rig.c(1395):rig_close returning(-1) Invalid parameter
1:icom.c(725):icom_cleanup entered
1:icom.c(750):icom_cleanup returning(0)
IO error
73 de Mauro, IZ2BKT
HamLib 4.5.5
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/hamlib/discussion/134214/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Thank you for the response. Unfortunately, it doesn't work even with version 4.6. I've also written a very simple code, but when it calls rig_open, it returns the attached error. It works perfectly when compiled with hamlib_w32 version 4.4, but it doesn't work with version 4.5 and later. I'm attaching the source code. Thank you.
Error:
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): Invalid argument
rig_open: cwd=\pc2\Temp\TestCat\MFCTestCat
rig_open: reading settings from \pc2\Temp\TestCat\MFCTestCat/hamlib_settings
rig_open: async_data_enable=0, async_data_supported=0
serial_open: \.\COM1
serial_setup: tcgetattr
serial_setup: unsupported rate specified: -858993460
port_open: serial_open(\.\COM1) status=-2, err=Bad file descriptor
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-2) Invalid configuration
Invalid configuration
Move this after rig_init
strcpy(m_sPort.pathname, _T("COM3"));
And also make it refer to the rig structure
strcpy(m_pRtx->state.pathname, _T("COM3"));
Mike W9MDB
On Thursday, October 19, 2023 at 05:11:30 AM CDT, iz2bkt iz2bkt@users.sourceforge.net wrote:
Thank you for the response. Unfortunately, it doesn't work even with version 4.6. I've also written a very simple code, but when it calls rig_open, it returns the attached error. It works perfectly when compiled with hamlib_w32 version 4.4, but it doesn't work with version 4.5 and later. I'm attaching the source code. Thank you.
Error:
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): Invalid argument
rig_open: cwd=\pc2\Temp\TestCat\MFCTestCat
rig_open: reading settings from \pc2\Temp\TestCat\MFCTestCat/hamlib_settings
rig_open: async_data_enable=0, async_data_supported=0
serial_open: .\COM1
serial_setup: tcgetattr
serial_setup: unsupported rate specified: -858993460
port_open: serial_open(.\COM1) status=-2, err=Bad file descriptor
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-2) Invalid configuration
Invalid configuration
Attachments:
* TestCat.cpp (1.5 kB; text/plain)
HamLib 4.5.5
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/hamlib/discussion/134214/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Hi Mike, thanks for the suggestion, but unfortunately, it doesn't fix the error. I'm attaching the content of the state.rigport and state.rigport.parm.serial structs for your review.
Can you please send debug output again with this change?
Also ensure your rigctl is using the correct library. If you have a Hamlib installed package the library will be in /usr/lib and if you compile the default location will be /usr/local/lib
This will tell which one it's using.
ldd rigctl
Hi Mike, thanks for the suggestion, but unfortunately, it doesn't fix the error. I'm attaching the content of the state.rigport and state.rigport.parm.serial structs for your review.
Attachments:
HamLib 4.5.5
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/hamlib/discussion/134214/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Hello Mike, my software (CatBkt https://www.maniaradio.it/en/catbkt.html) uses the HamLib_W32 library and has been working since 2011. I've always kept it updated with all the HamLib versions, and it works perfectly up to version 4.4. However, starting from HamLib version 4.5 and onwards, it doesn't work anymore and returns the error I mentioned in the previous post. To simplify the debugging process, I've written a very simple code attached to the previous post. The error remains the same even with the modification you provided.
Try 4.6 -- there was a bug which affected some backwards compatibility that was fixed.Are you recompiling your app or just dropping in the DLL? The old bug required a recompile with the rig.h file. But it should be fixed in the later version.
I still need the debug after you moved the path setting.
https://n0nb.users.sourceforge.net/
Hello Mike, my software (CatBkt https://www.maniaradio.it/en/catbkt.html) uses the HamLib_W32 library and has been working since 2011. I've always kept it updated with all the HamLib versions, and it works perfectly up to version 4.4. However, starting from HamLib version 4.5 and onwards, it doesn't work anymore and returns the error I mentioned in the previous post. To simplify the debugging process, I've written a very simple code attached to the previous post. The error remains the same even with the modification you provided.
HamLib 4.5.5
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/hamlib/discussion/134214/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
I have written a new console-mode test source code (attached), compiled with HamLib_w32 version 4.6, and this is the result:
S:\Programmazione\HamLib_Test\HamLib_Test\Release>HamLib_Test.exe
rig_check_rig_caps: p1=7262DD00, p2=72633450, rig_model=7262DD00, macro_name=72633450
initrigs4_icom: _init called
rig_init: rig_model=Icom IC-7100 20231007.6
rig_init: rig has VFO_A
rig_init: rig has VFO_B
rig_init: rig has VFO_MEM
2:icom.c(619):icom_init entered
icom_init: done
2:icom.c(723):icom_init returning(0)
rig_token_lookup called for civaddr
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): No such file or directory
rig_open: cwd=S:\Programmazione\HamLib_Test\HamLib_Test\Release
rig_open: S:\Programmazione\HamLib_Test\HamLib_Test\Release/hamlib_settings does not exist
rig_open: async_data_enable=0, async_data_supported=0
serial_open: \.\COM1
serial_setup: tcgetattr
serial_setup: unsupported rate specified: 0
port_open: serial_open(\.\COM1) status=-2, err=No such file or directory
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-2) Invalid configuration
2:rig.c(1515):rig_close entered
2:rig.c(1523):rig_close returning(-1) Invalid parameter
2:icom.c(735):icom_cleanup entered
2:icom.c(755):icom_cleanup returning(0)
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): No such file or directory
rig_open: cwd=S:\Programmazione\HamLib_Test\HamLib_Test\Release
rig_open: S:\Programmazione\HamLib_Test\HamLib_Test\Release/hamlib_settings does not exist
rig_open: async_data_enable=0, async_data_supported=0
serial_open: \.\COM1
serial_setup: tcgetattr
serial_setup: unsupported rate specified: 0
port_open: serial_open(\.\COM1) status=-2, err=No such file or directory
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-2) Invalid configuration
Invalid configuration
strcpy(m_sPort.pathname, "COM3"); m_pRtx->state.rigport = m_sPort;
You have to copy the pathname into the m_pRTx structure....not the m_sPort.
Mike W9MDB
I have written a new console-mode test source code (attached), compiled with HamLib_w32 version 4.6, and this is the result:
S:\Programmazione\HamLib_Test\HamLib_Test\Release>HamLib_Test.exe
rig_check_rig_caps: p1=7262DD00, p2=72633450, rig_model=7262DD00, macro_name=72633450
initrigs4_icom: _init called
rig_init: rig_model=Icom IC-7100 20231007.6
rig_init: rig has VFO_A
rig_init: rig has VFO_B
rig_init: rig has VFO_MEM
2:icom.c(619):icom_init entered
icom_init: done
2:icom.c(723):icom_init returning(0)
rig_token_lookup called for civaddr
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): No such file or directory
rig_open: cwd=S:\Programmazione\HamLib_Test\HamLib_Test\Release
rig_open: S:\Programmazione\HamLib_Test\HamLib_Test\Release/hamlib_settings does not exist
rig_open: async_data_enable=0, async_data_supported=0
serial_open: .\COM1
serial_setup: tcgetattr
serial_setup: unsupported rate specified: 0
port_open: serial_open(.\COM1) status=-2, err=No such file or directory
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-2) Invalid configuration
2:rig.c(1515):rig_close entered
2:rig.c(1523):rig_close returning(-1) Invalid parameter
2:icom.c(735):icom_cleanup entered
2:icom.c(755):icom_cleanup returning(0)
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): No such file or directory
rig_open: cwd=S:\Programmazione\HamLib_Test\HamLib_Test\Release
rig_open: S:\Programmazione\HamLib_Test\HamLib_Test\Release/hamlib_settings does not exist
rig_open: async_data_enable=0, async_data_supported=0
serial_open: .\COM1
serial_setup: tcgetattr
serial_setup: unsupported rate specified: 0
port_open: serial_open(.\COM1) status=-2, err=No such file or directory
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-2) Invalid configuration
Invalid configuration
Attachments:
HamLib 4.5.5
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/hamlib/discussion/134214/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Yes, but then m_sPort is mapped to m_pRtx->state.rigport; however, I also added strcpy(m_pRtx->state.rigport.pathname, "COM3"); I don't seem to find any other places to insert the pathname. Attached is the debug output of the same program compiled with HamLib 4.4 (it works) and with HamLib 4.6 (Error)
Hi Mike,
i compared the rig_open function in version 4.4 with that in version 4.6, and I noticed that in 4.6, the rig_settings_load_all(NULL) function is called, which looks for a configuration file. Could this be the problem because I don't have that file?
73, Mauro IZ2BKT
No...that's not a fatal error...just for debug purposes.
Hi Mike,
i compared the rig_open function in version 4.4 with that in version 4.6, and I noticed that in 4.6, the rig_settings_load_all(NULL) function is called, which looks for a configuration file. Could this be the problem because I don't have that file?
73, Mauro IZ2BKT
HamLib 4.5.5
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/hamlib/discussion/134214/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Mike, do you have any other ideas on how to solve the problem? Any help is appreciated. Thank you.
Add this as the 1st line in your program to see what version of hamlib you are really using.
printf("Hamlib version: %s\n", hamlib_version2);
Your code works here....
Hamlib version: Hamlib 4.6~git 2023-10-27T20:11:19Z SHA=7c5d4d 64-bitrig_check_rig_caps: p1=00007ffcd1163960, p2=00007ffcd1169ee0, rig_model=00007ffcd1163960, macro_name=00007ffcd1169ee0initrigs4_icom: _init calledrig_init: rig_model=Icom IC-7100 20231007.6rig_init: rig has VFO_Arig_init: rig has VFO_Brig_init: rig has VFO_MEM 2:icom.c(619):icom_init enteredicom_init: done 2:icom.c(723):icom_init returning(0)rig_token_lookup called for civaddrrig_confparam_lookup called for civaddrrig_set_conf calledrig_confparam_lookup called for 1rig_set_conf: civaddr='136' 2:icom.c(5039):icom_set_conf entered 2:icom.c(5069):icom_set_conf returning(0)rig.c(886):rig_open enteredrig_settings_get_path: path=C:\JTSDK64-Tools\tools\msys64\home\mdbla/.config/hamlib_settingsrig_settings_load_all: settings_file (C:\JTSDK64-Tools\tools\msys64\home\mdbla/.config/hamlib_settings): No such file or directoryrig_open: cwd=C:\JTSDK64-Tools\tools\msys64\home\mdbla\src\hamtestrig_open: C:\JTSDK64-Tools\tools\msys64\home\mdbla\src\hamtest/hamlib_settings does not existrig_open: async_data_enable=0, async_data_supported=0serial_open: COM3serial_setup: tcgetattrserial_setup: cfsetispeed=19200,0x000eserial_setup: cfsetospeed=19200,0x000eserial_setup: data_bits=8serial_setup: parity=0serial_setup: Handshake=Noneserial_setup: tcsetattr TCSANOWser_set_dtr: DTR=0
Mike, do you have any other ideas on how to solve the problem? Any help is appreciated. Thank you.
HamLib 4.5.5
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/hamlib/discussion/134214/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Hi Mike, hamlib_version2 returns an undefined external error in the link, so I used rig_version() and this is the result:
S:\Programmazione\HamLib_Test\HamLib_Test\Release>HamLib_Test.exe
Hamlib version: Hamlib 4.6~git 2023-10-20T04:35:20Z SHA=01292b 32-bit
rig_check_rig_caps: p1=6CFEDD00, p2=6CFF3450, rig_model=6CFEDD00, macro_name=6CFF3450
initrigs4_icom: _init called
rig_init: rig_model=Icom IC-7100 20231007.6
rig_init: rig has VFO_A
rig_init: rig has VFO_B
rig_init: rig has VFO_MEM
2:icom.c(619):icom_init entered
icom_init: done
2:icom.c(723):icom_init returning(0)
rig_token_lookup called for civaddr
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): No such file or directory
rig_open: cwd=S:\Programmazione\HamLib_Test\HamLib_Test\Release
rig_open: S:\Programmazione\HamLib_Test\HamLib_Test\Release/hamlib_settings does not exist
rig_open: async_data_enable=0, async_data_supported=0
serial_open: \.\COM1
serial_open(230): open failed#1
serial_open: Unable to open \.\COM1 - No such file or directory
port_open: serial_open(\.\COM1) status=-6, err=No such file or directory
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-6) IO error
2:rig.c(1515):rig_close entered
2:rig.c(1523):rig_close returning(-1) Invalid parameter
2:icom.c(735):icom_cleanup entered
2:icom.c(755):icom_cleanup returning(0)
rig_open return error
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): No such file or directory
rig_open: cwd=S:\Programmazione\HamLib_Test\HamLib_Test\Release
rig_open: S:\Programmazione\HamLib_Test\HamLib_Test\Release/hamlib_settings does not exist
rig_open: async_data_enable=0, async_data_supported=0
serial_open: \.\COM1
serial_open(230): open failed#1
serial_open: Unable to open \.\COM1 - No such file or directory
port_open: serial_open(\.\COM1) status=-6, err=No such file or directory
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-6) IO error
IO error
Send the code again to make sure we're using the same thing.
And how are you compiling this?
Hi Mike, hamlib_version2 returns an undefined external error in the link, so I used rig_version() and this is the result:
S:\Programmazione\HamLib_Test\HamLib_Test\Release>HamLib_Test.exe
Hamlib version: Hamlib 4.6~git 2023-10-20T04:35:20Z SHA=01292b 32-bit
rig_check_rig_caps: p1=6CFEDD00, p2=6CFF3450, rig_model=6CFEDD00, macro_name=6CFF3450
initrigs4_icom: _init called
rig_init: rig_model=Icom IC-7100 20231007.6
rig_init: rig has VFO_A
rig_init: rig has VFO_B
rig_init: rig has VFO_MEM
2:icom.c(619):icom_init entered
icom_init: done
2:icom.c(723):icom_init returning(0)
rig_token_lookup called for civaddr
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): No such file or directory
rig_open: cwd=S:\Programmazione\HamLib_Test\HamLib_Test\Release
rig_open: S:\Programmazione\HamLib_Test\HamLib_Test\Release/hamlib_settings does not exist
rig_open: async_data_enable=0, async_data_supported=0
serial_open: .\COM1
serial_open(230): open failed#1
serial_open: Unable to open .\COM1 - No such file or directory
port_open: serial_open(.\COM1) status=-6, err=No such file or directory
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-6) IO error
2:rig.c(1515):rig_close entered
2:rig.c(1523):rig_close returning(-1) Invalid parameter
2:icom.c(735):icom_cleanup entered
2:icom.c(755):icom_cleanup returning(0)
rig_open return error
rig_confparam_lookup called for civaddr
rig_set_conf called
rig_confparam_lookup called for 1
rig_set_conf: civaddr='136'
2:icom.c(5039):icom_set_conf entered
2:icom.c(5069):icom_set_conf returning(0)
rig.c(885):rig_open entered
rig_settings_get_path: path=?HOME/.hamlib_settings
rig_settings_load_all: settings_file (?HOME/.hamlib_settings): No such file or directory
rig_open: cwd=S:\Programmazione\HamLib_Test\HamLib_Test\Release
rig_open: S:\Programmazione\HamLib_Test\HamLib_Test\Release/hamlib_settings does not exist
rig_open: async_data_enable=0, async_data_supported=0
serial_open: .\COM1
serial_open(230): open failed#1
serial_open: Unable to open .\COM1 - No such file or directory
port_open: serial_open(.\COM1) status=-6, err=No such file or directory
rig_open: rs->comm_state==0?=0
rig.c(1092):rig_open returning2(-6) IO error
IO error
HamLib 4.5.5
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/hamlib/discussion/134214/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Mike,
in attachment, you'll find the Visual Studio 2022 solution zip file and the HamLib_W32 folder containing the libraries built for MSVC
Works on 64-bit -- but not 32-bit most likely due to structure alignments.
So everything has to be done via rig_set_conf -- this works on 32-bit here....
include <stdio.h></stdio.h>
include <string.h></string.h>
include <stdlib.h></stdlib.h>
include <rig.h></rig.h>
include <stdio.h></stdio.h>
include <string.h></string.h>
include <stdlib.h></stdlib.h>
include <rig.h></rig.h>
int main()
{
RIG* m_pRtx;
printf("Hamlib version: %s\n", rig_version());
rig_set_debug_level(RIG_DEBUG_TRACE);
rig_model_t myrig_model = 3070; //Icom IC-7100
unsigned char m_IndirizzoRTX = 136; //CI-V Address Icom IC-7100
m_pRtx = rig_init(myrig_model);
if (!m_pRtx)
{
printf("Errore rig_init");
return 1;
}
if (m_IndirizzoRTX)
{
unsigned char dati[255];
char tmp[10];
memset(tmp, 0, 10);
sprintf(tmp, "%d", m_IndirizzoRTX);
memset(dati, 0, 5);
strncpy((char)dati, tmp, 5);
rig_set_conf(m_pRtx, rig_token_lookup(m_pRtx,"civaddr"), (char)dati);
}
rig_set_conf(m_pRtx, rig_token_lookup(m_pRtx,"rig_pathname"), "COM3");
rig_set_conf(m_pRtx, rig_token_lookup(m_pRtx, "serial_speed"), "19200");
rig_set_conf(m_pRtx, rig_token_lookup(m_pRtx, "serial_parity"), "None");
rig_set_conf(m_pRtx, rig_token_lookup(m_pRtx, "data_bits"), "8");
rig_set_conf(m_pRtx, rig_token_lookup(m_pRtx, "stop_bits"), "1");
rig_set_conf(m_pRtx, rig_token_lookup(m_pRtx, "retry"), "3");
rig_set_conf(m_pRtx, rig_token_lookup(m_pRtx, "timeout"), "1000");
rig_set_conf(m_pRtx, rig_token_lookup(m_pRtx, "write_delay"), "0");
rig_set_conf(m_pRtx, rig_token_lookup(m_pRtx, "post_write_delay"), "0");
rig_set_conf(m_pRtx, rig_token_lookup(m_pRtx, "dtr_state"), "1");
rig_set_conf(m_pRtx, rig_token_lookup(m_pRtx, "rts_state"), "0");
int retcode = rig_open(m_pRtx);
if (retcode != RIG_OK)
{
static char s[10000];
memset(s, 0, 10000);
strcpy(s, rigerror(retcode));
rig_close(m_pRtx);
rig_cleanup(m_pRtx);
m_pRtx = NULL;
printf("rig_open return error\r\n");
printf(s);
return 1;
}
return 0;
}
On Monday, October 30, 2023 at 11:40:04 AM CDT, Mauro iz2bkt@users.sourceforge.net wrote:
Mike,
in attachment, you'll find the Visual Studio 2022 solution zip file and the HamLib_W32 folder containing the libraries built for MSVC
Attachments:
* HamLib_Test.zip (5.1 MB; application/x-zip-compressed)
HamLib 4.5.5
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/hamlib/discussion/134214/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
This works,
thanks Mike.
Best 73, Mauro IZ2BKT