Giter VIP home page Giter VIP logo

dj2ls / freedata Goto Github PK

View Code? Open in Web Editor NEW
134.0 11.0 17.0 64.09 MB

A free, open-source, multi-platform application for sending files and messages, using the codec2 HF modems

Home Page: https://wiki.freedata.app/

License: GNU General Public License v3.0

Python 56.27% Shell 2.03% JavaScript 11.73% HTML 0.16% CSS 0.21% TypeScript 3.30% Vue 25.72% SCSS 0.01% Batchfile 0.16% NSIS 0.41%
codec2 ham-radio hamradio freedata hf-chat

freedata's People

Contributors

arodland avatar aschuhardt avatar code-factor avatar db1uj avatar deejdeej avatar dependabot[bot] avatar dj2ls avatar dk5sm avatar drowe67 avatar jorg85 avatar kronenpj avatar la3qma avatar mashintime avatar ptsmonteiro avatar sourcery-ai[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freedata's Issues

ARQ RPT ACK not recognized by TX

19:16:49.994 DATA: ARQ | TX | M:12 | F:[1-4] | T:[0/9] [000%] | A:[1/3]
19:17:04.369 WARNING: ARQ | RX | REQUEST FOR REPEATING FRAMES: [b'\x00\x03']
19:17:04.369 WARNING: ARQ | TX | SENDING REQUESTED FRAMES: [b'\x00\x03']
19:17:09.498 INFO: ARQ | RX | ACK AFTER RPT
19:17:09.498 DATA: ARQ | TX | M:12 | F:[1-4] | T:[0/9] [000%] | A:[2/3]
19:17:16.833 WARNING: ARQ | RX | ACK TIMEOUT!

ARQ is not jumping to next burst if burst has been acknowledged

GL_INVALID_FRAMEBUFFER_OPERATION

[6443:0814/163054.649349:ERROR:gles2_cmd_decoder.cc(4990)] [.RendererMainThread-0x7fd0da840a00]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawArrays: framebuffer incomplete

protocol for data

Data as JSON:

- Datatype: File

  • Filename
  • Filetype
  • Data
  • Checksum

- Datatype: Message

  • Data
  • Checksum

IndexError after failed transmission

9:52:56.417 INFO: DATA [DJ2LS]>> <<[DN2LS] A:[1/3]
19:52:58.374 INFO: DATA [DJ2LS]>>|<<[DN2LS] [SNR:6.7]
19:52:58.375 INFO: ARQ | TX | M:14 | DATA FRAME --- BYTES: 106 ARQ FRAMES: 18
19:52:58.375 DATA: ARQ | TX | M:14 | F:[1-2] | T:[0/18] [000%] | A:[1/3]
19:53:06.594 WARNING: ARQ | RX | ACK TIMEOUT!
19:53:06.594 DATA: ARQ | TX | M:14 | F:[1-2] | T:[0/18] [000%] | A:[2/3]
19:53:14.792 WARNING: ARQ | RX | ACK TIMEOUT!
19:53:14.793 DATA: ARQ | TX | M:14 | F:[1-2] | T:[0/18] [000%] | A:[3/3]
19:53:22.991 WARNING: ARQ | RX | ACK TIMEOUT!
19:53:22.991 FAILED: ARQ | TX | NO ACK RECEIVED | DATA SHOULD BE RESEND!
19:53:22.991 INFO: RATE (DATA/ACK) :[34 bit/s | 259 B/min]
19:53:22.991 INFO: ARQ | TX | BUFFER EMPTY
19:53:24.993 INFO: DATA [DJ2LS]<< >>[DN2LS] [SNR:6.7]
19:53:32.410 INFO: DATA [DJ2LS]>> <<[DN2LS] A:[1/3]
19:53:34.855 INFO: DATA [DJ2LS]>>|<<[DN2LS] [SNR:-1.6]
19:53:34.860 INFO: ARQ | TX | M:12 | DATA FRAME --- BYTES: 106 ARQ FRAMES: 1
19:53:34.860 DATA: ARQ | TX | M:12 | F:[1-1] | T:[0/1] [000%] | A:[1/3]
19:53:39.664 WARNING: ARQ | RX | REQUEST FOR REPEATING FRAMES: [b'\x00\x02']
19:53:39.664 WARNING: ARQ | TX | SENDING REQUESTED FRAMES: [b'\x00\x02']
Exception in thread ARQ_DATA:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/parallels/FreeDV-JATE/data_handler.py", line 524, in open_dc_and_transmit
arq_transmit(data_out)
File "/home/parallels/FreeDV-JATE/data_handler.py", line 341, in arq_transmit
modem.transmit_arq_burst()
File "/home/parallels/FreeDV-JATE/modem.py", line 327, in transmit_arq_burst
payload_data = bytes(static.TX_BUFFER[static.ARQ_N_SENT_FRAMES + missing_frame - 1])
IndexError: list index out of range

send signalling frame twice for ack frames

At poor channels we have problems with signalling frames.

Initial PING or OPEN DATACHANNEL: send signalling once,
PING ACK or DATA CHANNEL ACK etc.: send signalling twice

optimizing:
def transmit_signalling(self, data_out)
--->
def transmit_signalling(self, data_out, count):

threading error / fft error

Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/home/dj2ls/FreeDV-JATE/modem.py", line 425, in receive
self.calculate_fft(data_in)
File "/home/dj2ls/FreeDV-JATE/modem.py", line 608, in calculate_fft
data = fft(data_in)
File "/home/dj2ls/.local/lib/python3.9/site-packages/scipy/fft/_backend.py", line 23, in ua_function
return fn(*args, **kwargs)
File "/home/dj2ls/.local/lib/python3.9/site-packages/scipy/fft/_pocketfft/basic.py", line 26, in c2c
raise ValueError("invalid number of data points ({0}) specified"
ValueError: invalid number of data points (0) specified

Port range of daemon and TNC sock

internal/validators.js:211 Uncaught RangeError [ERR_SOCKET_BAD_PORT]: Port should be >= 0 and < 65536. Received 300021.
at validatePort (internal/validators.js:211)
at lookupAndConnect (net.js:1000)
at Socket.connect (net.js:976)
at connectDAEMON (/Users/simonlang/Des…TE-GUI/daemon.js:21)

SET MYCALLSIGN setting

Important for CRC 16 calculation of own call to make sure, frames will only be received by designated receiver

Mode 11 @ 400Bytes fails

11:20:50.161 INFO: DATA [VK5DGR]>> <<[DJ2LS] [BER.56]
11:20:51.468 INFO: DATA [VK5DGR]>>|<<[DJ2LS] [BER.56]
11:20:57.161 DATA: ARQ | RX | 11 | F:[1/1] [100%] T:[1/2] [050%] [BER.80]
11:20:57.162 INFO: ARQ | TX | BURST ACK
11:21:03.093 DATA: ARQ | RX | 11 | F:[1/1] [100%] T:[2/2] [100%] [BER.66]
11:21:03.093 INFO: ARQ | TX | BURST ACK
ARQ_FRAME_BOF_RECEIVED True
ARQ_FRAME_EOF_RECEIVED True
11:21:04.396 FAILED: ARQ | RX | DATA FRAME NOT SUCESSFULLY RECEIVED!

Release socket binding before socket startup, if restarting TNC fast

Traceback (most recent call last):
  File "./main.py", line 52, in <module>
    server = socketserver.TCPServer((static.HOST, static.PORT), tnc.TCPRequestHandler)
  File "/usr/lib/python3.8/socketserver.py", line 452, in __init__
    self.server_bind()
  File "/usr/lib/python3.8/socketserver.py", line 466, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./main.py", line 55, in <module>
    server.server_close()
NameError: name 'server' is not defined
^CException ignored in: <module 'threading' from '/usr/lib/python3.8/threading.py'>
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 1388, in _shutdown
    lock.acquire()
KeyboardInterrupt: 

Alsa Error needs to be checked

Expression 'alsa_snd_pcm_start( stream->playback.pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4501
Expression 'alsa_snd_pcm_mmap_begin( self->pcm, &areas, &self->offset, numFrames )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3986
Expression 'PaAlsaStreamComponent_RegisterChannels( &self->playback, &self->bufferProcessor, &playbackFrames, &xrun )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4106
Expression 'PaAlsaStream_SetUpBuffers( stream, &framesGot, &xrun )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 4483
Exception in thread TRANSMIT_ARQ_BURST:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
Speicherzugriffsfehler (Speicherabzug geschrieben)

Create a data out buffer

Create a data out buffer, which is storing the last received messages.

This could be an array or data list.

Remove audio errors at program startup

ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card

Fix connection problems with tnc

Connection seems to be closing after a command will be sent.

Could be because of async vs threading on the tnc on calling a command execution

Define frame types

Time to define some custom frames which are necessary for ACK frames...

TNC Logging to file

We need a logging mode for debugging which writes the tnc cli output to a file

network protocoll stability

Programm errors on socket causes big lags of network connection. TNC should crash or affect GUI and >< <>

#################################
{"type" : "GET", "command" : "TNC_STATE"}
{"type" : "GET", "command" : "TNC_STATE"}
{"type" : "GET", "command" : "TNC_STATE"}
{"type" : "GET", "command" : "TNC_STATE"}
PROGRAM ERROR: string indices must be integers
Wrong command
Extra data: line 2 column 1 (char 42)

better timeout function

timeout functions returns "false" after timeout reached.

def timeout(ms):
    if time.time() < time.time() + ms :
        return True
    else:
        return False
while timeout(ms):
    pass

Transmit non blocking

Transmit function is blocking. Therefore if a transmission is in progress, the socket isn't receiving data.

--> Non blocking via Threading

Electron Security Warning (Insecure Content-Security-Policy)

Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security
Policy set or a policy with "unsafe-eval" enabled. This exposes users of
this app to unnecessary security risks.

For more information and help, consult
https://electronjs.org/docs/tutorial/security.
This warning will not show up
once the app is packaged.
(anonymous) @ electron/js2c/renderer_init.js:113
Promise.then (async)
warnAboutInsecureCSP @ electron/js2c/renderer_init.js:113
logSecurityWarnings @ electron/js2c/renderer_init.js:113
(anonymous) @ electron/js2c/renderer_init.js:113

set audio sample rate of sound device dynamically

While initializing the sound device via pyaudio, the following error occurs:

OSError: [Errno -9997] Invalid sample rate

We need to detect the supported sample rate and set it dynamically via

sample_rate = p.get_device_info_by_index(0)['defaultSampleRate']

This needs also be tested if we don't get problems with FreeDV

move from pyhamlib to socket rigctld

Pyhamlib not available as pip3 release for windows and Mac.
rigctld is available as precompiled binary for Windows and Linux.

We could create a subdirectory under tnc with the binaries and starting them while opening the tnc from daemon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.