first version overriding own callsign ssid

This commit is contained in:
DJ2LS 2022-12-04 13:01:09 +01:00
parent 564f4c106e
commit cf4b3bf9cd

View file

@ -351,6 +351,15 @@ def process_tnc_commands(data):
dxcallsign = received_json["dxcallsign"]
# check if specific callsign is set with different SSID than the TNC is initialized
try:
mycallsign = received_json["parameter"][0]["mycallsign"]
mycallsign = helpers.callsign_to_bytes(mycallsign)
mycallsign = helpers.bytes_to_callsign(mycallsign)
except Exception:
mycallsign = static.MYCALLSIGN
# additional step for being sure our callsign is correctly
# in case we are not getting a station ssid
# then we are forcing a station ssid = 0
@ -370,10 +379,8 @@ def process_tnc_commands(data):
# try connecting
try:
static.DXCALLSIGN = dxcallsign
static.DXCALLSIGN_CRC = helpers.get_crc_24(static.DXCALLSIGN)
DATA_QUEUE_TRANSMIT.put(["CONNECT", dxcallsign, attempts])
DATA_QUEUE_TRANSMIT.put(["CONNECT", mycallsign, dxcallsign, attempts])
command_response("connect", True)
except Exception as err:
command_response("connect", False)
@ -385,7 +392,6 @@ def process_tnc_commands(data):
# allow beacon transmission again
static.BEACON_PAUSE = False
# allow beacon transmission again
static.BEACON_PAUSE = False