DIYmall LoRa32u4 II

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


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


And for a more recently maintained version of arduino-lmic see:

Also helpful: Overview of LoRaWAN libraries - LMiC, LoRaMAC-node and their variations


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 tar -x -f arduino-1.8.9-linuxarm.tar.xz

Ah, 2.1 or 2:1 who’s on first? and the apt-get maintainers who threw in in reverse WT…?

OK, here’s where I’m at:
Via Dragino I downloaded rpi-lora-tranceiver-master. I first walked the Get GPS to work and I’m at $GPGLL,3902.1942,N,10440.1108,W,183646.000,A,A*4A

Then I went down the LoRa path - changed 8681000 to 9150000 and ran dragino_lora_app rec and it ran for a while and I received 2 packets (of trash?). I tried running LoRaSender on my DIYmall LoRa32u4 board. My dragino didn’t receive any data - question later. they I switch from “rec” to “snd” and LoRaReceiver - no joy.

Ques: #1 the code shows 868.1 which I changed to 915. Now is it 915 or 915.100 or 915.1824??

#2 How can I get Serial.print to work?


you have been given advise here and here

this topic is closed