Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to receive LoRa packets with sync_word other than lorawan public(0x34) and lorawan private(0x12) #130

Open
ask-gh opened this issue Sep 20, 2024 · 0 comments

Comments

@ask-gh
Copy link

ask-gh commented Sep 20, 2024

Hi,

I've been looking into extending the board to handle configurations outside of the loRaWAN protocol. I'm assuming here that the hardware is capable of capturing this data?

I'm using:

  • rpi 4b
  • seed studio wm1302 concentrator
  • seed studio wm1302 pihat

From the docs it wasn't clear whether the sync word is configurable from the configuration files - from the looks of the source code it is not. I narrowed it down to this function

int sx1302_lora_syncword(bool public, uint8_t lora_service_sf) {

image

What value would be required in the second parameter of lgw_reg_w() here? It seems from the other sync words that, for sync word 0x {val1} {val2}

RX_TOP_FRAME_SYNCH0_SF7TO12_PEAK1_POS_SF -> 2 * {val1}
RX_TOP_FRAME_SYNCH0_SF7TO12_PEAK1_POS_SF -> 2 * {val2}

This may be a complete coincidence, hence the question.

On top of this, I would also want the option to set a custom preamble length. From the source code it appears that this would need to be set in sx1302_lora_modem_configure:

err |= lgw_reg_w(SX1302_REG_RX_TOP_TXRX_CFG6_PREAMBLE_SYMB_NB, 10); /* LSB */

A couple questions,

  • Why has the value be set to 10 to cover the SF5/6 preamble length of 12 and SF7-12 length of 8 for lorawan?
  • Is this the correct place to be changing the length if I want it to be, say, 16?

Thanks in advance :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant