Big LoRa32u4 boards topic


(Jbkiwi) #42

Hi @Couin, did you have any luck?


(Couin) #43

I did ask, but nothing right now.
Except DIO pad, there is no real difference with v1.1.


(Gaguilar) #44

Hi all.

I think just broke 4 modules. Loaded an sketch with few libraries in. TinyGPS, Lora_serialization, SoftwareSerial…

AVR Memory Usage

Device: atmega32u4

Program: 29808 bytes (91.0% Full)
(.text + .data + .bootloader)

Data: 1242 bytes (48.5% Full)
(.data + .bss + .noinit)

And when it writes…

AVR Memory Usage

Device: atmega32u4

Program: 30396 bytes (92.8% Full)
(.text + .data + .bootloader)

Data: 1264 bytes (49.4% Full)
(.data + .bss + .noinit)

gaguilar@gray-compute:~/workspace-lora/level2-loragps/build-lora32u4$ ninja ardup
[2/3] Running external command ardup.

avrdude: Version 6.3
Copyright © 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright © 2007-2014 Joerg Wunsch

     System wide configuration file is "/home/gaguilar/Proyectos/arduino/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf"
     User configuration file is "/home/gaguilar/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping

     Using Port                    : /dev/ttyACM1
     Using Programmer              : avr109
     Overriding Baud Rate          : 57600
     AVR Part                      : ATmega32U4
     Chip Erase delay              : 9000 us
     PAGEL                         : PD7
     BS2                           : PA0
     RESET disposition             : dedicated
     RETRY pulse                   : SCK
     serial program mode           : yes
     parallel program mode         : yes
     Timeout                       : 200
     StabDelay                     : 100
     CmdexeDelay                   : 25
     SyncLoops                     : 32
     ByteDelay                     : 0
     PollIndex                     : 3
     PollValue                     : 0x53
     Memory Detail                 :

                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       eeprom        65    20     4    0 no       1024    4      0  9000  9000 0x00 0x00
       flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
       lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

     Programmer Type : butterfly
     Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .
Found programmer: Id = “CATERIN”; type = S
Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
Device code: 0x44

avrdude: devcode selected: 0x44
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as FE
avrdude: reading input file “/home/gaguilar/workspace-lora/level2-loragps/build-lora32u4/built_target.hex”
avrdude: writing flash (30396 bytes):

Writing | ############################################### | 94% 2.30savrdude: ser_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: write block
***failed;
***failed;
***failed;
***failed;
***failed;
***failed;

Broke. Any advice to recover them? Should I rewrite from factory? Is it possible, how? I have the bus pirate to interface with the chip if required…


(Couin) #45

Have you tried to hit reset after 1st write “failed” message?
It’s how one do with Arduino IDE on Windows. It should also works for you :slightly_smiling_face:

Edit : Hit reset with either a single or double tap.


(Gaguilar) #46

Hi Couin,

No it doesn’t work.

It happened that cannot store as much firmware as avrdude says. And stops at 94% leaving the board unusable when I upload something big. 90% of total space.

Fortunately I have the buspirate 4 with firmware 7.0. And during this time I discovered that the BusPirate is not able to power the board to reflash the firmware. But if I connect the board over USB and then the cabling as described:

BUS PIRATE - LORA32U4II
MISO MISO
MOSI MOSI
CLK SCK
GND GND
CS RST

And I use arduino ide to upload a new bootloader it starts to work again. So. I wonder why the firmware update locked the board while there’s enough space. And why powering over 5v doesn’t get it to work on buspirate + arduino ide.

I leave info for others that have same problem.

Tnx


(Couin) #47

What board definition are you using?
I use Adafruit Feather one :
feather32u4.upload.maximum_size=28672

I guess LoRa32u4 firmware is slightly bigger than its Atmega32u4 counterpart.

