hblink-org / hblink3 Goto Github PK
View Code? Open in Web Editor NEWHBlink for Python3
License: GNU General Public License v3.0
HBlink for Python3
License: GNU General Public License v3.0
Hello,
It’s possible to implement the ovcm bit inside the code ?
like mmdvm?
I used the openspot and there is not possible.
maybe it’s possible only the OVCM to the hotspot
thx
Do1kbl
Hi,
I am using hblink in a bridged configuration and have noticed DMRA frames cause an exception in the logs:
Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/twisted/python/log.py", line 86, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
--- <exception caught here> ---
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/udp.py", line 249, in doRead
self.protocol.datagramReceived(data, addr)
File "/opt/hblink3/hblink.py", line 532, in master_datagramReceived
logger.info('(%s) Recieved DMR Talker Alias from peer %s, subscriber %s', self._system, self._peers[_peer_id]['CALLSIGN'], int_id(_rf_src))
builtins.UnboundLocalError: local variable '_rf_src' referenced before assignment
Looking at the code, _rf_src is indeed referenced before assignment. A quick fix would be to just pass
DMRA frames but it would be nice to extract the info I guess.
Thanks
Matthew
2E0SIP
i have dedicated vm cloud, do you have clue or tutorial making this hblink3 running without docker
2nd time in one week.
ERROR 2020-11-02 09:49:48,212 (GLOBAL) STOPPING REACTOR TO AVOID MEMORY LEAK: Unhandled error in timed loop.
[Failure instance: Traceback: <class 'KeyError'>: 'LAST'
/usr/local/lib/python3.7/dist-packages/twisted/internet/base.py:1283:run
/usr/local/lib/python3.7/dist-packages/twisted/internet/base.py:1292:mainLoop
/usr/local/lib/python3.7/dist-packages/twisted/internet/base.py:913:runUntilCurrent
/usr/local/lib/python3.7/dist-packages/twisted/internet/task.py:239:call
--- ---
/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py:151:maybeDeferred
/opt/hblink3/bridge.py:203:stream_trimmer_loop
]
INFO 2020-11-02 09:49:48,219 (REPORT) HBlink reporting client disconnected: IPv4Address(type='TCP', host='127.0.0.1', port=51548)
Hi,
I am using hblink in a bridged configuration and have noticed DMRA frames cause an exception in the logs:
Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/twisted/python/log.py", line 86, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
--- <exception caught here> ---
File "/usr/local/lib/python3.7/dist-packages/twisted/internet/udp.py", line 249, in doRead
self.protocol.datagramReceived(data, addr)
File "/opt/hblink3/hblink.py", line 532, in master_datagramReceived
logger.info('(%s) Recieved DMR Talker Alias from peer %s, subscriber %s', self._system, self._peers[_peer_id]['CALLSIGN'], int_id(_rf_src))
builtins.UnboundLocalError: local variable '_rf_src' referenced before assignment
Looking at the code, _rf_src is indeed referenced before assignment. A quick fix would be to just pass
DMRA frames but it would be nice to extract the info I guess.
Thanks
Matthew
2E0SIP
Sometme after commit 08f6669, XLX support has vanished. Confirmed locally by a hard reset and XLX support is there.
Per https://dvswitch.groups.io/g/HBlink/message/2616
Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/twisted/python/log.py", line 86, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
File "/usr/lib/python3/dist-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
why = selectable.doRead()
--- <exception caught here> ---
File "/usr/lib/python3/dist-packages/twisted/internet/udp.py", line 249, in doRead
self.protocol.datagramReceived(data, addr)
File "/opt/hblink3/hblink.py", line 603, in peer_datagramReceived
self.dmrd_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data)
File "./bridge_all.py", line 130, in dmrd_received
if _seq > (self.STATUS[_slot]['RX_SEQ'] + 1):
builtins.TypeError: can't concat int to bytes
There's a need for int.from_bytes()
here, but we should look at the entirety of the code to make sure we're not just throwing duct tape on the problem.
I get his error running hblink3
Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/twisted/python/log.py", line 80, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/local/lib/python3.9/dist-packages/twisted/python/context.py", line 117, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/local/lib/python3.9/dist-packages/twisted/python/context.py", line 82, in callWithContext
return func(*args, **kw)
File "/usr/local/lib/python3.9/dist-packages/twisted/internet/posixbase.py", line 487, in _doReadOrWrite
why = selectable.doRead()
--- <exception caught here> ---
File "/usr/local/lib/python3.9/dist-packages/twisted/internet/udp.py", line 254, in doRead
self.protocol.datagramReceived(data, addr)
File "/opt/HBlink3/hblink.py", line 603, in peer_datagramReceived
self.dmrd_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _call_type, _frame_type, _dtype_vseq, _stream_id, _data)
File "/opt/HBlink3/./bridge.py", line 1047, in dmrd_received
self.group_received(_peer_id, _rf_src, _dst_id, _seq, _slot, _frame_type, _dtype_vseq, _stream_id, _data)
File "/opt/HBlink3/./bridge.py", line 817, in group_received
dmrbits = dmrbits[0:116] + _target_status[_target['TS']]['TX_EMB_LC'][_dtype_vseq] + dmrbits[148:264]
builtins.TypeError: cannot extend bitarray with 'bytes', use .pack() or .frombytes() instead
I'm using python3 on linux debian
Hello;I have problems connecting to another Hblink server, the server restarts the authentication very 1S connection is working and I get the QSO.
COFIG:
[DMR-FRANCOPHONE]
MODE: PEER
ENABLED: True
LOOSE: False
EXPORT_AMBE: False
IP:
PORT: 54004
MASTER_IP: 137.74.195.150
MASTER_PORT: 62030
PASSPHRASE: passw0rd
CALLSIGN: FXXXX
RADIO_ID: 2080XXX99
RX_FREQ: 443900000
TX_FREQ: 443900000
TX_POWER: 25
COLORCODE: 1
SLOTS: 1
LATITUDE: XX.XXXX
LONGITUDE: X.XXXX
HEIGHT: 75
LOCATION: XXXXXX,XXXXx
DESCRIPTION: HBlink
URL: XXXXXXXXXXXXXXX
SOFTWARE_ID: 20170620
PACKAGE_ID: MMDVM_HBlink
GROUP_HANGTIME: 5
OPTIONS:
USE_ACL: True
SUB_ACL: DENY:1
TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL
LOGS:
INFO 2020-10-31 11:35:32,445 (DMR-FRANCOPHONE) Repeater Authentication Accepted
INFO 2020-10-31 11:35:32,446 (DMR-FRANCOPHONE) Repeater Configuration Sent
INFO 2020-10-31 11:35:32,459 (DMR-FRANCOPHONE) Repeater Configuration Accepted
INFO 2020-10-31 11:35:32,460 (DMR-FRANCOPHONE) Sent options: (b'Type=HBlink;')
INFO 2020-10-31 11:35:37,414 (DMR-FRANCOPHONE) Sending login request to master 137.74.195.150:62030
INFO 2020-10-31 11:35:37,429 (DMR-FRANCOPHONE) Repeater Login ACK Received with 32bit ID: 4084617675
INFO 2020-10-31 11:35:37,443 (DMR-FRANCOPHONE) Repeater Authentication Accepted
INFO 2020-10-31 11:35:37,443 (DMR-FRANCOPHONE) Repeater Configuration Sent
INFO 2020-10-31 11:35:37,457 (DMR-FRANCOPHONE) Repeater Configuration Accepted
INFO 2020-10-31 11:35:37,458 (DMR-FRANCOPHONE) Sent options: (b'Type=HBlink;')
INFO 2020-10-31 11:35:42,416 (DMR-FRANCOPHONE) Sending login request to master 137.74.195.150:62030
INFO 2020-10-31 11:35:42,431 (DMR-FRANCOPHONE) Repeater Login ACK Received with 32bit ID: 2731809743
INFO 2020-10-31 11:35:42,445 (DMR-FRANCOPHONE) Repeater Authentication Accepted
INFO 2020-10-31 11:35:42,446 (DMR-FRANCOPHONE) Repeater Configuration Sent
INFO 2020-10-31 11:35:42,460 (DMR-FRANCOPHONE) Repeater Configuration Accepted
INFO 2020-10-31 11:35:42,462 (DMR-FRANCOPHONE) Sent options: (b'Type=HBlink;')
INFO 2020-10-31 11:35:47,415 (DMR-FRANCOPHONE) Sending login request to master 137.74.195.150:62030
INFO 2020-10-31 11:35:47,430 (DMR-FRANCOPHONE) Repeater Login ACK Received with 32bit ID: 859213554
INFO 2020-10-31 11:35:47,444 (DMR-FRANCOPHONE) Repeater Authentication Accepted
INFO 2020-10-31 11:35:47,445 (DMR-FRANCOPHONE) Repeater Configuration Sent
INFO 2020-10-31 11:35:47,459 (DMR-FRANCOPHONE) Repeater Configuration Accepted
INFO 2020-10-31 11:35:47,461 (DMR-FRANCOPHONE) Sent options: (b'Type=HBlink;')
Regards,
F4IRF
@randybuildsthings said in an HBlink message thread:
"We're using socket.gethostbyname() which only supports IPv4. We'll have to change that."
For context see https://dvswitch.groups.io/g/HBlink/topic/81430483
As discussed on the groups.io mailing list and submitted with some additional data.
At the end of any transmission to a bridge group in which an XLXPEER participates, HBlink thinks the XLX is sending a brief new group call in response to the end of the original stream. I am fairly certain (through packet capture) that there are no out of sequence packets being sent back from the XLX.
HBlink is somehow confused by what it thinks it sees. This results in artifacts of a new transmission in the log when none was went. It gets in the way of private calls working properly, as calls get forwarded to the XLX (where the desired recpient is not).
Configs and other data follow:
Log evidence:
INFO 2020-10-27 09:40:24,091 (HOTSPOTS) GROUP CALL START STREAM ID: 3158937644 SUB: K2IE (3134090) PEER: 313409002 (313409002) TGID 2 (2), TS 2
INFO 2020-10-27 09:40:24,095 (HOTSPOTS) Conference Bridge: TEST BRIDGE, Call Bridged to HBP System: XLX020E TS: 2, TGID: 2
INFO 2020-10-27 09:40:29,990 (HOTSPOTS) GROUP CALL END STREAM ID: 3158937644 SUB: K2IE (3134090) PEER: 313409002 (313409002) TGID 2 (2), TS 2, Duration: 5.90
INFO 2020-10-27 09:40:30,021 (XLX020E) GROUP CALL START STREAM ID: 3158900736 SUB: K2IE (3134090) PEER: 3163081 (3163081) TGID 9 (9), TS 2
Config:
[HOTSPOTS]
MODE: MASTER
ENABLED: True
REPEAT: True
MAX_PEERS: 10
EXPORT_AMBE: False
IP:
PORT: 54100
PASSPHRASE: passw0rd
GROUP_HANGTIME: 5
USE_ACL: True
REG_ACL: DENY:1
SUB_ACL: DENY:1
TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL
Ok to test against XLX020E for this issue
[XLX020E]
MODE: XLXPEER
ENABLED: True
LOOSE: True
EXPORT_AMBE: False
IP:
PORT: 54002
MASTER_IP: 66.175.215.217
MASTER_PORT: 62030
PASSPHRASE: passw0rd
CALLSIGN: YOUR_VALID_CALL
RADIO_ID: YOUR_VALID_RID
RX_FREQ: 449000000
TX_FREQ: 444000000
TX_POWER: 25
COLORCODE: 1
SLOTS: 1
LATITUDE: 38.0000
LONGITUDE: -095.0000
HEIGHT: 75
LOCATION: Anywhere, USA
DESCRIPTION: Test config
URL: www.w1abc.org
SOFTWARE_ID: 20170620
PACKAGE_ID: MMDVM_HBlink
GROUP_HANGTIME: 5
XLXMODULE: 4005
USE_ACL: True
SUB_ACL: DENY:1
TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL
Rules:
BRIDGES = {
'TEST BRIDGE': [
{'SYSTEM': 'HOTSPOTS', 'TS': 2, 'TGID': 2, 'ACTIVE': True, 'TIMEOUT': 2, 'TO_TYPE': 'NONE', 'ON': [], 'OFF': [], 'RESET': []},
xlxd.zip
{'SYSTEM': 'XLX020E', 'TS': 2, 'TGID': 2, 'ACTIVE': True, 'TIMEOUT': 2, 'TO_TYPE': 'NONE', 'ON': [], 'OFF': [], 'RESET': []},
]
}
UNIT = ['HOTSPOTS', 'XLX020E']
Wireshark capture done on the XLX attached so show how the sequence numbers are being properly incremented from the XLX end. See xlxd.zip.
Recently, BM servers bring TOTP/AirSecurity service online,(Different Ids)users need to dial TOTP codes to confirm their identity by private call before group calling。It seems hblink3 won’t transmit the private call with TOTP codes to BM servers when local repeater is bridged to BM servers。Are there any plans to adapt to this function in the near future?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.