Big LoRa32u4 boards topic

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.

Jac,
Your point is valid - I will have a look at the Thingpark forums as well.

As I mentioned in my previous message, for TTN the LMIC library (at least in the examples I tried) provided decrypted data. Could it be your lorawan provider uses different keys for different ports or are you using the same port as uplink?

Jac,
I think that it is certainly a possibility.
Both the upload and download port value are 1.

Also I wondered if the keys values would be need to be of a specific nature to prevent encryption.

I have now posted the question on the ThingPark Forum,

Do you mean you use a modified USB cable to get power from a LM2596 when connecting to your PC USB port?
On BSFrance boards, you also get USB Device not recognized, only when doing a reset. But itā€™s simply the way ATMega32 is working. You are also ā€œloosingā€ USB device when going in deep sleep.

Couin,
I use a 12v battery as the secondary power supply with a matching two pin connector on the LM2596 output to power the Feather board. The USB cable from the PC is still connected to the board as usual.

So far I have not tried to use deep sleep mode, still trying to get the download messages to arrive unencrypted first.

Hi there,
Thanks Bluejedi, Jac & Couin for this really interesting thread.

I own a LoRa32u4II, and Iā€™ve followed your advices. I experiment a systematic ā€œunknown eventā€ incoming just after the ā€œEV_JOININGā€.
What I did :

  • Download libs & install board in the Arduino IDE.
  • Code & recipe from Jacā€™s Tuto (great thanks for it)
  • Modify the regional parameter (US to EU in ā€œlmic_project_configā€)
  • Connect IO1 on PIN6 (I took a pic, if you want to add it in the OP)
  • Put DevEUI, AppEUI, AppKey.

-> Any idea ? Did I miss something ? I assume Iā€™m faced to a newbie issue, but I cannot reach it out !!

Thanks!

LoRa32u4_DIO1toPin6

1 Like

Hi Meric,
This is a nice soldering, and great tutorial also.
You are so close!

Ideas, ideas :

  • Have you check DIO1 and D6 are now electrically connected (I guess so, just to be sure),

  • Are DEVEUI and APPEUI both in little-endian format (APPKEY in big-endian)?

  • Is your LMIC pin mapping looks like this :

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

  • And as always ā€¦

If still not working, you can uncomment lines in LMIC config.h file to have more verbose infos :

#define LMIC_DEBUG_LEVEL 1
#define LMIC_PRINTF_TO Serial
#define LMIC_FAILURE_TO Serial
1 Like

OK, letā€™s have a check.

About the little-endian : Iā€™m really not sure about it. For this EUI : 0123456789ABCDEF, the little-endian should be :

  • 23 01 67 45 AB 89 EF CD ? (16 bits)
    or :
  • 67 45 23 01 EF CD AB 89 ? (32 bits)
    or :
  • EF CD AB 89 67 45 23 01 ? (64 bits)

About the PIN :
As my board is a 1.2, Jacā€™s Code says DIO0 = 0. Have I to replace it by 7 ?

Thanks :sunglasses:

I have a BSFrance LoRa32u4II v1.2 too.
You only have to choose DI01 pin (by soldering pad or directly). So you do have to change :wink:

Pinout diagram is still valid (see bottom right).
https://docs.bsfrance.fr/documentation/11355_LORA32U4II/LoRa32u4II_pinout_diagram.pdf

Hereā€™s a button on TTN console to order the right way, next to value itself.
There is no 16/32/64 separation to worry about.

Ahhh yes. Seen.
2018-08-06%2012_09_50-Window
So, all the id should be inverted bit by bit (2 letters by 2 letters) :
01 23 45 67 89 AB CD EF -> EF CD AB 89 67 45 23 01

Yes I was mistaken. But itā€™s still worth noticing that the skecth will not run while the serial port is open with the pc.

What is the deep sleep consumption people are getting? I could not get lower then 3ma with the BSFrance LoRa32u4 II for 8 seconds. Thatā€™s with just a basic sketch for deep sleep. With the LoRa module enabled I could not get lower then 8ma.

I am using the Low-Power library.

Just donā€™t use USB port to power the board.

I powered the board only using my 18650 battery.

I use 5V pin instead of BATT.
You have to put LoRa chip in sleep mode too.

Hereā€™s two test sketches you can find in the topic below. One using LMIC_shutdown() and the simpliest using SPI.
https://www.thethingsnetwork.org/forum/t/trying-to-get-below-10ua-in-sleep/15795/8

1 Like

ā€œlsb/msbā€ least/most signifiant bit.
ā€œLSB/MSBā€ least/most signifiant Byte.
Easyā€¦ To be mistaken there.

Thank you! I didnā€™t realize I had to put the LoRa chip into sleep mode. These commands should probably be added to the opening post of this topic.

I am going to test this tonight.

Itā€™s already included on most LMIC based sketches :slightly_smiling_face:
It can realy help during tests!