DJ2LS / FreeDATA

A free, open-source, multi-platform application for sending files and messages, using the codec2 HF modems
https://wiki.freedata.app/
GNU General Public License v3.0
142 stars 17 forks source link

[Bug]: Rigctl not found #804

Open danieldamon opened 1 week ago

danieldamon commented 1 week ago

FreeDATA Version

v0.16.2-alpha

What operating system are you using?

Windows

Operating System Version

windows 11 32H2 AMD Ryzen

Architecture

x64

Area of problem

Rig Control

Describe the bug

2024-09-12 17:59:12 [info ] [C2 ] Libcodec2 loaded path=C:\Users\dangd\AppData\Local\FreeDATA\FREEDA~1\lib\codec2\libcodec2.dll Using config from C:\Users\dangd\AppData\Local\FreeDATA\FREEDA~1\config.ini 2024-09-12 17:59:13 [info ] [DatabaseManager]: Initialized database 2024-09-12 17:59:13 [info ] [DatabaseManager]: Database vacuumed successfully Hamlib args ==>['-m', '2028', '-r', 'COM3', '-s', '115200', '-p', 'COM3', '-P', 'USB', '-D', 'RIG', '--set-conf', 'dtr_state=ON', '--set-conf', 'data_bits=8', '--set-conf', 'stop_bits=1', ''] 2024-09-12 17:59:13 [warning ] Rigctld binary not found. 2024-09-12 17:59:13 [info ] [DatabaseManager]: Database reindexed successfully 2024-09-12 17:59:13 [info ] [DatabaseManager]: Database integrity check passed 2024-09-12 17:59:13 [info ] --------------------------------------------------- 2024-09-12 17:59:13 [info ] 2024-09-12 17:59:13 [info ] [GUI] AVAILABLE ON http://127.0.0.1:5001/gui 2024-09-12 17:59:13 [info ] just open it in your browser 2024-09-12 17:59:13 [info ] 2024-09-12 17:59:13 [info ] --------------------------------------------------- 2024-09-12 17:59:15 [warning ] [RIGCTLD] Failed to connect to rigctld: [WinError 10061] No connection could be made because the target machine actively refused it 2024-09-12 17:59:15 [info ] tested audio devices result=[True, True] 2024-09-12 17:59:15 [info ] starting freedata_server.... 2024-09-12 17:59:15 [debug ] [C2 ] Create 48<->8 kHz resampler 2024-09-12 17:59:15 [debug ] [C2 ] Creating audio buffer size=9600 2024-09-12 17:59:15 [debug ] [C2 ] Creating audio buffer size=9600 2024-09-12 17:59:15 [debug ] [C2 ] Creating audio buffer size=9600 2024-09-12 17:59:15 [debug ] [C2 ] Creating audio buffer size=9600 2024-09-12 17:59:15 [debug ] [C2 ] Creating audio buffer size=9600 2024-09-12 17:59:15 [debug ] [C2 ] Creating audio buffer size=9600 2024-09-12 17:59:15 [debug ] [C2 ] Creating audio buffer size=9600 2024-09-12 17:59:15 [debug ] [C2 ] Creating audio buffer size=9600 2024-09-12 17:59:15 [info ] loading frame dispatcher.....