Moreover, you can reduce Lmic size, it may help a lot (See #define disable_beacon and disable_ping)


(Gaguilar) #48

The definition is for the BSFrance 1.2v. But I was building with meson (https://mesonbuild.com/) because it builds faster. And I didn’t had this value from the arduino variation spec.

I took it, and you are right. More or less same amount. I added a warning to the compilation system.

It’s good to know I can write the sketch with BusPirate and skip the loader so I can fit whole memory with my sketch.


(Somsak) #49

I got BSfrance LoRa32U4 II v1.2. I connected dio1 to D6 by manual wiring. I saw all packets on TTN as expect (working without problem more than 64 packets) . The problem is my node suddenly slow sending packet after I open serial monitor. Usually, Messages are showed on TTN every 15 seconds but it became 1 min and 15 seconds. On serial monitor, I saw

37895363: RXMODE_SINGLE, freq=923200000, SF=7, BW=125, CR=4/5, 37952486: RXMODE_SINGLE, freq=923200000, SF=10, BW=125, CR=4/5,38224975: EV_TXCOMPLETE (includes waiting for RX windows)
Sleep for 15.00 .

Nothing more. The node still sending but longer delay.

Somsak


(Somsak) #50

After comment out all lines in do_sleep(float sleepTime). It seems to work ok. Should it be because the sleep issue?

Somsak


(Couin) #51

Hi! Serial using USB or pins 0/1?
I loose Serial USB when doing (deep) sleep. On ATmega32u4, Serial USB is somewhat software.
I didn’t investigate more, you should find workarounds (Perhaps closing/reopening Serial).
Can you show your code? Is there a “while(!Serial)”?


(Somsak) #52

My case is I lost USB serial. So, I did put “while(!Serial)”.
I added more delay before setting speed. Now, everything is all ok except do_sleep function.

delay(2500); // Give time to the ATMega32u4 port to wake up and be recognized by the OS.
Serial.begin(115200);

Somsak


(Gaguilar) #53

Hi Somsak, That’s because the LMIC throttling of bandwidth. It’s supposed that you can only send about 1% of available bandwidth, so it throttles your messages calculating the time to air and available bandwidth on channel you choosed. But you can also do frequency hopping.


(Gaguilar) #54

Just a question. BSFrance and Adafruit modules, does use 3.3v natively on gpio or do they use 5v logic. Specs says 3.3v module. But I don’t know if it has a stepup converter to be compatible with arduino gpios.

I ask because I read from ublox 3.3v gps and I’m adding a stepdown converter from 5v to 3.3v between the module and gps. And if it’s fully 3.3v I can remove that module on channels. What do you think?

Everyone says a simple voltage divider will do the trick. But I wonder if I can get rid of it with BSFrance v1.2 module.

References:

http://www.ayomaonline.com/iot/gy-gps6mv2-neo6mv2-neo-6m-gps-module-with-arduino-usb-ttl/
https://forum.arduino.cc/index.php?topic=199304.0


(Couin) #55

https://docs.bsfrance.fr/documentation/11355_LORA32U4II/Datasheet_LoRa32u4II_1.1.pdf

  • MCU : Atmega® 32u4 3.3V @ 8MHz
  • Logic level : 3.3V
  • Operating voltage : 3.3V – 5.0V
  • Ultra low dropout 600mA 3.3V regulator

I don’t know whether GPIO pins are 5V tolerant.


(Gaguilar) #56

Hi Couin, so I can connect it directlly to the 3.3v ublox gps. Great. Thank you for the response. And the doubt now is if it can tolerate 5v as other arduino clones do.

Anyone can clear out this doubt? Please.


(Couin) #57

Everything should be be fine if you use 3.3V Logic everywhere.
Beware of maximum draw/sink current.


(Gaguilar) #58

Seems to be working great. Low consumption and it can lasts days on batteries. Will improve it latter anyway.


(Couin) #59

Great news!
I can’t wait to read about your future improvments :wink:


(Gaguilar) #60

Seems it got about 7,5Km in city. In fact from one city to the nearby one. A lot of packet didn’t arrive but few of them do.

I want to test directional antennas.

https://ttnmapper.org/special.php?node=lora-test-node&date=2018-09-10&gateways=on


(Méric) #61

Hi there !

Following your advices in lasts posts : I’m now connected ^^ so it works… but it don’t.
It take each time 19 minutes 27 seconds of computation to send the value (a simple “Hi” for now). So I retrieve my values every 19 minutes 27 seconds + duty cycle.
I did’nt change anythings since last time : Jac’s code, Couin’s Pins, and obviously correct little-endian AppEUI & DevEUI.
=> Any idea of what could be wrong ?

Thanks :wink: