Giter Club home page Giter Club logo

modem's People

Contributors

xdsopl 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

modem's Issues

decode program, output information, Es/N0

Hello,
When I run decode I obtain this output:
symbol pos: 2298
coarse cfo: 1800 Hz
oper mode: 16
call sign: EA4GMZ
demod .... done
coarse sfo: -0.243791 ppm
finer cfo: 1800 Hz
Es/N0 (dB): 29.2713 29.4451 30.2119 30.7631
bit flips: 0
(which I found is sent to stderr and can be captured with 2> instead of >)
This information is great. I would just like to know what the four Es/N0 numbers mean. Are they related to four different parts of the packet or four different ways of estimating Es/N0?
regards

Change packet size

Hi Ahmet,

It's been a while since I experimented with your modem. As far as I know, it supports two fix packet sizes: 5380 bytes for the default code branch, and 170 bytes for the short code branch.

I'd like to use your modem with Reticulum, but unfortunately that network stack expects an MTU of 500 bytes. With Reticulum supported, you wouldn't have to deal with questions for AES or RC4 support in Rattlegram. All encryption and authentication is dealt with by Reticulum.

The best I could do now is to send three packets of 170bytes, but that's rather inefficient. I wonder how much work it would be to e.g. increase the packet size of 170 threefold to 510 bytes.

Best regards,

Christoph

Dynamic large file

After several test. While I test with file large than 5.3KiB, it can't be done. Output from ./decode output always 5.3KiB.
Thankyou..

encode command options, compatibility with Rattlegram

Hello,
This program looks great. Maybe the documentation could be improved. I see encode supports this options:
./encode
usage: ./encode OUTPUT RATE BITS CHANNELS INPUT [OFFSET] [CALLSIGN] [MODE]
I know how to set all parameters except MODE. If I send a message from the computer and monitor it with my smartphone running Rattlegram, I can see something is received, the callsign is decoded, followed by "Mode 6 unsupported". Is it posible to exchange messages between this linux modem for PC and Rattlegram app in a phone?
thank you and best regards

Header files?

Where are the header files included in the .cc files?

Original and decoded files differ

Hi,

I am having an issue using modem code in short branch.
I cannot use diff command to compare the original text file and decoded file.

The input file:

netbsd-raspa$ cat text_2_encode.txt
cadena de prueba para codificar que es un infierno de larga

Encoding and decoding commands:

netbsd-raspa$ ./encode encoded.wav 8000 16 1 text_2_encode.txt
real PAPR: 7.98158 .. 10.1444 dB

netbsd-raspa$ ./decode text_decoded.txt encoded.wav
symbol pos: 2330
coarse cfo: 1500 Hz
oper mode: 16
call sign: ANONYMOUS
demod .... done
coarse sfo: -0.0737413 ppm
finer cfo: 1500 Hz
Es/N0 (dB): 35.7273 35.8356 31.9839 30.681
bit flips: 0

The input and decoded files appear the same:

netbsd-raspa$ cat text_2_encode.txt
cadena de prueba para codificar que es un infierno de larga
netbsd-raspa$ cat text_decoded.txt
cadena de prueba para codificar que es un infierno de larga

But both files have different size:

netbsd-raspa$ ls -lh text*
-rw-r--r-- 1 ramiro users 60B Feb 29 10:09 text_2_encode.txt
-rw-r--r-- 1 ramiro users 85B Feb 29 10:09 text_decoded.txt

So diff command say they differ

netbsd-raspa$ diff text_2_encode.txt text_decoded.txt
Binary files text_2_encode.txt and text_decoded.txt differ

Looking at text_decoded.txt file with Vim editor, it shows something like this:

cadena de prueba para codificar que es un infierno de larga
^@^@^@^@^@^@^@^@

"text_decoded.txt [noeol]"


Even more strange:

If I change the input string to something slightly different, changing two characters:

netbsd-raspa$ cat text_2_encode.txt
cadena de prueba para codificar que es un infieebo de larga

netbsd-raspa$ ./encode encoded.wav 8000 16 1 text_2_encode.txt
real PAPR: 7.98158 .. 11.1614 dB

