Hamlib config being forgotten

V2 error reports
Post Reply
w9mdb
Old Man
Posts: 434
Joined: 13 Jul 2014, 12:05

Hamlib config being forgotten

Post by w9mdb »

Have had this problem for quite a while...have not figured out the magic sequence to make it happen but at least I found the symptom.

Two files here
#1 The first file here is the one that shows the bug -- the second configuration in the file does not contain the "Hamlib" entry "CATSoftware": 10
https://www.dropbox.com/s/fz99fogpekmoq ... n.bak?dl=0
So the Hamlib config goes back to the defaults after startup.


#2 After running Log4OM with #1 and exiting the Hamlib entry is there again.
So that's this file which works OK from that point on.
https://www.dropbox.com/s/4bklatvi3w51z ... .json?dl=0

At some point the shutdown process is not writing out the "CatSoftware": 10 entry on the configuration. This happens on the machine with two configurations and also on another machine with just one configuration so it's not a multi-config problem.
All the other "CatSoftware" entries get written out...just not Hamlib.
Sounds a bit to me like something is getting corrupted where it can't follow the CatSoftware structure properly and it aborts the list before writing out Hamlib under some unknown circumstances.
This also might be what's happening to the screen location during an upgrade? Every time I upgrade the screen location goes back to the default.
vk2ex
Novice Class
Posts: 19
Joined: 26 Jan 2022, 06:18

Re: Hamlib config being forgotten

Post by vk2ex »

I have noticed this as well, I also find if I change something in the configuration (Not the CAT controls) it also erases everything in the Hamlib setup, I now use OmniRig, this seems to stay configured not mater what I change in the setup.

DE Paul VK2EX
User avatar
IW3HMH
Site Admin
Posts: 2925
Joined: 21 Jan 2013, 14:20
Location: Quarto d'Altino - Venezia (ITA)
Contact:

Re: Hamlib config being forgotten

Post by IW3HMH »

Hi Mike, i can't reproduce that issue. When that happens, is there something on the application log file?
If you set the config and then reopen the config screen the issue is there?

Configuration is saved in memory when you close the configuration screen, and then is persisted to json file on program closing.
If you open settings then close them and then reopen them and the issue is there, there is something wrong in the part of the code that write the configuration, if not, is somewhere else but that info will be useful to me...
Daniele Pistollato - IW3HMH
w9mdb
Old Man
Posts: 434
Joined: 13 Jul 2014, 12:05

Re: Hamlib config being forgotten

Post by w9mdb »

It seems to happen if anything changes -- i.e. has to write out the config file.

It's quite obviously not writing the hamlib config so what is the logic that causes the hamlib config to get written out (or rather to NOT get written out)?

This has happened to me and another op I know dozens of times for a long time now.
w9mdb
Old Man
Posts: 434
Joined: 13 Jul 2014, 12:05

Re: Hamlib config being forgotten

Post by w9mdb »

Here's something else I noticed -- I'm running 2.23.0.0 now and my current config.json has 7 entries. I notice that 10 is not in the first list. I have two configurations and the 1st one here I haven't used in quite a while.

"CATSoftware": 0,
"CATSoftware": 20,
"CATSoftware": 30,
"CATSoftware": 0,
"CATSoftware": 20,
"CATSoftware": 30,
"CATSoftware": 10,

In doing testing today I notice that I cannot create a link to the W9MDB/QRP config in the User Configuration. When I select the W9MDB/QRP, make it active, then click the link button it creates a shortcut to the W9MDB config instead. And...when I make the W9MDB/QRP config active and exit Log4OM it does not write out that configuration as the Hamlib #10 entry is still missing from the W9MDB/QRP config.
I had to start Log4OM with the W9MDB/QRP config -- re-enable Hamlib -- then it write the #10 entry to the W9MDB/QRP config.json entry.

One other Hamlib bug -- the debug level choices are 1 too high. The "empty" entry in the pulldown should be None and a value of zero. And it appears BUG is using a value of 2 instead of 1.
enum rig_debug_level_e {
RIG_DEBUG_NONE = 0, /*!< no bug reporting */
RIG_DEBUG_BUG, /*!< serious bug */
RIG_DEBUG_ERR, /*!< error case (e.g. protocol, memory allocation) */
RIG_DEBUG_WARN, /*!< warning */
RIG_DEBUG_VERBOSE, /*!< verbose */
RIG_DEBUG_TRACE, /*!< tracing */
RIG_DEBUG_CACHE /*!< caching */



https://www.dropbox.com/s/gk81pwt2cy3l2 ... .json?dl=0
w9mdb
Old Man
Posts: 434
Joined: 13 Jul 2014, 12:05

Re: Hamlib config being forgotten

Post by w9mdb »

Here's one problem that should be easily fixed with at least 1 retry when hamlib tcp times out.
Sometimes Log4OM times out and sometimes it does not. So maybe interacting with other TCP processes?
This isn't the only problem as I've shown above where the config doesn't get written out correctly.

2022-09-14 17:09:59.3146 INFO: [#=zNDKAT964ZDXYtbBl4Q==] : [HAMLIB] Starting Hamlib service
2022-09-14 17:09:59.3146 INFO: [#=zNDKAT964ZDXYtbBl4Q==] : [HAMLIB] Using existing connection: False
2022-09-14 17:09:59.3156 INFO: [ProgramStorage] : [CAT STATUS CHANGED] Running: True
2022-09-14 17:10:00.0557 INFO: [ProgramStorage] : Performing partial reset of application cache on CountryStatistics
2022-09-14 17:10:00.2860 INFO: [AdifMonitorManagement] : Starting ADIF monitor service
2022-09-14 17:10:00.2860 INFO: [ClusterManagement] : Connecting cluster(s)...
2022-09-14 17:10:00.2880 INFO: [#=zBef90BtwFmh2SdlhLQ0sDVo=] : Starting remote control on port 2241
2022-09-14 17:10:00.2880 INFO: * [#=zwr1RPaC2Xiey4eZ_eQ==][1214 ms] : User profile opened
2022-09-14 17:10:00.2890 INFO: [#=zmvSRUWWAuFhmSkbXzm705II=] : Starting UDP listener on port 2236 for service JTALERT/ADIF_MESSAGE
2022-09-14 17:10:00.2890 INFO: [#=zi6pKYf_gQKPI5wC0vrNtK34=] : Starting UDP server...
2022-09-14 17:10:00.3249 INFO: [#=zNWAIyI4=] : [HAMLIB] DAEMON STARTED: C:\Users\cfogr\AppData\Roaming\Log4OM2\hamlib\rigctld.exe --model=4 --rig-file=127.0.0.1:12345 -Z --vfo
2022-09-14 17:10:00.3439 INFO: [TelnetConnection] : 127.0.0.1:7373 Connecting to 127.0.0.1:7373
2022-09-14 17:10:00.3439 INFO: [HamlibEngine] : [HAMLIB] Supported VFO's: VFOA VFOB
2022-09-14 17:10:00.3449 INFO: [TelnetConnection] : 127.0.0.1:7373 Telnet connection opened
2022-09-14 17:10:00.3449 INFO: [TelnetConnection] : 127.0.0.1:7373 IS PRIMARY
2022-09-14 17:10:00.3469 INFO: [ClusterManagement] : 127.0.0.1:7373 Cluster Login started
2022-09-14 17:10:01.5107 INFO: [#=zFOZUrDRAopOHDTNn0w==] : Updating worked before list...
2022-09-14 17:10:02.9539 INFO: [#=z$N66EVWiT4Wmiq1xwbg4bIM=] : [UPDATE] Refreshing solar data start
2022-09-14 17:10:02.9579 INFO: [#=zC2BfmC3$Ch8ncbs0HkvbsZm6OuzN] : Loading Geomagnetic data series
2022-09-14 17:10:02.9579 INFO: [#=zC2BfmC3$Ch8ncbs0HkvbsZm6OuzN] : GEOMAGNETIC DATA (DGD) downloading from https://services.swpc.noaa.gov/text/dai ... ndices.txt
2022-09-14 17:10:02.9918 INFO: [ClusterManagement] : 127.0.0.1:7373 Cluster Login completed
2022-09-14 17:10:03.2541 INFO: [#=zC2BfmC3$Ch8ncbs0HkvbsZm6OuzN] : GEOMAGNETIC DATA (DGD) load from file completed
2022-09-14 17:10:03.2561 INFO: [#=z81jGgu_XEllIE2cqoYO6jJTT1nLi] : Loading Solar data series
2022-09-14 17:10:03.2561 INFO: [#=z81jGgu_XEllIE2cqoYO6jJTT1nLi] : GEOMAGNETIC DATA (DSD) downloading from https://services.swpc.noaa.gov/text/dai ... ndices.txt
2022-09-14 17:10:03.3239 INFO: [#=z81jGgu_XEllIE2cqoYO6jJTT1nLi] : GEOMAGNETIC DATA (DSD) load from file completed
2022-09-14 17:10:03.3289 INFO: [#=zM0$c8sBFqF8CoQx5U8QFQidjBap8ZtqP5BdMpaI=] : Loading Predicted Solar data
2022-09-14 17:10:03.3289 INFO: [#=zM0$c8sBFqF8CoQx5U8QFQidjBap8ZtqP5BdMpaI=] : GEOMAGNETIC DATA (Predicted) downloading from https://services.swpc.noaa.gov/json/sol ... cycle.json
2022-09-14 17:10:03.3987 INFO: [#=zM0$c8sBFqF8CoQx5U8QFQidjBap8ZtqP5BdMpaI=] : GEOMAGNETIC DATA (Predicted) load from file completed
2022-09-14 17:10:03.4096 INFO: [#=z7XQ26SOGrg6GwbJmGcQs0wTAJQwCeBKoEg==] : Calculating HOURLY VOACAP data: EM95lf with 100.0 watts and 93 sun spots on hour: 17
2022-09-14 17:10:03.4176 INFO: * [#=z$N66EVWiT4Wmiq1xwbg4bIM=][463 ms] : [UPDATE] Refreshing solar data end
2022-09-14 17:10:03.8265 INFO: [#=z7XQ26SOGrg6GwbJmGcQs0wTAJQwCeBKoEg==] : Hourly VOACAP calculation completed
2022-09-14 17:10:04.3372 INFO: [#=zFOZUrDRAopOHDTNn0w==] : Worked before list updated
2022-09-14 17:10:04.3411 INFO: * [#=zYHzlatSg3$r6VeEydXtbgBU=][5247 ms] : Recalculating statistics asynchronous process completed
2022-09-14 17:10:10.3538 ERROR: [HamlibEngine][#=zlo0vSNo=] : [HAMLIB] CAT Send message error. Message: +\get_vfo_info VFOA

[EXCEPTION] Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at L4ONG.BL.CAT.HamlibEngine.#=zlo0vSNo=(TcpClient #=zw7_SOj0=, String #=zM7VSSuE=)
2022-09-14 17:10:10.3578 ERROR: [HamlibEngine][#=zWApzMZA5Z8gD$sSK9pwMVq0=] : [HAMLIB] CAT POLLING exception
[EXCEPTION] Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at L4ONG.BL.CAT.HamlibEngine.#=zlo0vSNo=(TcpClient #=zw7_SOj0=, String #=zM7VSSuE=)
at L4ONG.BL.CAT.HamlibEngine.#=zWApzMZA5Z8gD$sSK9pwMVq0=()
2022-09-14 17:10:10.3588 INFO: [HamlibEngine] : [HAMLIB] Stop polling. Timeout True
2022-09-14 17:10:10.3588 INFO: [HamlibEngine] : [HAMLIB] Stopping Hamlib process...
2022-09-14 17:10:10.3588 INFO: [HamlibEngine] : [HAMLIB] Hamlib process stopped successfully
User avatar
IW3HMH
Site Admin
Posts: 2925
Joined: 21 Jan 2013, 14:20
Location: Quarto d'Altino - Venezia (ITA)
Contact:

Re: Hamlib config being forgotten

Post by IW3HMH »

Hi guys, please contact me in order to test a new alpha version with a potential fix to the save issue
Daniele Pistollato - IW3HMH
Post Reply