Giter Site home page Giter Site logo

Comments (2)

jcard0na avatar jcard0na commented on June 28, 2024

I'm getting closer on this. I switched to a different driver for the xDot that exposes low level access to the radio and turn off the explicit header. I am configuring the radio as shown below, which I understand is a supported configuration:

int main()
{
    (...)
    radio.set_frf_MHz(915.5);
    lora.enable();
    lora.setBw_KHz(500);
    lora.setSf(8);
    lora.setHeaderMode(false);
    lora.setCodingRate(4);
    lora.setRxPayloadCrcOn(false);
 
    (...)

    /* constant payload length of four bytes */
    lora.RegPayloadLength = 1;
    radio.write_reg(REG_LR_PAYLOADLENGTH, lora.RegPayloadLength);

    for (;;) {
        radio.tx_buf[0] = 0x00;  /* set payload */
        lora.start_tx(lora.RegPayloadLength);   /* begin transmission */

        while (lora.service() != SERVICE_TX_DONE)   /* wait for transmission to complete */
            ;

        radio.set_opmode(RF_OPMODE_STANDBY);
        wait(1);  /* throttle sending rate */
        logInfo("waiting for 1s");
    }
}

As shown above, the payload is one byte (0) and now I'm receiving. If I change the payload to 0xff, the first nibble of the third byte changes from 0 to f.

***********************************
* MESSAGE DEBUG PRINT PDU VERBOSE *
()
pdu_length = 7
contents = 
0000: ef f6 0f c7 f2 24 22 
***********************************
* MESSAGE DEBUG PRINT PDU VERBOSE *
()
pdu_length = 7
contents = 
0000: ef f6 0f 47 72 2c 22 
***********************************
* MESSAGE DEBUG PRINT PDU VERBOSE *
()
pdu_length = 7
contents = 
0000: ef f6 0f e7 f2 2c 22 
***********************************
* MESSAGE DEBUG PRINT PDU VERBOSE *
()
pdu_length = 7
contents = 
0000: ef f6 0f c7 f2 b4 22 
***********************************

screenshot from 2017-11-27 19-34-06

from gr-lora.

jcard0na avatar jcard0na commented on June 28, 2024

I was finally able to get this to work by changing

 lora.setHeaderMode(false);

with

 lora.setHeaderMode(true);

I had incorrectly assumed that setHeaderMode to true would add the explicit header, when it is the opposite.

After changing that I can send small payloads (<3 bytes) without errors. Yay!

from gr-lora.

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.