Problem with CWOP station ID validation

43 views
Skip to first unread message

Mickael Hoareau

unread,
Nov 18, 2019, 12:02:23 AM11/18/19
to weewx-development
Hello,


I would like to report a problem I encountered  when configuring CWOP rest service.

I was configuring weewx for a user migrating from Weatherlink IP (Davis Vantage Pro2). He is a radio amateur from Reunion (France), in Indian Ocean.
In the weatherlink configuration, the link with CWOP was settup with the ID and without passcode and it has been working for a long time.

In the weewx.conf, I then did this :
    [[CWOP]]
        enable
= true
        station
= FR5ZU
        post_interval
= 300



But I kept getting this error message in the log :
APRS station FR5ZU requires passcode


In the restx.py file, the problem was in the test line 1048 here : https://github.com/weewx/weewx/blob/3eb97346b92b588beb451449d67aab30b30ad6f3/bin/weewx/restx.py#L1048
This test return false for the "FR5ZU" id.


If I comment all the "if ... else" code and try this :
        _cwop_dict.setdefault('passcode', '-1')
       
#if re.match(StdCWOP.valid_prefix_re, _cwop_dict['station']):
       
#    # It does not.
       
#    _cwop_dict.setdefault('passcode', '-1')
       
#elif 'passcode' not in _cwop_dict:
       
#    syslog.syslog(syslog.LOG_NOTICE,
       
#                  "APRS station %s requires passcode" %
       
#                  _cwop_dict['station'])
       
#    return

=> It works juste fine.

I am not really familiar with CWOP, but isn't there a problem with the StdCWOP.valid_prefix_re regexp ?

Have a nice day,
Mickael

Joe Spears

unread,
Nov 18, 2019, 6:36:14 AM11/18/19
to weewx-development
Just add his passcode to the config file.  His passcode is 

21994


Joe 

nine...@gmail.com

unread,
Nov 18, 2019, 7:13:33 AM11/18/19
to weewx-development

Did you fill in this section in weewx.conf?

 

        # If this is an APRS (radio amateur) station, uncomment

        # the following and replace with a passcode (e.g., 12345).

        passcode = XXXX

 

The passcode is tied to the callsign,  You can get a passcode from the internet if you Google APRS pass code.

 

Tom

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/100af05c-24f3-4f6f-affa-1b1b297f8d86%40googlegroups.com.

Thomas Keffer

unread,
Nov 18, 2019, 9:28:04 AM11/18/19
to Mickael Hoareau, weewx-development
Unfortunately, on login, CWOP will accept any combination of user and passcode. It's only later down the data stream that they reject posts, when it's far too late for us to do anything about it. Hence, the check in restx.py.

Still, I think the right thing to do is to stop checking on our end. That means mysterious failures if a passcode is not specified when one is needed, but it's better than us trying to guess what CWOP wants. There's also findu.com for figuring out what went wrong.

Commit f185322

-tk

--
Reply all
Reply to author
Forward
0 new messages