kf7eel / hbnet

HBNet is a fork of HBlink that includes a web GUI, APRS, SMS decoding, and other features.
https://hbnet.xyz
GNU General Public License v3.0
46 stars 24 forks source link

Huge problem with requirments.txt module versions, repeating rules and aprs system. #44

Open PROCHOTKILLER opened 9 months ago

PROCHOTKILLER commented 9 months ago
  1. After a long time of tinkering with hbnet i was able to at least get it running. The problem was that your code requires specific functions that the newer versions of pip modules that are installed from the requirements.txt are not able to provide + the best python version for running hbnet at least in my case is 3.9.18

  2. The working server config from HBlink just won't work in any shape or form.(Either from importing in the GUI or configuring it from scratch by hand) We are running HBlink locally only so we want private channels and public channels on each repeater/hotspot with echo access and aprs functionality.

hblink.cfg ``[MASTER-1] MODE: MASTER ENABLED: True REPEAT: True MAX_PEERS: 10 EXPORT_AMBE: False IP: PORT: 62030 PASSPHRASE: Password1 GROUP_HANGTIME: 5 USE_ACL: True REG_ACL: DENY:1 SUB_ACL: DENY:1 TGID_TS1_ACL: PERMIT:ALL TGID_TS2_ACL: PERMIT:ALL

[MASTER-2] MODE: MASTER ENABLED: True REPEAT: True MAX_PEERS: 10 EXPORT_AMBE: False IP: PORT: 62031 PASSPHRASE: Password2 GROUP_HANGTIME: 5 USE_ACL: True REG_ACL: DENY:1 SUB_ACL: DENY:1 TGID_TS1_ACL: PERMIT:ALL TGID_TS2_ACL: PERMIT:ALL``

``[MASTER-3] MODE: MASTER ENABLED: True REPEAT: True MAX_PEERS: 10 EXPORT_AMBE: False IP: PORT: 42000 PASSPHRASE: password3 GROUP_HANGTIME: 5 USE_ACL: True REG_ACL: DENY:1 SUB_ACL: DENY:1 TGID_TS1_ACL: PERMIT:ALL TGID_TS2_ACL: PERMIT:ALL

[MASTER-4] MODE: MASTER ENABLED: True REPEAT: True MAX_PEERS: 10 EXPORT_AMBE: False IP: PORT: 42001 PASSPHRASE: Password4 GROUP_HANGTIME: 5 USE_ACL: True REG_ACL: DENY:1 SUB_ACL: DENY:1 TGID_TS1_ACL: PERMIT:ALL TGID_TS2_ACL: PERMIT:ALL``

