Help Understanding Sync Words

I was wondering how can I change or add a sync word to my t-beams? I read there are some defaults set for sync words. But there doesn’t seem to be much literature online explaining this.

1 Like

There are. I’ll try to write something up in the next couple of days.

Thank you that would be greatly appreciated. Also, how are Device ID’s created?

(for esp32 based nodes) device IDs are the low four bytes of the bluetooth macaddr. This means: one byte from the manufacturer OUI and three bytes of unique ID from that MFG/OUI block.

re: sync word
It is essentially just a magic byte that lora looks for in the header as a quick check to see if you might be interested in this packet. Different protocols pick different values.

For historical reasons we use 0x14. But we will probably pick an ‘official’ meshtastic sync byte (similar to what lorawan did) if we make 1.2 next week.

You can change it fairly easily in RF95Interface.cpp/SX1262Interface.cpp if you want to do something custom.

    /**
     * FIXME, use a meshtastic sync word, but hashed with the Channel name.  Currently picking the same default
     * the RF95 used (0x14). Note: do not use 0x34 - that is reserved for lorawan
     */
    uint8_t syncWord = SX126X_SYNC_WORD_PRIVATE;

Hello,

It seems nowadays syncWord is defined in RadioLibInterface.h with value 0x2b.

Can you explain please how this value is hashed with the channel name?

For example what byte would be the result for 0x2b with channel name greeks?

I am trying to find the actual syncWord for my current channel for debugging reasons.

BTW I think it is wise to isolate the channels this way, saving CPU power.

Thanks