-
Notifications
You must be signed in to change notification settings - Fork 329
lilygo_tlora_v1_6_1_tcxo: initial port #1168
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
base: dev
Are you sure you want to change the base?
Conversation
c3792f8 to
5f946cd
Compare
|
Is this a new radio ? If this is the "well known" |
|
Versions of the LilyGo LoRa32 V2.1_1.6 exist both with and without a TCXO. The standard non-TCXO model uses a basic crystal oscillator, while TCXO-equipped boards (e.g., SX1276 868/915 MHz TCXO) are available for regions requiring precise timing, though they may need firmware tweaks for compatibility with libraries like LMIC due to unconnected DIO1 pins. TCXO variants are explicitly offered by LilyGo and third-party sellers, but support in projects like Paxcounter or Meshtastic may be limited without modifications. I do not have the hardware without TCXO, so I didn't dare modifying that version and breaking it for other users. I have tried the lilygo_tlora_v2_1 and it won't boot correctly on the version with TCXO. How other projects handle it: If there is a better way to approach it I am happy to help out and adjust. |
|
Actually it should be the other way around: first try to init TXCO and if it fails fallback to no TXCO. int status = begin(LORA_FREQ, LORA_BW, LORA_SF, cr, RADIOLIB_SX126X_SYNC_WORD_PRIVATE, LORA_TX_POWER, 16);
// if radio init fails with -707/-706, try again with tcxo voltage set to 0.0f
if (status != RADIOLIB_ERR_NONE) {
Serial.print("ERROR: radio init failed: ");
Serial.println(status);
return false; // fail
}This way we can still keep only one target. |
|
Hi @jbrazio, Thank you for the feedback on auto-detection. After investigating, I found that auto-detection is not feasible due to hardware constraints. Here's what I learned: The IssueGPIO 33 has different purposes on the two hardware variants:
Why auto-detection doesn't work:
Meshtastic's ApproachMeshtastic solved this with two separate variant directories:
My Current SolutionI've simplified the implementation to assume TCXO variant:
This works perfectly on my TCXO hardware. However, I only have TCXO boards to test with. Options Going Forward
I'm unable to test on crystal hardware. Which approach would you prefer? |
5f946cd to
66bd2cb
Compare
Consolidates TCXO hardware variant support into the v2_1 platformio.ini configuration by adding TCXO-specific environments for all build targets (repeater, terminal_chat, companion_radio, room_server, and bridges). Uses shared [tcxo_flags] section to manage TCXO-specific compilation flags. Removes now-redundant v1_6_1_tcxo variant files.
66bd2cb to
640f017
Compare
|
@jbrazio here is another approach. I still cannot auto-detect if TCXO is enabled or not, but this proposal now adds environments with txco in the existing lilygo_tlora_v2_1. Is this what you meant? |
Summary