Help needed please, with SX1262 tranceivers not receiving any data!

Started by top204, Mar 20, 2025, 03:32 PM

Previous topic - Next topic

Fanie

Here is some Arduino code as well
https://github.com/thekakester/Arduino-LoRa-Sx1262

I asked both my brothers if they used this Lora before but they haven't answered.
My younger brother is a fitter and turner, working for an agriculture (don't want to say) farm where he implemented a complete water purifying system controlled remotely which he implemented and programmed himself.
As you can see, I'm the dumb one in the family.

top204

I've seen multitudes of C++ codes for them, and they are all copies and pastes of the original company firmware. With loading a small array buffer with items, then calling a function to use the values in the buffer to control the op-codes and registers of the SX device. I must now have about 20, apparently, different C++ library source codes for the SX devices, all doing the same thing with the same function mechanisms, and most still using the original variable and function names!! :-)

The library I have created, should work perfectly. But for some inexplicable reason, it doesn't on the SX (LLCC) boards I have.

But thanks for replying Fanie.

Fanie

Any chance yours are faulty ?  I once made a FET driver, I couldn't get it to fail.  Even abused it.  Then when I made more, none of them would work.  Seems the batch I got was something wrong with.
Most of these modules should work without any problems, many use them.

JonW


JonW

It's been a while since I last worked on the breadboard... :P

RFS LORA.png

Good news, Les: your code works perfectly with the SX1262 on the RFS modules  ;D .  Nice Job!  I have just updated the Procedure as mentioned and added some formatting to my serial tool.

Since its all up and running I may as well have a play with it.

I extended the LED delays a bit


You can change the header now to :

'
'   /\\\\\\\\\
'  /\\\///////\\\
'  \/\\\     \/\\\                                                 /\\\          /\\\
'   \/\\\\\\\\\\\/        /\\\\\     /\\\\\\\\\\     /\\\\\\\\   /\\\\\\\\\\\  /\\\\\\\\\\\  /\\\\\\\\\
'    \/\\\//////\\\      /\\\///\\\  \/\\\//////    /\\\/////\\\ \////\\\////  \////\\\////  \////////\\\
'     \/\\\    \//\\\    /\\\  \//\\\ \/\\\\\\\\\\  /\\\\\\\\\\\     \/\\\         \/\\\        /\\\\\\\\\\
'      \/\\\     \//\\\  \//\\\  /\\\  \////////\\\ \//\\///////      \/\\\ /\\     \/\\\ /\\   /\\\/////\\\
'       \/\\\      \//\\\  \///\\\\\/    /\\\\\\\\\\  \//\\\\\\\\\\    \//\\\\\      \//\\\\\   \//\\\\\\\\/\\
'        \///        \///     \/////     \//////////    \//////////      \/////        \/////     \////////\//
'                                  Let's find out together what makes a PIC Tick!
'
' Receiver code for an SX1262 transceiver, using a LAMBDA62 board, operating with a 32MHz oscillator driving the SX1262 device. "That is working!".
'
'
' Written by Les Johnson for the Positron8 BASIC compiler.
'
 

Fanie

Quote from: JonW on Apr 05, 2025, 01:51 PMOne of his modules has a different IC on it. 

It's been a while since I last worked on the breadboard...

tsk tsk...

top204

Thanks to Dyanko's fresh eyes in the code and datasheet for the LLCC68 device, the problem has been found and I now have transmit and receive. :-)

I could not see the wood for the trees, because I was going around and around trying to find a big problem. Yet the problem, believe it or not, was a single value placed into an LLCC68 register!

As Dyanko pointed out, the LLCC68 device is a thinned down SX device, and it has less Spread Factor settings for particular Bandwidths, and I was using an incorrect Spread Factor setting for the 125KHz Bandwidth. I had tried, 10, 11, 12 etc, but never thought of decreasing it, and the correct setting is a Spread Factor of 9. i.e. The cSX_VAL_SF9 constant I created.

Who would have thought that a single incorrect setting in the multitude of registers they have, would cause such a catastrophic failure. I thought it may limit range, or miss some values, but not totally fail to transmit correctly and receive correctly!

Many thanks Dyanko, and I am relieved that my SX126x/LLCC6x library code is working nicely. Also, many thanks JonW.

I'm busy tidying the library up for both speed and size and will upload it to the forum ASAP.

I now need to get the Deep Sleep working as it should, because I have tried it and it fails to receive correctly. Sometimes it does, and other times it doesn't. Mostly, it doesn't. :-(

Regards
Les