2024-09-12 17:59:15 [debug ] Event: ev={'freedata_server': 'started'} 2024-09-12 17:59:15 [info ] [MDM] init: get audio devices input_device=3cdc output_device=0129 2024-09-12 17:59:15 [info ] [MDM] init: receiving audio from 'Stereo Mix (Realtek HD Audio Stereo input)' 2024-09-12 17:59:15 [info ] [MDM] init: transmiting audio on 'Speakers 2 (Realtek HD Audio output with HAP)' 2024-09-12 17:59:15 [debug ] [MDM] init: starting pyaudio callback and decoding threads 2024-09-12 17:59:15 [debug ] [C2 ] Create 48<->8 kHz resampler 2024-09-12 17:59:15 [info ] [DatabaseManagerBeacon]: Deleted 0 beacons older than 2 days 2024-09-12 17:59:16 [info ] [API] GET response_code=307 url=http://127.0.0.1:5001/gui 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/gui/ 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/version 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/devices/audio 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/devices/serial 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/radio 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/modem/state 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/modem/state 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/version 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/devices/audio 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/radio 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/devices/serial 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/config 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/radio 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/freedata/messages 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/version 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/devices/audio 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/devices/serial 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/radio 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/config 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/freedata/messages 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/radio {'NETWORK': {'modemaddress': '127.0.0.1', 'modemport': 5001}, 'STATION': {'mycall': 'KE0UR', 'mygrid': 'DM45gg', 'myssid': 3, 'ssid_list': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 'enable_explorer': False, 'enable_stats': False, 'respond_to_cq': True, 'enable_callsign_blacklist': False, 'callsign_blacklist': []}, 'AUDIO': {'input_device': '3cdc', 'output_device': '0129', 'rx_audio_level': 8, 'tx_audio_level': 8}, 'RIGCTLD': {'ip': '127.0.0.1', 'port': 4532, 'path': '', 'command': '', 'arguments': '', 'enable_vfo': True}, 'RADIO': {'control': 'rigctld_bundle', 'model_id': 2028, 'serial_port': 'COM3', 'serial_speed': 115200, 'data_bits': 8, 'stop_bits': 1, 'serial_handshake': 'None', 'ptt_port': 'COM3', 'ptt_type': 'USB', 'serial_dcd': 'RIG', 'serial_dtr': 'ON', 'serial_rts': 'OFF'}, 'TCI': {'tci_ip': '127.0.0.1', 'tci_port': 50001}, 'MESH': {'enable_protocol': False}, 'MODEM': {'enable_hmac': False, 'enable_morse_identifier': False, 'tx_delay': 50, 'maximum_bandwidth': 2438, 'enable_socket_interface': False}, 'SOCKET_INTERFACE': {'enable': False, 'host': '127.0.0.1', 'cmd_port': 8000, 'data_port': 8001}, 'MESSAGES': {'enable_auto_repeat': False}, 'GUI': {'auto_run_browser': True}} 2024-09-12 17:59:16 [info ] [API] POST response_code=200 url=http://127.0.0.1:5001/config 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/config 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/radio 2024-09-12 17:59:16 [info ] [API] GET response_code=200 url=http://127.0.0.1:5001/freedata/messages {'NETWORK': {'modemaddress': '127.0.0.1', 'modemport': 5001}, 'STATION': {'mycall': 'KE0UR', 'mygrid': 'DM45gg', 'myssid': 3, 'ssid_list': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 'enable_explorer': False, 'enable_stats': False, 'respond_to_cq': True, 'enable_callsign_blacklist': False, 'callsign_blacklist': []}, 'AUDIO': {'input_device': '3cdc', 'output_device': '0129', 'rx_audio_level': 8, 'tx_audio_level': 8}, 'RIGCTLD': {'ip': '127.0.0.1', 'port': 4532, 'path': '', 'command': '', 'arguments': '', 'enable_vfo': True}, 'RADIO': {'control': 'rigctld_bundle', 'model_id': 2028, 'serial_port': 'COM3', 'serial_speed': 115200, 'data_bits': 8, 'stop_bits': 1, 'serial_handshake': 'None', 'ptt_port': 'COM3', 'ptt_type': 'USB', 'serial_dcd': 'RIG', 'serial_dtr': 'ON', 'serial_rts': 'OFF'}, 'TCI': {'tci_ip': '127.0.0.1', 'tci_port': 50001}, 'MESH': {'enable_protocol': False}, 'MODEM': {'enable_hmac': False, 'enable_morse_identifier': False, 'tx_delay': 50, 'maximum_bandwidth': 2438, 'enable_socket_interface': False}, 'SOCKET_INTERFACE': {'enable': False, 'host': '127.0.0.1', 'cmd_port': 8000, 'data_port': 8001}, 'MESSAGES': {'enable_auto_repeat': False}, 'GUI': {'auto_run_browser': True}} 2024-09-12 17:59:16 [info ] [API] POST response_code=200 url=http://127.0.0.1:5001/config {'NETWORK': {'modemaddress': '127.0.0.1', 'modemport': 5001}, 'STATION': {'mycall': 'KE0UR', 'mygrid': 'DM45gg', 'myssid': 3, 'ssid_list': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 'enable_explorer': False, 'enable_stats': False, 'respond_to_cq': True, 'enable_callsign_blacklist': False, 'callsign_blacklist': []}, 'AUDIO': {'input_device': '3cdc', 'output_device': '0129', 'rx_audio_level': 8, 'tx_audio_level': 8}, 'RIGCTLD': {'ip': '127.0.0.1', 'port': 4532, 'path': '', 'command': '', 'arguments': '', 'enable_vfo': True}, 'RADIO': {'control': 'rigctld_bundle', 'model_id': 2028, 'serial_port': 'COM3', 'serial_speed': 115200, 'data_bits': 8, 'stop_bits': 1, 'serial_handshake': 'None', 'ptt_port': 'COM3', 'ptt_type': 'USB', 'serial_dcd': 'RIG', 'serial_dtr': 'ON', 'serial_rts': 'OFF'}, 'TCI': {'tci_ip': '127.0.0.1', 'tci_port': 50001}, 'MESH': {'enable_protocol': False}, 'MODEM': {'enable_hmac': False, 'enable_morse_identifier': False, 'tx_delay': 50, 'maximum_bandwidth': 2438, 'enable_socket_interface': False}, 'SOCKET_INTERFACE': {'enable': False, 'host': '127.0.0.1', 'cmd_port': 8000, 'data_port': 8001}, 'MESSAGES': {'enable_auto_repeat': False}, 'GUI': {'auto_run_browser': True}} 2024-09-12 17:59:16 [info ] [API] POST response_code=200 url=http://127.0.0.1:5001/config 2024-09-12 17:59:17 [warning ] [RIGCTLD] Failed to connect to rigctld: [WinError 10061] No connection could be made because the target machine actively refused it

To Reproduce

Use Hamlib internal.

Expected behavior

Should not get message that Rigctld could not be found.

Screenshots

No response

Log Files

No response

Additional context

I'm using TRUSDX transciever which conforms to Kenwood TS480. I have used it with WSTJX which also uses Hamlib, so this should work.

danieldamon commented 1 week ago

First warning in the log may not be obvious. It is:

2024-09-12 17:59:13 [warning ] Rigctld binary not found.

DJ2LS commented 1 week ago

It might be possible, there is a problem with Hamlib and x64 systems. @dk5sm, maybe you can assist here if you have the time?

dk5sm commented 1 week ago

@danieldamon I have had a (at least) similar issue here. To help with your case, plase allow some questions:

  1. I assume that you are also using the FreeDATA Windows Installer package - correct?
  2. What rigctl mode are you using? See Settings -> Rigcontrol: internal or external Hamlib?

As far as your log is concerned, I am missing the Hamlib path, which leads to the conclusion that you may have configured external Hamlib. Please switch to internal Hamlib and make sure that you have set the appropriate settings for your transceiver.

After restarting the server, a successful hamlib start should read like this:

Hamlib args ==>['-m', '3073', '-r', 'COM5', '-s', '115200', '-P', 'RIG', '--set-conf', 'data_bits=8', '--set-conf', 'stop_bits=1', '']
2024-09-14 10:18:48 [info     ] Attempting to start rigctld using binary found at: C:\Users\[Username]\AppData\Local\FreeData\freedata-server\lib\hamlib\hamlib-w64-4.5.5\bin\rigctld.exe

73 de Stefan | DK5SM.

danieldamon commented 6 days ago

Yes, I am using the windows .exe installer.

The mode I am using is Rigcontrol:internal. I did not install an external hamlib

danieldamon commented 6 days ago

Thanks for your work on this. I'd love to have something that works on all platforms. Currently it looks like it is not used widely,, so I'm willing to test to help out.

danieldamon commented 6 days ago

By the way, my computer is dual boot with Linux. I just got it working in Linux, so apparently I'm doing it right.

dk5sm commented 6 days ago

OK, please check whether these files are contained in this path (C:\Users[Username]....):

image

Check also with the file date: I had an issue with old/corrupt files. To be on the safe side, please unzip all the files you find in C:\Users[Username]\AppData\Local\FreeData\freedata-server\lib\hamlib\hamlib-w64-4.5.5.zip, and then test them again.

danieldamon commented 5 days ago

In fact, there is no bin directory, although that directory does exist in the zip archive. How is it extracted, and I will try manually to see what happens.

danieldamon commented 5 days ago

In fact, it seems to work when I extract manually

DJ2LS commented 5 days ago

Thanks for the feedback! So you are missing just the bin folder, right? Did this occur at first installation. Or as an update?

danieldamon commented 4 days ago

First installation. If you like, I can delete all and try again.

DJ2LS commented 4 days ago

It might be a problem with nuitka bundling. Maybe the corresponding subfolders are ignored

DJ2LS commented 4 days ago

confirming its a nuitka problem

DJ2LS commented 3 days ago

python3 -m nuitka \ --remove-output \ --assume-yes-for-downloads \ --follow-imports \ --include-data-dir=lib=lib \ --include-data-dir=../freedata_gui/dist=gui \ --include-data-files=lib/codec2/=lib/codec2/ \ --include-data-files=lib/hamlib/hamlib-w64-4.5.5/bin/.exe=lib/hamlib/hamlib-w64-4.5.5/bin/ \ --include-data-files=lib/hamlib/hamlib-w64-4.5.5/bin/*.dll=lib/hamlib/hamlib-w64-4.5.5/bin/ \ --include-data-files=config.ini.example=config.ini \ --standalone server.py \ --output-filename=freedata-server

hardcoded fix, we need to make the version of hamlib dynamically.

DJ2LS commented 3 days ago

@danieldamon As an additional information: If you are install hamlib system wide, it will also work. However, it seems I've found a fix

danieldamon commented 3 days ago

Thanks! should I try again?

DJ2LS commented 3 days ago

The windows package isn’t published yet, so we need to release it first.Von meinem iPhone gesendetAm 17.09.2024 um 17:54 schrieb danlG @.***>: Thanks! should I try again?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were assigned.Message ID: @.***>

DJ2LS commented 2 days ago

@LA3QMA could you do me the favour and testing the internal development nsis package?

danieldamon commented 2 days ago

Not sure I understand nsis, but am looking on github

danieldamon commented 2 days ago

Sorry, I'll be on a plane most of the day, but I can continue Thursday. NSIS looks like an open source windows installer. Unfortunately, I am not familiar with it. Can you provide pointers?