Skip to content

TTN strcpy_P and pgmstrcmp start to fail after including more code elsewhere in the application #274

Open
@bsc-itcl

Description

@bsc-itcl

Hello,

I am using this library on a custom board based on Arduino Zero (same SAMD microcontroller) with the RN2483 LoRa transceiver. TTN was working perfectly until, at some point after adding extra code in other files, LoRa initialization started to fail. The symptoms were that the buffers were corrupt since the beginning (reset function), checked with the debug Serial and the oscilloscope.

At the beginning I could work around it commenting out some parts of my other code (floats, Serial.prints, etc) but in the end this was the bottleneck.

Finally after a lot of debugging with the oscilloscope I found out the problem was in the strcpy_P function: I replaced all strcpy_P for strcpy and e.g. pgmstrcmp(buffer, CMP_ACCEPTED) for strcmp(buffer, compare_table[CMP_ACCEPTED]).
I guess this is not optimal, but for now it's working. I can try to give more information if anyone cares, I just post this to let everyone know my solution and because I'm curious about the root cause and eager to learn.

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions