Giter Club home page Giter Club logo

Comments (6)

tapparelj avatar tapparelj commented on May 20, 2024

Hello @XieyangSun,
You should be able to use the "File Sink" to see all the intermediate values. The "File Sink" block will just write binary files, therefore you should tell the program you use to read them how to interpret the file content.
As an example in MATLAB, you can use

f = fopen(['file_sink.bin']);
values = fread(f,'float32'); % other values of interest in different parts of lora_TX would be int32 or uint8
% Complex values are stored as alternating real and imaginary part, which can be put back to complex with
% values_complex = values(1:2:end)+1j*values(2:2:end);
fclose(f);

I hope this help you go in the right direction, let me know if you have other issues or questions!

from gr-lora_sdr.

tapparelj avatar tapparelj commented on May 20, 2024

As an additional comment, most blocks have the option "#define GRLORA_DEBUG" commented in the header file of the block (e.g. in gr-lora_sdr/lib/interleaver_impl.h). If you uncomment it and build again, the block prints some information about its input and output. It is mostly a leftover from the debugging of the block functionalities, so it is not polished, but that might still be interesting for you.

from gr-lora_sdr.

XieyangSun avatar XieyangSun commented on May 20, 2024

Thanks for your reply! I re-observed the implementation of modulate_impl.cc, and I noticed that Preamble and other lora header parts were added to the front of a packet in the Modulate block. (I used to think that the all symbols of the entire data packet were calculated and then mapped to the baseband signal. Now I realize this is not feasible due to the presence of 2.25 down-chirps...) What I can't determine is whether the int data stream saved by File Sink after gray_demapping is the decimal symbol of the original information?

For example, I'm trying to transmit 'hello-world',
c153eb085ce468d638791172d506b8e
Convert data-int.bin in my matlab to get 44 decimal numbers as:
image
It seems to be correct, because the maximum value of these decimal numbers does not exceed 2^7=128.

from gr-lora_sdr.

tapparelj avatar tapparelj commented on May 20, 2024

I'm not sure about what you mean by "original information", the input values of the Modulate block are directly use to modulate the LoRa chirps. The decimal values you observe contains all the content of the frame (i.e header, payload, CRC).

from gr-lora_sdr.

XieyangSun avatar XieyangSun commented on May 20, 2024

Ok, that's exactly what I was looking for. Thanks for the reply~

from gr-lora_sdr.

tapparelj avatar tapparelj commented on May 20, 2024

I'm glad I could help! I'm closing this issue then.

from gr-lora_sdr.

Related Issues (20)

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.