rossengeorgiev / aprs-python

📡 Python module for working with APRS
http://aprs-python.readthedocs.io/en/latest/
GNU General Public License v2.0
114 stars 37 forks source link

Which APRS password? #75

Closed jwalsh2me closed 2 years ago

jwalsh2me commented 2 years ago

I am following the example here to send a test packet: Doc

import aprslib

# a valid passcode for the callsign is required in order to send
AIS = aprslib.IS("MyCall", passwd="p@sswordIsHere", port=14580)
AIS.connect()
# send a single status message
AIS.sendall("MyCall>APRS,TCPIP*:>status text")

I am getting aprslib.exceptions.LoginError: Password is incorrect

I have tried the login password I use on aprs.fi, as well as my API Key.

I seem to be missing something obvious here any guidance is appreciated.

John

jwalsh2me commented 2 years ago

OK - I figured it out ... it is not the API Key. Suggested new sample code:

import aprslib

callsign = 'MyCall'
passcode = aprslib.passcode(callsign)

# a valid passcode for the callsign is required in order to send
AIS = aprslib.IS(callsign, passwd=passcode, port=14580)
AIS.connect()
# send a single status message
AIS.sendall("N0CALL>APRS,TCPIP*:>This is a test message")