rules.py ``BRIDGES = { 'REPEATERHOTSPOTEXTERNAL': [ {'SYSTEM': 'MASTER-1', 'TS': 1, 'TGID': 260, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, {'SYSTEM': 'MASTER-2', 'TS': 1, 'TGID': 260, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, {'SYSTEM': 'MASTER-3', 'TS': 1, 'TGID': 260, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, {'SYSTEM': 'MASTER-4', 'TS': 1, 'TGID': 260, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, ], 'REPEATERHOTSPOTLOCAL': [ {'SYSTEM': 'MASTER-1', 'TS': 2, 'TGID': 260110, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, {'SYSTEM': 'MASTER-2', 'TS': 2, 'TGID': 260110, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, {'SYSTEM': 'MASTER-3', 'TS': 2, 'TGID': 260110, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, {'SYSTEM': 'MASTER-4', 'TS': 2, 'TGID': 260110, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, ], 'APRS': [ {'SYSTEM': 'MASTER-1', 'TS': 2, 'TGID': 9099, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, {'SYSTEM': 'MASTER-2', 'TS': 2, 'TGID': 9099, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, {'SYSTEM': 'MASTER-3', 'TS': 2, 'TGID': 9099, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, {'SYSTEM': 'MASTER-4', 'TS': 2, 'TGID': 9099, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, ], 'REPEATERLOCAL': [ {'SYSTEM': 'MASTER-1', 'TS': 1, 'TGID': 260111, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, ], 'HOTSPOTLOCAL1': [ {'SYSTEM': 'MASTER-2', 'TS': 1, 'TGID': 260111, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, ], 'HOTSPOTLOCAL2': [ {'SYSTEM': 'MASTER-3', 'TS': 1, 'TGID': 260111, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, ], 'HOTSPOTLOCAL3': [ {'SYSTEM': 'MASTER-4', 'TS': 1, 'TGID': 260111, 'ACTIVE': True, 'TIMEOUT': 30, 'TO_TYPE':'NONE', 'ON': [11], 'OFF': [55], 'RESET': []}, ],

    'LOCALECHO1': [
            {'SYSTEM': 'ECHOTEST',            'TS': 2, 'TGID': 9999,     'ACTIVE': True,  'TIMEOUT': 0,  'TO_TYPE':'NONE', 'ON': [],         'OFF': [],      'RESET': []},
            {'SYSTEM': 'MASTER-1',            'TS': 2, 'TGID': 9999,     'ACTIVE': True,  'TIMEOUT': 0,  'TO_TYPE':'NONE', 'ON': [],         'OFF': [],      'RESET': []},
    ],
    'LOCALECHO2': [
            {'SYSTEM': 'ECHOTEST',            'TS': 2, 'TGID': 9999,     'ACTIVE': True,  'TIMEOUT': 0,  'TO_TYPE':'NONE', 'ON': [],         'OFF': [],      'RESET': []},
            {'SYSTEM': 'MASTER-2',            'TS': 2, 'TGID': 9999,     'ACTIVE': True,  'TIMEOUT': 0,  'TO_TYPE':'NONE', 'ON': [],         'OFF': [],      'RESET': []},
    ],
    'LOCALECHO3': [
            {'SYSTEM': 'ECHOTEST',            'TS': 2, 'TGID': 9999,     'ACTIVE': True,  'TIMEOUT': 0,  'TO_TYPE':'NONE', 'ON': [],         'OFF': [],      'RESET': []},
            {'SYSTEM': 'MASTER-3',            'TS': 2, 'TGID': 9999,     'ACTIVE': True,  'TIMEOUT': 0,  'TO_TYPE':'NONE', 'ON': [],         'OFF': [],      'RESET': []},
    ],
    'LOCALECHO4': [
            {'SYSTEM': 'ECHOTEST',            'TS': 2, 'TGID': 9999,     'ACTIVE': True,  'TIMEOUT': 0,  'TO_TYPE':'NONE', 'ON': [],         'OFF': [],      'RESET': []},
            {'SYSTEM': 'MASTER-4',            'TS': 2, 'TGID': 9999,     'ACTIVE': True,  'TIMEOUT': 0,  'TO_TYPE':'NONE', 'ON': [],         'OFF': [],      'RESET': []},
    ]

}``

  1. The APRS funcionality just will not decode any gps packet. Even with a supported radio. (AnyTone AT-D878UV II Plus)

  2. If i could be of any help to take the project further at least to the stable working phase please reach out to me. We have our own private repeaters and hotspots to test with, our own private server space, multiple radios by multiple manufacturers with gps support (AnyTone AT-D878UV II Plus, TYT MD-9600 PRO with GPS, TYT MD-390 with GPS, BAOFENG DM-1702 with GPS)

PROCHOTKILLER commented 9 months ago

Anytime a radio tries to upload its gps location over dAPRS i get a error in the log and ofcourse no reaction on the aprs IS. This happens on the officialy supported AnyTone D878, on the baofeng 1702 and the TYT MD9600.

This is the log:

Feb 21 20:30:15 HBnet python[979443]: DEBUG 2024-02-21 20:30:15,259 MMDVM RCVD Feb 21 20:30:15 HBnet python[979443]: INFO 2024-02-21 20:30:15,259 20:30:15 - 02/21/24 Feb 21 20:30:15 HBnet python[979443]: DEBUG 2024-02-21 20:30:15,259 Decoded data: Feb 21 20:30:15 HBnet python[979443]: DEBUG 2024-02-21 20:30:15,259 b'bd00c01200238b0186a49126' Feb 21 20:30:15 HBnet python[979443]: Unhandled Error Feb 21 20:30:15 HBnet python[979443]: Traceback (most recent call last): Feb 21 20:30:15 HBnet python[979443]: File "/usr/local/lib/python3.9/site-packages/twisted/python/log.py", line 80, in callWithContext Feb 21 20:30:15 HBnet python[979443]: return context.call({ILogContext: newCtx}, func, *args, kw) Feb 21 20:30:15 HBnet python[979443]: File "/usr/local/lib/python3.9/site-packages/twisted/python/context.py", line 117, in callWithContext Feb 21 20:30:15 HBnet python[979443]: return self.currentContext().callWithContext(ctx, func, *args, *kw) Feb 21 20:30:15 HBnet python[979443]: File "/usr/local/lib/python3.9/site-packages/twisted/python/context.py", line 82, in callWithContext Feb 21 20:30:15 HBnet python[979443]: return func(args, kw) Feb 21 20:30:15 HBnet python[979443]: File "/usr/local/lib/python3.9/site-packages/twisted/internet/posixbase.py", line 482, in _doReadOrWrite Feb 21 20:30:15 HBnet python[979443]: why = selectable.doRead() Feb 21 20:30:15 HBnet python[979443]: --- --- Feb 21 20:30:15 HBnet python[979443]: File "/usr/local/lib/python3.9/site-packages/twisted/internet/udp.py", line 254, in doRead Feb 21 20:30:15 HBnet python[979443]: self.protocol.datagramReceived(data, addr) Feb 21 20:30:15 HBnet python[979443]: File "/opt/hbnet/hblink.py", line 640, in master_datagramReceived Feb 21 20:30:15 HBnet python[979443]: self.dmrd_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data) Feb 21 20:30:15 HBnet python[979443]: File "/opt/hbnet/data_gateway.py", line 2147, in dmrd_received Feb 21 20:30:15 HBnet python[979443]: data_received(self, _peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data) Feb 21 20:30:15 HBnet python[979443]: File "/opt/hbnet/data_gateway.py", line 1718, in data_received Feb 21 20:30:15 HBnet python[979443]: if _call_type == call_type and header_ID(_data)[3] == '5' and ba2num(bptc_decode(data)[69:72]) == 0 and ba2num(bptc> Feb 21 20:30:15 HBnet python[979443]: builtins.NameError: name 'header_ID' is not defined

PROCHOTKILLER commented 9 months ago

Ok so ive managed to get it working.

  1. IGate position reporting - Solved (I had to add a zero in front of the Longitude value, Format for IGate position: igate_lat=2309.24N:igate_lon=06123.05E)
  2. Radio position reporting - Solved (so far only from 2 supported anytone radios and only on private call even tho both private and group calls are selected)
  3. APRS Settings format - Solved This is the format where XXXXXXX is your dmr id, YYYYYY is your callsign, ZZZZZZ is your aprs.is pincode: {XXXXXX: [{'call': 'YYYYYY'}, {'ssid': '1'}, {'icon': '/F'}, {'comment': 'DMR dAPRS System XXXXXX'}, {'pin': 'ZZZZZZ'}, {'APRS': True}]}

The system i run this on: Debian 12 Python 3.11.2

Python PIP Modules versions:

These are really important so make sure that these are what you install

aprslib==0.7.2 attrs==22.2.0 Automat==22.10.0 Babel==2.14.0 bcrypt==3.2.2 bitarray==2.9.2 bitstring==4.1.4 blinker==1.7.0 branca==0.6.0 certifi==2022.9.24 chardet==5.1.0 charset-normalizer==3.0.1 click==8.1.3 colorama==0.4.6 configparser==6.0.1 constantly==15.1.0 cryptography==38.0.4 dmr-utils3==0.1.29 dnspython==2.6.1 email-validator==2.1.0.post1 Flask==2.1.3 Flask-BabelEx==0.9.4 Flask-Ext==0.1 Flask-Login==0.6.3 Flask-Mail==0.9.1 Flask-Markdown==0.3 Flask-SQLAlchemy==2.5.1 Flask-User==1.0.2.2 Flask-WTF==1.2.1 folium==0.15.1 greenlet==3.0.3 httplib2==0.20.4 hyperlink==21.0.0 idna==3.3 incremental==21.3.0 itsdangerous==2.0.1 Jinja2==3.1.3 libscrc==1.8.1 maidenhead==1.7.0 Markdown==3.5.2 MarkupSafe==2.1.5 numpy==1.26.4 paho-mqtt==2.0.0 passlib==1.7.4 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycurl==7.45.2 PyHamcrest==2.0.3 PyMySQL==1.1.0 pynmea2==1.19.0 pyOpenSSL==23.0.0 pyparsing==3.0.9 PySimpleSOAP==1.16.2 python-apt==2.6.0 python-debian==0.1.49 python-debianbts==4.0.1 pytz==2024.1 reportbug==12.0.0 requests==2.28.1 resettabletimer==1.0.0 scapy==2.5.0 service-identity==18.1.0 setproctitle==1.3.3 six==1.16.0 speaklater==1.3 SQLAlchemy==1.4.51 Twisted==22.4.0 typing_extensions==4.9.0 urllib3==1.26.12 uWSGI==2.0.24 Werkzeug==2.2.2 WTForms==3.1.2 xyzservices==2023.10.1 zope.interface==5.5.2

PROCHOTKILLER commented 9 months ago

:)