Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QRP-Labs QDX IF command parsing buggy #1196

Closed
madpsy opened this issue Dec 29, 2022 · 14 comments
Closed

QRP-Labs QDX IF command parsing buggy #1196

madpsy opened this issue Dec 29, 2022 · 14 comments
Labels
bug needs test Patches have been submitted but need testing to close issue
Milestone

Comments

@madpsy
Copy link

madpsy commented Dec 29, 2022

I'm using a QRP-Labs QDX which emulates TS-440. When requesting PTT state from rigctl (sending command 't') it returns 0 (RX) even when still transmitting.

It appears that the 440 protocol returns accurate PTT state from 'P8' of the 'IF' command as per the spec. I'm going to suggest that hamlib reads PTT state from this, rather than return 0 as it does now.

Discussion here: https://groups.io/g/QRPLabs/topic/95922381?p=Created,,,20,1,0,0::recentpostdate/sticky,,,20,2,0,95922381,previd=1672274690459582723,nextid=1672093401297648786

I might be wrong but this is as far as I've gotten in terms of debug.

@mdblack98
Copy link
Contributor

mdblack98 commented Dec 29, 2022 via email

@mdblack98 mdblack98 added the bug label Dec 29, 2022
@mdblack98 mdblack98 added this to the 4.5.3 milestone Dec 29, 2022
@mdblack98
Copy link
Contributor

mdblack98 commented Dec 29, 2022 via email

@madpsy
Copy link
Author

madpsy commented Dec 29, 2022

I've not done quite what you've asked but thought this may be more useful. These are to/from the radio itself.

IF;                   IF00014074000     +00000000003000000 ;
TX;
IF;                   IF00014074000     +00000000013000000 ;
RX;
IF;                   IF00014074000     +00000000003000000 ;

Note that this issue has nothing to do with WSJT-X - that works fine. It sends TX; and RX; and behaves as expected. The issue is when other software queries rigctld for get_ptt it returns 0. I know this works fine with a TS-2000 (at least a radio emulating one).

@madpsy
Copy link
Author

madpsy commented Dec 29, 2022

log.txt

Here's the startup log

@mdblack98
Copy link
Contributor

mdblack98 commented Dec 29, 2022 via email

@mdblack98 mdblack98 changed the title TS-440 should infer PTT state from IF/P8 QRP-Labs QDX IF command parsing buggy Dec 29, 2022
@madpsy
Copy link
Author

madpsy commented Dec 29, 2022

Well spotted. I mean if you're confident their implementation is broken I'm sure they wouldn't mind fixing it. Just don't want to end up in a back and forth over who's righ - though that's exactly why there's a spec after all.

If you want me to raise a bug with them I'm more than happy to - likewise happy for a workaround in Hamlab. Your call 👍

@mdblack98
Copy link
Contributor

2022-12-29:11:16:28.261651: 0000 49 46 3b IF;
2022-12-29:11:16:28.261728: read_string called, rxmax=50
2022-12-29:11:16:28.274911: read_string(): RX 38 characters
2022-12-29:11:16:28.275010: 0000 49 46 30 30 30 31 34 30 37 34 30 30 30 20 20 20 IF00014074000
2022-12-29:11:16:28.275092: 0010 20 20 2b 30 30 30 30 30 30 30 30 30 30 33 30 30 +0000000000300
2022-12-29:11:16:28.275169: 0020 30 30 30 30 20 3b 0000 ;
2022-12-29:11:16:28.275245: ic10_cmd_trim: incoming data_len is '37'
2022-12-29:11:16:28.275321: ic10_cmd_trim: data['36'] is ' '
2022-12-29:11:16:28.275397: ic10_cmd_trim: For i='37' data_len is now '36'
2022-12-29:11:16:28.275473: ic10_cmd_trim: finished loop.. i='36' data_len='36' data[i-1]='0'

@mdblack98
Copy link
Contributor

mdblack98 commented Dec 29, 2022 via email

mdblack98 added a commit that referenced this issue Dec 29, 2022
This should fix QRP QRDX buggy IF message -- hopefully the fix theirs to send 33 bytes.
#1196 (comment)
mdblack98 added a commit that referenced this issue Dec 29, 2022
This should fix QRP QRDX buggy IF message -- hopefully the fix theirs to send 33 bytes.
#1196 (comment)
@mdblack98 mdblack98 added needs test Patches have been submitted but need testing to close issue and removed need more info labels Dec 29, 2022
@madpsy
Copy link
Author

madpsy commented Dec 29, 2022

Thanks I'll raise a bug their end too. I'm using '2002' which is correct to the best of my knowlege as per rigctld --list:

2002  Kenwood                TS-440S                 20200407.0      Stable      RIG_MODEL_TS440

madpsy@rocket:~$ rigctld -m 2002 -r /dev/ttyACM1 -s 9600 -t 51111 

@mdblack98
Copy link
Contributor

mdblack98 commented Dec 29, 2022 via email

@madpsy
Copy link
Author

madpsy commented Dec 29, 2022

Will do after work, thanks in advance.

@madpsy
Copy link
Author

madpsy commented Dec 29, 2022

Just FYI I've no idea what these lines are all about:

2022-12-29:11:16:27.128634: kenwood_open: not the right driver apparently (found 2002, asked for 2028, checked TS-440S)
2022-12-29:11:16:27.128668: kenwood_open: found match 020
2022-12-29:11:16:27.128701: kenwood_open: not the right driver apparently (found 2002, asked for 2046, checked TS-440S)

That's when running with -m 2002

@mdblack98
Copy link
Contributor

mdblack98 commented Dec 29, 2022 via email

@madpsy
Copy link
Author

madpsy commented Dec 29, 2022

I'm not 100% - would need to test. The good news is your fix is indeed working a treat so much appreciated. Shall link to this bug when I raise one on their end.

Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs test Patches have been submitted but need testing to close issue
Projects
None yet
Development

No branches or pull requests

2 participants