SparkFun LoRa Thing Plus expLoRaBLE not working

This persistent error: Error compiling for board SparkFun Artemis Thing Plus.

Dell Inspiron, Arduino 1.8.13, Artiemis and Apollo3 boards no problem, several good codes running on SF RB Artemis and SF RB Artemis Nano. Officially:

"Arduino: 1.8.13 (Windows 10), TD: 1.53, Board: “SparkFun Artemis Thing Plus, 921600, Ambiq Secure Bootloader (Advanced)”

Two new SF LoRa Thing Plus board. TTN gateway, application, device and associated codes all fine.

Example code LoRaWAN_node_ABP_method, example as downloaded from SF, does not work. Will not compile on SF Artemis Thing Plus.

Errors ( listed below) apparently all derive from hal.cpp

Error list copied verbatim

"

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal\hal.cpp:192:12: error: ‘SPIName’ does not name a type; did you mean ‘SPIClass’?

extern “C” SPIName spi_get_peripheral_name(PinName mosi, PinName miso, PinName sclk); // this mbed internal function determines the IOM module number for a set of pins

^~~~~~~

SPIClass

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal\hal.cpp: In function ‘void hal_spi_init()’:

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal\hal.cpp:197:52: error: ‘D38’ was not declared in this scope

printf(“SPI IOM %d\n”, spi_get_peripheral_name(D38, D43, D42));

^~~

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal\hal.cpp:197:57: error: ‘D43’ was not declared in this scope

printf(“SPI IOM %d\n”, spi_get_peripheral_name(D38, D43, D42));

^~~

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal\hal.cpp:197:62: error: ‘D42’ was not declared in this scope

printf(“SPI IOM %d\n”, spi_get_peripheral_name(D38, D43, D42));

^~~

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal\hal.cpp:197:28: error: ‘spi_get_peripheral_name’ was not declared in this scope

printf(“SPI IOM %d\n”, spi_get_peripheral_name(D38, D43, D42));

^~~~~~~~~~~~~~~~~~~~~~~

Multiple libraries were found for “SPI.h”

Used: C:\Users\clsnf\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\1.2.1\libraries\SPI

Not used: C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\SPI-master

exit status 1

Error compiling for board SparkFun Artemis Thing Plus.

End of copy"

hal.cpp does not work. 2015 version?

I corrected some errors by replacing SPI1 with SPI but you really do not want me overwriting *.cpp codes.

Also, on https://learn.sparkfun.com/tutorials/sp … e-overview, box implies version 2.0.5 for SF Apollo3 board but my Arduino IDE shows latest version of SF Apollo3 boards as 1.2.1, installed.

I read this text " “The library includes modifications for the SPI pins use by the NM180100 to connect the Apollo3 MCU to the SX1262 module. Additionally, it also contains modifications to pre-configure the library to use the SX1262, the US LoRa frequency band, and defaults to a SF7 (spreading factor).” on https://learn.sparkfun.com/tutorials/sp … e-overview. Apparently not true.

Another substantial disappointment for a supposedly new well-supported SF product …

Following latest instructions, installed updated Artemis Apollo core. Now I find version 2.0.5 of board definitions as well explicit board listing for Thing Plus ExpLoRaBLE. Using correct version, board and port I get a different error message:

Error compiling for board LoRa Thing Plus expLoRaBLE.

Details:

Arduino: 1.8.13 (Windows 10), TD: 1.53, Board: “LoRa Thing Plus expLoRaBLE, 921600, SparkFun Variable Loader (Recommended)”

c:/users/clsnf/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/…/lib/gcc/arm-none-eabi/8.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: libraries\BasicMAC\hal\hal.cpp.o: in function `hal_ant_switch’:

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal/hal.cpp:116: undefined reference to `lmic_pins’

c:/users/clsnf/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/…/lib/gcc/arm-none-eabi/8.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: libraries\BasicMAC\hal\hal.cpp.o: in function `hal_pin_rst’:

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal/hal.cpp:121: undefined reference to `lmic_pins’

c:/users/clsnf/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/…/lib/gcc/arm-none-eabi/8.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: libraries\BasicMAC\hal\hal.cpp.o: in function `hal_pin_busy_wait’:

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal/hal.cpp:176: undefined reference to `lmic_pins’

c:/users/clsnf/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/…/lib/gcc/arm-none-eabi/8.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: libraries\BasicMAC\hal\hal.cpp.o: in function `hal_dio3_controls_tcxo’:

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal/hal.cpp:181: undefined reference to `lmic_pins’

c:/users/clsnf/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/…/lib/gcc/arm-none-eabi/8.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: libraries\BasicMAC\hal\hal.cpp.o: in function `hal_dio2_controls_rxtx’:

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal/hal.cpp:184: undefined reference to `lmic_pins’

