DIYmall LoRa32u4 II

All sorts of posts on how things work or soldering this to that - ‘after’ the programming has been done. My problem is I’m unable to ‘upload’. My setup is a Rasperry Pi 3B running Arduino IDE 1.6.13. I’ve set the board to Adafruit Feather 32u4, port /dev/ttyAMA0, programmer USBtinyISP. Starting with ‘blink’, compiles and just sits there - no upload. Found a post “double click reset” when… nope. Help please.

try the same under windows… just to check

That’s the source of the problem. ttyAMA0 is the pi’s SoC’s hardware UART - that might apply to some unique situations but not to yours.

For a modern CDC/ACM based Arduino (especially anything with an ATMega 32u4) you want /dev/ttyACM0 or ttyACM1 or whatever number in that pattern shows up.

Also see generic Arduino Micro / Leonardo guidance on reset / button behavior for programming

I don’t do windoz - don’t even have access. Fedora or Rasberrian.

But how do I get a aCm0 to show up.

well it’s not a new problem (and not TTN related)

OK, I’m not locked into th DIYmall LoRa32u4 board - BSFrance. Can you suggest a small LoRa 915 board that:

  1. is programmable via Arduino IDE
  2. on a Raspberry Pi (3B)
  3. will work with my Dragino LoRa GPS HAT 915Mhz

Thanks

The reality is that these do work, people just run into various issues that take a while to debug. For example on some Linux installs brltty or modemmanger can grab the port for a while before releasing it to other uses.

Often you need to add a user to the dialout group or similar (as you would for any Arduino)

It’s possible you’ll have an easier time with other hardware, but not guaranteed. The issues you are facing now are almost certainly solvable by someone familiar with Linux issues.

One useful thing to check would be the output of lsusb with and without it connected. Also note that some loaded sketches could make it not be a CDC/ACM serial device at all - there’s a way to force it to stay in bootloader mode which will, don’t know off the top of my head what it is.

You may want to pursue this on Arduino-related forums as what you are facing are Leonardo/Micro type challenges, not really LoRa challenges.

LoL :rofl: and familiar with the source of the Arduino IDE

No. The problem is not there, it’s with the board being in the right mode and the port being recognized and not grabbed by something else.

So you want a small LoRa board that will plug into a Raspberry Pi and can be programmed with a Raspberry Pi via the Arduino IDE ?

You want this Pi\LoRa setup to communicate with another Arduino basewd board that already uses a Dragino LoRa GPS Hat ?

Whats the application ?

My end project - think SR04 (node)(if things work out - many) that reports once a day (although may on occasion hourly). Still working that out. I’ve got the Dragino HAT on a RasPi (gateway) and it seems to be working - (the sound of one hand clapping). I picked the DIYmall board because - well because and it looked like the ESP8266 boards I’ve been working with. In the end I want to use the smallest, cheapest raw chip I can get to work. Aliexpress has a RMF95 - pinless postage stamp and I’ve programmed a ESP 8266 chip that looks just like it. But I was able to find several web pages with instructions - alas for LoRa those pages are nowhere to be found (so far). I’m a *Nix snob, Fedora, Rasbarian. But step one is getting “A” node working with “A” gateway sending a “number”.

Another problem with USB on Raspberry Pi (Raspbian at least) is that the serial port numbers are assigned pretty randomly. If you have several USB devices connected there is no garantee that each device gets the same serial port number every time.
There is a solution for this where you can map your own custom tty device name to a specific USB device type, specific USB port (and more). Have done it myself but I don’t have the information at hand now. This possibly could be an issue in your situation.

Another issue is that an ATmega328U4 (like on your board)’ it’s serial (over USB) port takes some seconds to become ready after being connected/powered-on. This may not be related to your problem but is often an issue when a sketch tries to write to the Serial port when it is not yet ready.

No experience with Arduino on Raspberry Pi here (I prefer faster machines for development).

Maybe PlatformIO (either with VSCode or Atom based PlatformIO IDE or PlatformIO commandline) could be an alternative for the Arduino IDE on to use on a Raspberry Pi (I use it on Windows all the time). https://www.raspberrypi.org/forums/viewtopic.php?p=1302802
(My own PlatformIO experience is limited to Windows.)

It is Windows (Not Windoz(e) which is how Windows bashers call it. Many helping happy Windows users here on the forum…).

The BSFrance LoRa32U4 mentioned on top already has on-board USB to Serial, so no need for a separate USB to Serial adapter (and also not neccesarily an FTDI chip based version).

in general, when can you expect 'problems with arduino IDE / Linux :

  • your node has a 32U4 as MCU aka a virtual port on the module
    so go for a node with a different processor or use a different platform to program with Arduino IDE

* I checked again because it was a while ago and the version is now 2.1.05

used a RPI 3A
installed arduino ide: sudo apt-get install arduino
connected a lora 32U4 II (ATmega32u4 @ 8MHz) with usb cable
select port and board (leonardo)
upload blink (worked :sunglasses:)

upload second time again failed , because port was not released/found
So… press and hold reset on board, click 'upload and release reset after a second… port is found again and sketch uploaded.

1 Like

Life-R-Good - until…
Via BSFrance/examples/LoRaSender compile:

In file included from LoRaSender1.ino:3:0:
/usr/share/arduino/libraries/SPI/LoRa.h:84:3: error: ‘SPISettings’ does not name a type
SPISettings _spiSettings;

Also on MacOSX sometimes you need to play with the reset button, but it always uploads, sooner or later.
However, the last error you have has nothing to do with it. Apart that the example your are trying to run is not LoRaWAN but LoRa, on the BSFrance board I use LMIC examples without issues (except memory when I try to do too much) from here. You may find specific info on the board in this thread.

2 Likes

And for a more recently maintained version of arduino-lmic see:
GitHub - mcci-catena/arduino-lmic: LoraWAN-MAC-in-C library, adapted to run under the Arduino environment

Also helpful: Overview of LoRaWAN Libraries [HowTo]

2 Likes

I think what you have installed is 2:1.0.5. It is older than 1.8.5. or 1.8.9.

youre probably right… then use this on your RPI

wget http://downloads.arduino.cc/arduino-1.8.9-linuxarm.tar.xz tar -x -f arduino-1.8.9-linuxarm.tar.xz