Skip to content

WSPR Callsign with one char prefix failed. #29

Open

Description

@pe0fko

Hello,
I did have some trouble with a one char prefix in the wspr callsign (F/PE0FKO), it was not received by the wspr systems.
Did check the code for the JTEncode::wspr_encode() function and found the problem in JTEncode::wspr_bit_packing(). There, in the function line 1000, the 3 and 2 char prefix is handled, only the one char prefix is not!
I fixed the code with some extra if statement for the 1 char prefix and it works (for me ;-)), maybe you update the repo for that.
73, Fred, pe0fko

Activity

  1. ivica3730k commented on Dec 19, 2024

    @ivica3730k

    Hello, I did have some trouble with a one char prefix in the wspr callsign (F/PE0FKO), it was not received by the wspr systems. Did check the code for the JTEncode::wspr_encode() function and found the problem in JTEncode::wspr_bit_packing(). There, in the function line 1000, the 3 and 2 char prefix is handled, only the one char prefix is not! I fixed the code with some extra if statement for the 1 char prefix and it works (for me ;-)), maybe you update the repo for that. 73, Fred, pe0fko

    Hello Fred. Would you mind sharing your code, I have same problem decoding my M/9A3ICE callsign!

    73 Ivica

  2. ivica3730k commented on Dec 19, 2024

    @ivica3730k

    Hello, I did have some trouble with a one char prefix in the wspr callsign (F/PE0FKO), it was not received by the wspr systems. Did check the code for the JTEncode::wspr_encode() function and found the problem in JTEncode::wspr_bit_packing(). There, in the function line 1000, the 3 and 2 char prefix is handled, only the one char prefix is not! I fixed the code with some extra if statement for the 1 char prefix and it works (for me ;-)), maybe you update the repo for that. 73, Fred, pe0fko

    Hello Fred. Would you mind sharing your code, I have same problem decoding my M/9A3ICE callsign!

    73 Ivica

    For anyone currently curious this is the code snippet:

          if (prefix[1] == ' ' || prefix[1] == 0) {
            prefix[3] = 0;
            prefix[2] = prefix[0];
            prefix[1] = ' ';
            prefix[0] = ' ';
    
          } else if (prefix[2] == ' ' || prefix[2] == 0) {
            prefix[3] = 0;
            prefix[2] = prefix[1];
            prefix[1] = prefix[0];
            prefix[0] = ' ';
          }

    i will follow up with a propper pr when I test if I have broken anything else with this. thanks @pe0fko

  3. pe0fko commented on Dec 19, 2024

    @pe0fko
    Author

    Thanks Ivica, the code looks Ok and I did use it this year a lot .
    I hope it will be in the lib code, after change to platformio I did forget to add it :-(

    73, Fred,
    pe0fko.

    //PE0FKO : The single prefix fix.
    #if 1
                            if(prefix[1] == ' ' || prefix[1] == 0)
                            {
                                    // Right align prefix
                                    prefix[3] = 0;
                                    prefix[2] = prefix[0];
                                    prefix[1] = ' ';
                                    prefix[0] = ' ';
                            }
                            else if(prefix[2] == ' ' || prefix[2] == 0)
                            {
                                    // Right align prefix
                                    prefix[3] = 0;
                                    prefix[2] = prefix[1];
                                    prefix[1] = prefix[0];
                                    prefix[0] = ' ';
                            }
    #else
                            if(prefix[2] == ' ' || prefix[2] == 0)
                            {
                                    // Right align prefix
                                    prefix[3] = 0;
                                    prefix[2] = prefix[1];
                                    prefix[1] = prefix[0];
                                    prefix[0] = ' ';
                            }
    #endif
    
  4. ivica3730k commented on Dec 19, 2024

    @ivica3730k

    Thanks Ivica, the code looks Ok and I did use it this year a lot . I hope it will be in the lib code, after change to platformio I did forget to add it :-(

    73, Fred, pe0fko.

    //PE0FKO : The single prefix fix.
    #if 1
                            if(prefix[1] == ' ' || prefix[1] == 0)
                            {
                                    // Right align prefix
                                    prefix[3] = 0;
                                    prefix[2] = prefix[0];
                                    prefix[1] = ' ';
                                    prefix[0] = ' ';
                            }
                            else if(prefix[2] == ' ' || prefix[2] == 0)
                            {
                                    // Right align prefix
                                    prefix[3] = 0;
                                    prefix[2] = prefix[1];
                                    prefix[1] = prefix[0];
                                    prefix[0] = ' ';
                            }
    #else
                            if(prefix[2] == ' ' || prefix[2] == 0)
                            {
                                    // Right align prefix
                                    prefix[3] = 0;
                                    prefix[2] = prefix[1];
                                    prefix[1] = prefix[0];
                                    prefix[0] = ' ';
                            }
    #endif
    

    Cheers sir! I have opened a pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions