Big LoRa32u4 boards topic

(Richard Candy) #22

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.

(Richard Candy) #23

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

(Jac Kersing) #24

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?

(Richard Candy) #25

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,

(Couin) #26

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.

(Richard Candy) #27

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.

(Méric) #28

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 !!



(Couin) #29

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_PRINTF_TO Serial
#define LMIC_FAILURE_TO Serial

(Méric) #30

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:

(Couin) #31

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).

(Couin) #32

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.

(Méric) #33

Ahhh yes. Seen.
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

(Lennyz1988) #34

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.

(Lennyz1988) #35

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.

(Couin) #36

Just don’t use USB port to power the board.

(Lennyz1988) #37

I powered the board only using my 18650 battery.

(Couin) #38

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.

(Couin) #39

“lsb/msb” least/most signifiant bit.
“LSB/MSB” least/most signifiant Byte.
Easy… To be mistaken there.

(Lennyz1988) #40

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.

(Couin) #41

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