Big LoRa32u4 boards topic

Absolutely agree. Having soldering pads is a nice idea. Using pins 1 (TX1), 2 (SDA), 3 (SCL) is not that smart.
Moreover, New board pin “14” is confusing/uneasy : it’s ATMega32U4 PD5 pin, but Arduino pin “14” is another one, MISO.

We can dream about some Version 1.3 improvement

  • Get back to version 1.1 mapping (Adafruit clone);
  • Or simply change DIO1/2/3 wiring to wiser ATMega pins.

Right now, I have two 1.2 boards with a wire directly soldered to RFM95 DIO1.

I already was wondering why two ‘14’ pins. I had checked with a multimeter before but they are not connected to each other. So this is PD5. In ATmega 32U4 Arduino Leonardo Pin Mapping PD5 is defined as pin 22.
When looking in BSFrance-avr arduino core in variants\lora32u4II\pins_arduino.h
in the comments PD5 is listed as D30.

I have not tried this yet but I think we can conclude that the label ‘14’ for this pin is bogus.

I’ll go for the second option (but I don’t expect a V1.3 soon).

I missed that one, so D30 it is!
As I use those boards as Adafruit clone, I prefer avoiding this difference, for now.

BSFrance support is very kind, I will ask for info :slight_smile:
Whatever, soldering DIO1 pin is not that hard, that was my first.

OTA sketch is working perfectly, with sleep.

Couin, bluejedi,

I’m having an issue with LoRa32u4 v 1.2. It sends join request to server, server replies with join accept, but the board seems never receive that message.

I connected DIO1 with IO1 with solder like you told, but I’m afraid of that IO1 is used by Serial TX. Can it cause a problem and interfere with LoRa functions if I turned verbose logs output to serial in LMIC settings?

Also, what is the right port mapping for LoRa32u4 v 1.2 with DIO1 and IO1 connected?

Is this correct:

const lmic_pinmap lmic_pins = {
.nss = 8,
.rxtx = LMIC_UNUSED_PIN,
.rst = 4,
.dio = {7,1,2},
};

Thank you!

If you wait some 5 to 10 minutes you will probably see it joining at SF9 (maybe SF10).

The AVR 8MHz microcontrollers can be a bit too slow for LMIC. To fix this OTAA JOIN ACCEPT timing issue try to relax LMIC timing, see:

For LoRa32u4 II v1.2 if you have connected DIO1 with the solder pads to digital pin 1 and have not connected DIO2 (which is not needed for LoRa) use this:

// Set pin mapping for SX127x/RFM9x.
const lmic_pinmap lmic_pins = {
  .nss = 8,
  .rxtx = LMIC_UNUSED_PIN,
  .rst = 4,
  .dio = {/*dio0*/ 7, /*dio1*/ 1, /*dio2*/ LMIC_UNUSED_PIN}
};

I reproduce this issue when my power supply is not powerfull enough.
If connected to VBat, Battery connector or +5V, your voltage can’t drop below 3.5V.

One pin can’t share two functions (Serial + LoRa) that easily.
As I said, I soldered a wire directly on HDP13 DI01… to plug it on board pin 6.

On a side note, I’ve seen a strange behavior when using Reset.
As stated on Adafruit Feather 32u4 Lora thread, a reset put you in “Bootloader Mode”.

I did some testings with the same LoRa OTA Sketch.
It’s working fine either before or after a reset. There is a power consumption difference in deep-sleep though :

  • First boot : Around 170µA
  • After a reset : Around 230µA

I guess Bootloader mode forces USB to Serial on… Forever.

PS: To make a “normal” reboot, you can short EN pin

1 Like

Thanks for your replies!

It finally joined. I guess the problem was in IO1= Serial TX issue as the join actually happened right after I closed my Arduino IDE serial terminal window.

As to power supply, Couin, I didn’t plug any external supply at all. I used only the power provided by USB cable while looking into serial terminal output. Can this be an issue with join difficulties, how do you think?

I’m discovering this board since last week… The more I do, the more I have to dig :confused:

Pin 1 is TX1 pin, used with “serial1.[…]” in Arduino IDE.
I suppose you only plug USB and use serial.[…] aka serial0, It should not interfere.

I first tested my boards pair with LoRaReceiver and LoRaSender sketches (in BSFrance archive), with serial (and power) Over USB.

Hope it will help!

Propagate from where to where? Once you create a device in the TTN console it can be used immediately. No delays…

That was a bad supposition, I remove that sentence :zipper_mouth_face:
Still, it didn’t worked immediately for me, for an unknown reason.

Has anyone found a schematic for the BDFrance LoRa32u4 II v1.2?
It’s reading ~4.6v for a battery level of 3.99v so I’m wondering if the resistor divider is not just two 100k resistors.

Your 4.6v for 4.0v is fearly high, even with a bridge of 100k resistors with a +/-10% tolerance.
I personally get 3.6v for 3.3v.

Have you tried using a capacitor between D9/ADC12 (BAT divider) and GND pin, it may help?
I will ask support for v1.2 documentation.

2 Likes

Hi,

I’m using Adafruit LoRa M0 with LiMC library and it works perfectly with the TTN. I’m using Laird RG1XX Gateway.
I would like to learn more about the Sleep mode and I’m having difficulties finding information about that. If you have any tutorials, links or website, I appreciate if you could share.
Thanks in advance.

If you are interested in the mechanics behind, I suggest you to read this topic, a great start.
https://www.gammon.com.au/forum/?id=11497

Then, you can tinker your own or directly use an existing library, like this one.
https://github.com/rocketscream/Low-Power

It’s worth mentioning that if you do solder DIO1 to digital pin 1 on the BSFrance LoRa32u4 II version 1.2, then you MUST close the serial connection on your computer or the sketch will not run.

Just to be clear.
USB Serial is Serial0.
RX/TX (0/1) pins is Serial1.
If you use pin 1 for LoRa, you won’t be able to use onboard serial (Serial1). You still will be able to use Serial0 (Serial and programming with USB).
With a bit of soldering, you can use any other pin (I use pin 6).
Furthermore, ATMega32u4 is sometimes tricky to program. Best tip is to activate verbose upload option, to manually reset board when IDE starts uploading. This way, it works everytime.

Hi,
On this topic, for the last week I have been battling to get my Adafruit LoRa feather board to communicate with my desktop and after doing a lot of research and asking intelligent folk for help, finally managed to get it working.

The issues that I found are as follows:

  1. Make sure the ancillary power supply to the board is at least 5v. If this is not the case Windows is constantly reporting that the USB device is not recognized. I use LM2596 DC-DC stepdown Adjustable Power supply board to do so.
  2. Use the “latest” version of the IBM Limc libraries in my case it is “IBM_LMIC_framework-1.5.0+arduino-2”. https://www.arduinolibraries.info/libraries/ibm-lmic-framework
    By the way this zipped library can not be added to the Arduino environment in the normal way, you will have to install it manually.
  3. On the Arduino Boards side use version 1.4.11 for the Adafruite Feather 32u4 library.
  4. Solder the jumper on the bottom of the Feather board from pins IO1 to Pin 6
  5. Use the ttn-otaa example from the IBM LMIN code to start with.
  6. Make sure that the Lmic pin mapping is as follows;
    const lmic_pinmap lmic_pins =
    {
    .nss = 8,
    .rxtx = LMIC_UNUSED_PIN,
    .rst = 4,
    .dio = {7,6,LMIC_UNUSED_PIN},
    };
  7. I added the following code just under the case EV_TXCOMPLETE: to print out the download output:

if (LMIC.dataLen)
{
Serial.print(“Received “);
Serial.print(LMIC.dataLen);
Serial.println(” payload bytes”);
for(int i=0;i< LMIC.dataLen;i++)
{
Serial.print(" ");
Serial.print((LMIC.frame+LMIC.dataBeg)[i], HEX);
}
Serial.println();
}

Results:
I can use OTAA to join the Thingpark network very quickly.
I can upload hex data and see the results on the Thingpark backend.
I can send download hex data to my application from Postman - but it is encrypted!

Problem
Does anyone know or can point me in the right direction on how to:

  1. Prevent the download payload from being encrypted
  2. How to decrypt the download payload using the existing LMIC libraries?

It looks like you are not using TTN but another provider, why do you search for answers regarding downlink issues with that providers setup on the TTN forum? Please use the forum of that provider for questions regarding your issue… (the combination of LMIC and TTN provides the data unencrypted on the node)

Hi,
You are correct - it seems that TTN has more users.
I was hoping that someone would be able to assist since this is a Adafruit 32u4 Lora board using the LMIC libraries.

The questions still remain

  1. If a downlink payload is encrypted, is it possible using the LIMC library to decrypt it?
  2. In the TTN network are all downlink messages encrypted by default since this seems to be the standard.