netbsd-raspa$ ./decode text_decoded.txt encoded.wav
symbol pos: 2330
coarse cfo: 1500 Hz
oper mode: 16
call sign: ANONYMOUS
demod .... done
coarse sfo: -0.0939333 ppm
finer cfo: 1500 Hz
Es/N0 (dB): 30.6984 30.5499 31.338 31.4607
payload decoding error.

Decoded text is 0 B size:

netbsd-raspa$ ls -lh text*
-rw-r--r-- 1 ramiro users 60B Feb 29 10:21 text_2_encode.txt
-rw-r--r-- 1 ramiro users 0B Feb 29 10:21 text_decoded.txt

Sure I am missing something but I am not able to find it.
Thanks in advance.
Ramiro.

'fast'-branch issues

Hi Ahmet,

  1. It would be very helpful if the readme.md explained what makes this modem different from the other branches.
  2. The decoder doesn't build because of the warning that some data might not be initialized:
    • decode.cc, line 471 should probably be : code_type tmp[mod_max]={0};
    • decode.cc, line 509 should probably be : code_type tmp[mod_max]={0};

I'm using g++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

Regards,

Christoph

The modem works fine offline, but not when looping back through the sound card.

Hi,
I decided to give your modem a try, so I downloaded the master code of the different repositories today and compiled the code.
Here is what I did:

$ dd if=/dev/urandom of=uncoded.dat bs=1 count=5380
5380+0 records in
5380+0 records out
5380 bytes (5.4 kB, 5.3 KiB) copied, 0.05059 s, 106 kB/s
$ ./modem-master/encode encoded.wav 8000 16 1 uncoded.dat 1800 NOCALL
real PAPR: 7.04375 .. 10.9388 dB
$ ./modem-master/decode decoded.dat encoded.wav 
symbol pos: 2272
coarse cfo: 1800 Hz 
oper mode: 6
call sign:    NOCALL
demod .................................................. done
coarse sfo: -0.00905869 ppm
finer cfo: 1800 Hz 
init Es/N0: 32.1313 dB
$ diff -s uncoded.dat decoded.dat 
Files uncoded.dat and decoded.dat are identical

So far the good news.
Then I connect the headphone output of my sound card to the microphone input.
Afterwards, I play back this file through my sound card, and record it.
The amplitude of the recorded file is lower, but the spectrogram (checked with Audacity) looks very similar.

arecord -c 1 -f S16_LE -r 8000 -d 20 recorded.wav
...
$ aplay encoded.wav 
Playing WAVE 'encoded.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
...
$ ./modem-master/decode decoded.dat recorded.wav 
symbol pos: 2272
coarse cfo: 1799.94 Hz 
oper mode: 6
call sign:    NOCALL
demod .................................................. done
coarse sfo: 25.0049 ppm
finer cfo: 1799.94 Hz 
init Es/N0: 15.0381 dB
payload decoding error.
...
You can find the audio samples here : [samples.zip](https://github.com/aicodix/modem/files/10367203/samples.zip).

I think it might be interesting to you to know what is going wrong here, because I have no clue.
BTW: I changed the offset to 1800, because that fits better with the 300-3.3kHz audio bandwidth of my HTs that I want to use with this modem in the future.

decode, computing efficiency

Hello,
Not really an issue or a bug, but a question. I can run decode command in a linux computer with i5 cpu; the computing time is 50 ms. I have compiled your program in a Raspberry pi 1 model B with BCM2835 (ARM1176JZF-S 700 MHz). There, decode takes exactly 10 seconds to process an audio file. I must say the program works and provides a nice result. Do you think this is the time it must reasonably take, or could it be improved maybe with a different compiling method? It puzzles me that the Rpi is 200 times slower than a regular computer.
The point of using a RPi is running, non-stop, a digipeater and http gateway, instead of using a desktop pc.
Thank you and best regards.

F-Droid

Please consider submitting your app to F-Droid. :)

stream decoding process

hello, this is interesting project.
is it possible to run process decoding with stream process. in example using sox than the ./decode script automatic detected data to decode the signal. if posible, it will be great..

thankyou, 73

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.