Big ESP32 / SX127x topic part 1

You don’t need to taylor anything in the LMIC lib and there is no need to open the SPI interface to SX1276 with SPI.begin(...) if you use LMIC 1.5 Rel. arduino-2 and some defines:

// Hardware pin definitions for Heltec LoRa-32 Board with Semtech SX1276 Chip
#define SS 18 // ESP32 GPIO18 (Pin18) – SX1276 NSS (Pin19) SPI Chip Select Input
#define MOSI 27 // ESP32 GPIO27 (Pin27) – SX1276 MOSI (Pin18) SPI Data Input
#define MISO 19 // ESP32 GPIO19 (Pin19) – SX1276 MISO (Pin17) SPI Data Output
#define SCK 5 // ESP32 GPIO5 (Pin5) – SX1276 SCK (Pin16) SPI Clock Input
#define RST 14 // ESP32 GPIO14 (Pin14) – SX1276 NRESET (Pin7) Reset Trigger Input
#define DIO0 26 // ESP32 GPIO26 (Pin15) – SX1276 DIO0 (Pin8) used by LMIC for IRQ RX_Done & TX_Done
#define DIO1 33 // ESP32 GPIO33 (Pin13) – SX1276 DIO1 (Pin9) used by LMIC for IRQ RX_Timeout
#define DIO2 32 // ESP32 GPIO32 (Pin12) – SX1276 DIO2 (Pin10) not used by LMIC

// LMIC Pin mapping for HelTec ESP32 WiFi LoRa
const lmic_pinmap lmic_pins = {
.nss = SS,
.rxtx = LMIC_UNUSED_PIN,
.rst = RST,
.dio = {DIO0, DIO1, DIO2},
};

// LMIC init
os_init();
// Reset the MAC state. Session and pending data transfers will be discarded.
LMIC_reset();

I wasn’t aware that there is an arduino-2 release. Thanks for the update. I will switch to this release and get rid of my patching :grinning:

To be exact: LMIC-Arduino version 1.5.0+arduino-2

LMIC-Arduino is the official library name and 1.5.0+arduino-2 is the official library version as described in library.properties.

You can always find the latest revision here: https://github.com/matthijskooijman/arduino-lmic/

(Unfortunately the repository name and URL do not match the library name.)

Seems that it is quite common that those boards come with broken IPEX cables. Both boards I got had faulty ones. After replacing cables, I could easily get 5km.

2 Likes

I tried to contact the assumed manufacturer of those boards on support@heltec.cn and got a surprisingly fast and detailed answer:

“The yellow LED can’t set by software, speak frankly that’s a bad design, and recently we found the impendence matching part lack a capacitance, we will fix the problems in next version, if you time is not in a hurry, you can wait our new version(about in the middle of March, next mouth is Chinese new year, we will have a long holiday).”

4 Likes

YES!!

I confirm that i got 8.3 KM range with the STUPID antennas (the coil antennas) - 433 MHZ!! (be carefull with your frequency!)

HOWEvER

  • After 1 day i saw that these antennas are REALLY bad - Most probably the get shortcircuited or disconnected

  • I have ordered some other antenas for 433 Mhz - They are supposed to be +6db!

I have tested them and i would say that the signal strengh has improvved a lot! for example i get -16DB when the antennas are 10cm appart compared to -40 or more with the standard coil antennas
(search in ALI 433Mhz 6dbi high gain LoRa antenna internal aerial piamater FPC 27*17mm IPEX connector)

Just wanted to stop by and say thank you to all the early posters / testers for their help in getting the board online.

I bought this one on Aliexpress. Don’t think I would have been able to do it without this topic.

I did a write-up of the process here. It is in Dutch, so might not be of much help to most readers here. I also shared my Arduino code using ABP + the OLED screen for TTN, the example listed here in the topic uses OTAA.

5 Likes

but still a great write up… tnx !

1 Like

Thank you very much.
I think, this is a very important contribution.
btw.: using google translator, no real problem in german language.

But:
What about effectice reachability?
Did you test this already? Is it really as crappy as reported above some times… about 10 meters or so… or did you reach KILOMETERS…?

thx.

bluesensing

I only have a single channel LoPy gateway to test with myself. It would require some driving around to find nearby “real” gateways to test. I went from “reading all the documents” to getting it online last night while using the commute to work this morning to document it…
I’ll see if I can take it to do some distance checking this weekend and will report back.

1 Like

Of course this could be understood. But i am acurious person you should know…

That would be very friendly. Thank you.

where did you get that small case?

Maybe here:

That is where I bought it, but it now says “no longer available”.

The case isn’t worth the money (even though it is cheap).
The board doesn’t really fit, the internal screw holes are wrong meaning I had to use scotch tape to keep the LCD in front of the hole.

This might be a better option: https://www.thingiverse.com/thing:2581459 (mentioned before) since it also leaves an opening for the sensors. Even though it does not allow access to the reset button with the lid closed.

1 Like

I printed the thingiverse case already. There is also another one on thingiverse, i tried that one, too, see enclosed picture. Both have flaws, e.g. missing mounting holes for antenna, measurements do not fit exactly. Only for testing purposes usable.

Thingiverse-case

So but you created a new version the with the mounting hole for the antenna etc. ?
Would you mind sharing the .stl files for the enhanced version?

No, i modified it by “craftmanship” after printing :slight_smile:
Unfortunately there are only .stl files on thingiverse for the smaller case, no cad files. So you can’t edit them. And it would’nt be legal to post them here because the author gave no licence on thingiverse. I ordered the case from the thingiverse print service, Treatstock.

I have made a LoRa Single Channel gateway, this works perfectly with the ttgo, but I can’t get the ttgo and heltec to work with the lmic code… It is stuck at EV_JOINING…

EDIT: Got the ABP working, but only when I simulate a downlink, then it will send Hello World, when I send nothing, nothing will be send by the node.

I got the same device as you now. Once it arrives, I’ll follow your instructions and see how it works (although I don’t speak Dutch, but German is not that differnt :wink: ).

Are your sure that your single channel gateway is downlink capabable? And if so, sure that your heltec/ttgo node receives downlink on the same (single) channel where your single channel gateway sends it out?