c:/users/clsnf/appdata/local/arduino15/packages/sparkfun/tools/arm-none-eabi-gcc/8-2018-q4-major/bin/…/lib/gcc/arm-none-eabi/8.2.1/…/…/…/…/arm-none-eabi/bin/ld.exe: libraries\BasicMAC\hal\hal.cpp.o:C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\hal/hal.cpp:331: more undefined references to `lmic_pins’ follow

collect2.exe: error: ld returned 1 exit status

Multiple libraries were found for “SPI.h”

Used: C:\Users\clsnf\AppData\Local\Arduino15\packages\SparkFun\hardware\apollo3\2.0.5\libraries\SPI

Not used: C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\SPI-master

exit status 1

Error compiling for board LoRa Thing Plus expLoRaBLE.

Now an error in specific section of hal.cpp related t lmic_pins? Help, please.

Hello, I fix that kind of compile error by disabling the USE_STANDARD_PINMAP (placing it on comment //USE_STANDARD_PINMAP ). Compile is OK but I cannot join. Another problem. :slight_smile:

Good suggestion, thanks. I disabled (commented out) that line in code. Code compiled successfully. And, miracle, now I see regular payloads going out (via Arduino IDE serial monitor) and coming in via my TTN router.

Sunday, 2021-03-07

After disruption in household wireless connections but without any other changes to files, code, connections or board, this morning I get this error:

C:\Users\clsnf\OneDrive\Documents\Arduino\libraries\BasicMAC\src\lmic\radio-sx126x.c:778: assertion failed.

Error derives from this line in radio-sx126x.c:

ASSERT( ReadReg(REG_LORASYNCWORDLSB) == 0x24 );

Why the change?

Sunday, 2021-03-07, update

Once I disconnected that ExpLoRaBLE board completely, including from battery, for a truly cold reboot, it then worked. Radio evidently needed a reset that it did not get with battery connected?

clsnwrks:
Sunday, 2021-03-07, update

Once I disconnected that ExpLoRaBLE board completely, including from battery, for a truly cold reboot, it then worked. Radio evidently needed a reset that it did not get with battery connected?

I'm testing this card and I had the same problems you described above.

I solved the pending issues with the mapping of the pins and he started to make the transmission attempts.

However, nothing was received on TTN. Alias, it looks like it passes the join very quickly.

The pinmap I defined was this:

#define _NSS 36
#define _MOSI 38
#define _MISO 43
#define _SCK 42
#define _Busy 39
#define _DIO1 40
#define _DIO3 47
#define _NRESET 44

I know some are not used, but I made sure to put them all.

As a last test, I did what you suggested to turn off the power module and turn it on again. But I was not successful.

Did you find out anything else about this?

Note that it tries to join and quickly starts transmitting the data.

Starting

SPI1 begin
SPI IOM 3
2033: EV_JOINING
00:00:000.033: engineUpdate[opmode=0x4]
00:00:01.030: engineUpdate[opmode=0x4]
64661: EV_TXSTART
00:00:01.036: engineUpdate[opmode=0x884]
00:00:01.039: TX[mod=LoRa,sf=10,bw=125,cr=4/5,nocrc=0,ih=0,fcnt=0,freq=902.5,pow=30,len=23] : 00F50955520C9A6E1670B3D57ED004440D627635BA0000
89447: EV_TXDONE
00:00:01.432: engineUpdate[opmode=0x884]
00:00:06.425: RX_MODE[mod=LoRa,sf=10,bw=500,cr=4/5,nocrc=1,ih=0,freq=923.9,rxtime=401932]
00:00:06.439: WARNING: rxtime is 540 ticks in the past! (ramp-up time 5 ms / 369 ticks)
00:00:06.460: RX: TIMEOUT

jmjo:
Hello, I fix that kind of compile error by disabling the USE_STANDARD_PINMAP (placing it on comment //USE_STANDARD_PINMAP ). Compile is OK but I cannot join. Another problem. :slight_smile:

Did you solve your problem?

It i probably late for an answer, but I never received a notification about your question, sorry…

As I remember the main problem was that the UUID need inversion but not the services or other.

Another problem was that this Device does not perform well as LoRa sensibility compare to other products I am using. So for my projects this is not usable. I had difficulties to use it, thinking it was still a code problem…

I compared live with other products connected to a public antenna and ExploraBLE was working really badly.

I am very updet while I did not find a similar product yet on the market. LoRa-BLE.

PS: I found my post with more details: #226506

My test of the expLoRaBLE fails with an assertion failed message for hal.cpp

OUTPUT from sketch execution:


Starting

00:00:00.001: c:\Users\cdeat\OneDrive\Craig Documents\Arduino\libraries\Basicmac_LoRaWAN_stack\src\hal\hal.cpp:73: assertion failed


I am using the basicmac_otaa sketch that is references in the Sparkfun documentation for the SparkFun LoRa Thing Plus board (#WRL-17506). The only mods I made to the sketch were to provide my TTN DEVEUI and APPKEY and to comment out line 68 // #define USE_STANDARD_PINMAP as suggested in an earlier reply in this thread.

Sketch compiled properly, and began execution and immediately raised the assertion failure.

I have other LoRaWAN devices working properly with my TTN account (e.g. SAMD-21 Pro RF board), and I am using my own private gateway which is properly working.

Any help will be greatly appreciated.