-
Notifications
You must be signed in to change notification settings - Fork 103
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
LMIC_PRINTF_TO is not correctly set #9
Comments
What you mention seems plausible, but does not explain why I do see LMIC debug output arriving in the serial monitor (only for boards using Serial, not for boards using SerialUSB though). I will have to look into this. What OS and what board have you used for your verification results?
This is different from my experience. When I enable -D LMIC_DEBUG_LEVEL and set its value to a value > 0 (1, 2 or 3) I actually see LMIC debug output on the serial monitor.
If it is not possible to do this automatically in a reliable way then that will possibly be the only solution. |
macOS 10.15.7, Adafruit Feather M0 LoRa.
Here's the serial output after checking out the current
With
With
|
I have only set I wonder why we both see different effects. It could be related to differences in OS and/or differences in board used. Do you have another, different type board (supported by LMIC-node) that you could try to see what happens with debug output if LMIC_PRINTF_TO is not specified?
|
No I don't, sorry :( Are you doing a clean in between builds adjusting |
It doesn't make any difference. It looks like on Windows, Serial is used as default when If I select the Adafruit Feather M0 LoRa, define If I don't define Still under investigation. The exact cause is yet unknown but may be related to the LMIC library. |
The compilation errors issue (occurred on Windows only?) for boards with an ARM based MCU has been fixed. LMIC debugging output can now be used without manually defining Can you test if it now also works on macOS (without manually defining |
Yep, works for me. Thanks! |
README.md states:
It looks like this happens is in LMIC-node.h:
However, this does not take effect when the LMIC library is actually being built. The individual LMIC source files will not include LMIC-node.h and therefore do not see the defined
LMIC_PRINTF_TO
value. I have verified that this results in debug output not going to serial, even whenLMIC_DEBUG_LEVEL
is set to > 0.I have been fixing this in my project by simply defining
LMIC_PRINTF_TO
in the LMIC compilation flags inplatformio.ini
, i.e.:...but I am not sure if there is a better way that keeps the intended behaviour of it only being set when
LMIC_DEBUG_LEVEL
> 0.Does it matter if
LMIC_PRINTF_TO
is set butLMIC_DEBUG_LEVEL
is 0? I would imagine LMIC wouldn't suddenly start spamming debug output, but I haven't tried this.The text was updated successfully, but these errors were encountered: