Closed RJSDevel closed 3 years ago
Add log to begin()
int state = radio.begin(); if (state == ERR_NONE) { Serial.println(F("success!")); } else { Serial.print(F("failed, code ")); Serial.println(state); while (true); }
[SX1262] Initializing ... reset 16:37:21.606 -> 0 16:37:21.606 -> standby 16:37:21.606 -> 0 16:37:21.606 -> config 16:37:21.606 -> 0 16:37:21.606 -> setTCXO 16:37:21.653 -> 0 16:37:21.653 -> setSpreadingFactor 16:37:21.653 -> 0 16:37:21.653 -> setBandwidth 16:37:21.700 -> 0 16:37:21.700 -> setCodingRate 16:37:21.700 -> 0 16:37:21.747 -> setSyncWord 16:37:21.747 -> 0 16:37:21.747 -> setPreambleLength 16:37:21.747 -> 0 16:37:21.747 -> setCurrentLimit 16:37:21.747 -> 0 16:37:21.747 -> setDio2AsRfSwitch 16:37:21.795 -> 0 16:37:21.795 -> setRegulatorDCDC 16:37:21.842 -> 0 16:37:21.842 -> failed, code -707
Depending on the position on the logging prints, it could be that the error is returned from setRegulatorDCDC. If the module is not using a DC/DC converter, but an LDO, that would explain the error. Try to call begin() with useRegulatorLDO set to false (default is true).
EDIT: Also, in reference to your first message, BUSY pin is not optional and must be connected.
16:37:21.795 -> setRegulatorDCDC 16:37:21.842 -> 0 <-- Result of setRegulatorDCDC
setRegulatorLDO
[SX1262] Initializing ... reset 20:37:21.889 -> 0 20:37:21.889 -> standby 20:37:21.889 -> 0 20:37:21.889 -> config 20:37:21.889 -> 0 20:37:21.889 -> setTCXO 20:37:21.936 -> 0 20:37:21.936 -> setSpreadingFactor 20:37:21.936 -> 0 20:37:21.936 -> setBandwidth 20:37:21.983 -> 0 20:37:21.983 -> setCodingRate 20:37:21.983 -> 0 20:37:21.983 -> setSyncWord 20:37:21.983 -> 0 20:37:21.983 -> setPreambleLength 20:37:22.030 -> 0 20:37:22.030 -> setCurrentLimit 20:37:22.030 -> 0 20:37:22.030 -> setDio2AsRfSwitch 20:37:22.076 -> 0 20:37:22.076 -> setRegulatorLDO 20:37:22.076 -> 0 20:37:22.076 -> failed, code -707 <- int state = radio.begin(434.0, 125.0, 9, 7, SX126X_SYNC_WORD_PRIVATE, 10, 8, 1.6, true);
I don't know how it possible that the last method returned 0, but begin returned -707
I will try to use logical analyzer analyzer to see what happend in SPI
Could you say to me if answers of those functions are 0, that means SPI is ok?
I will try to use logical analyzer analyzer to see what happend in SPI
Alternatively you could enable the built-in debug mode.
There's more than just a call to SX126x::begin(), there's also a call to SX1268::begin(), it might have failed somewhere in that.
I had changed SX1262 to LLCC68
I had changed SX1262 to LLCC68
That doesn't matter, since LLCC68 class still inherits from SX1262. So when you call radio.begin()
you're actually calling SX1262::begin()
.
You are right!
20:58:31.398 -> setRegulatorDCDC 20:58:31.443 -> 0 20:58:31.443 -> state 20:58:31.443 -> 0 20:58:31.443 -> pre setFrequency 20:58:31.443 -> failed, code -707
It overrided in SX1262 but not in LLCC68
I commented it
I have found what the deal!
Replace:
setFrequency calibarations are wrong
But if send packets without interrupt appears timeout error
The setFrequency wasn't the main cause, because I'v changed not right condition, and calibration values the same as SX1262
I don't understand why you felt the need to add LLCC68::setFrequency()
, both setFrequency()
and begin()
are inherited from SX1262 class, since I wasn't able to find any difference between SX1262 and LLCC68 in that regard.
so do I, I have compared datasheets of those chips, I deleted what I changed, and clone repo again, and the chip doesn't work again! I don't know what happend, I will investigate this when I will have time
I found strange in datasheet:
That sort of inconsistency is fairly common in Semtech documentation, but it's not the root cause here, since we know that frequency configuration works flawlessly on all SX126x devices.
From your (fairly chaotic) posts, I can't determine whether there's an actual problem in the library at the moment, so I'm closing this issue. Feel free to open a new one once you have a reliable way to reproduce any unexpected behavior using unedited library. Also, please follow the issue template.
The same https://github.com/jgromes/RadioLib/issues/89
I will make merge request, we need to modify begin, remove tcxoVoltage from it, or override begin tcxoVoltage have to be 0
if tcxoVoltage != 0, then calibration is failed, I connected analyser to spi and saw answer of LLCC68, it was 0xAA, this means that was calibration error
I have connected LLCC68(Ra-01sc) module to Arduino UNO, but I have got different errors from SPI
The first 2 module wans't connected thought level-shift, and I thought that I had broken them, but I bought new modules and level-shift YF08E, but I had got the same errors.
I don't know what to do, I did all what I knew
The changes for example RadioLib SX126x Channel Activity Detection Example: // SX1262 has the following connections: // NSS pin: 10 // DIO1 pin: 2 // NRST pin: 3 // BUSY pin: 9 LLCC68 radio = new Module(10, 2, 3, 9);
Additional info (please complete):