RAK12022 compile errors

Please include the following information, in order for us to help you as effectively as possible.

  • What product do you wish to discuss?
    RAK19001 + RAK4631-R + RAK12022

  • What firmware are you using?
    RUI3

  • What firmware version?
    Can’t connect

  • Computer OS?
    Windows + Android IDE 2.2.1

  • What Computer OS version?
    11

  • How often does the problem happen?
    Always

  • How can we replicate the problem?

  1. Open Arduino IDE
  2. Open Examples > RAK12022-MAX31865 > RAK12022_MAX31865_Example project
  3. Compile
  • Provide source code if custom firmware is used or link to example if RAKwireless example code is used.
    RAK12022-MAX31865

I get compile errors when trying to compile the PT100 sensor example code.

Has this got something to do with me using an RUI3 board? I’m new to this so I don’t know where this whole RUI3 thing fits in. I had a look at the RUI3 API documentation (which lacks actual descriptive guidance, examples and tutorials), but wouldn’t have a clue whether I need to use it for SPI comms or not.

C:\Users\meamt\OneDrive\Documents\Arduino\libraries\RAK12022-MAX31865\src\RAK_SPI.cpp:21:57: error: no matching function for call to 'SPIClass::SPIClass(NRF_SPIM_Type*, const uint8_t&, const uint8_t&, const uint8_t&)'
   21 | SPIClass SPI_USER(NRF_SPIM3, RAK_MISO, RAK_SCK, RAK_MOSI);
      |                                                         ^
In file included from C:\Users\meamt\AppData\Local\Arduino15\packages\rak_rui\hardware\nrf52\4.1.0/cores/nRF5/component/rui_v3_api/ruiTop.h:922,
                 from C:\Users\meamt\AppData\Local\Arduino15\packages\rak_rui\hardware\nrf52\4.1.0/cores/nRF5/component/rui_v3_api/Arduino.h:1,
                 from C:\Users\meamt\OneDrive\Documents\Arduino\libraries\RAK12022-MAX31865\src\RAK_SPI.cpp:10:
C:\Users\meamt\AppData\Local\Arduino15\packages\rak_rui\hardware\nrf52\4.1.0/cores/nRF5/component/rui_v3_api/SPI.h:57:2: note: candidate: 'SPIClass::SPIClass(udrv_spimst_port)'
   57 |  SPIClass(udrv_spimst_port port);
      |  ^~~~~~~~
C:\Users\meamt\AppData\Local\Arduino15\packages\rak_rui\hardware\nrf52\4.1.0/cores/nRF5/component/rui_v3_api/SPI.h:57:2: note:   candidate expects 1 argument, 4 provided
C:\Users\meamt\AppData\Local\Arduino15\packages\rak_rui\hardware\nrf52\4.1.0/cores/nRF5/component/rui_v3_api/SPI.h:49:7: note: candidate: 'constexpr SPIClass::SPIClass(const SPIClass&)'
   49 | class SPIClass
      |       ^~~~~~~~
C:\Users\meamt\AppData\Local\Arduino15\packages\rak_rui\hardware\nrf52\4.1.0/cores/nRF5/component/rui_v3_api/SPI.h:49:7: note:   candidate expects 1 argument, 4 provided
C:\Users\meamt\AppData\Local\Arduino15\packages\rak_rui\hardware\nrf52\4.1.0/cores/nRF5/component/rui_v3_api/SPI.h:49:7: note: candidate: 'constexpr SPIClass::SPIClass(SPIClass&&)'
C:\Users\meamt\AppData\Local\Arduino15\packages\rak_rui\hardware\nrf52\4.1.0/cores/nRF5/component/rui_v3_api/SPI.h:49:7: note:   candidate expects 1 argument, 4 provided

exit status 1

Compilation error: exit status 1

Any help would be appreciated.

Hi @olis ,

This seems to be an issue related to SPI. I already created a ticket on our RUI3 dev team to have a look into it.

I did a few more experiments.

Because I’m using the RUI3 version of the RAK4631, I installed the board support package called RAKwireless RUI nRF Boards. The board that I selected in the drop down box at the top of the Arduino IDE is called WisBlock Core RAK4631 Board. This board doesn’t work when trying to compile the MAX31865 library.

I then thought I would try the standard BSP. I installed RAKwireless nRF Boards in the board manager. I then selected the WisBlock RAK4631 board from the board selector instead of the one mentioned before. Now the compile worked fine.

Would I be correct in concluding that the MAX31865 example library did not work for the RUI version, because it is not compatible with RUI?

Would I be also correct in assuming that if I want to use the RAK12022 board using RUI I will have to write my own version of the firmware using RUI API instead?

I converted one of my RAK4631 based boards from RUI3 to Arduino and managed to get the MAX31865 library and example project to compile and load successfully. I can now read the temperature of a PT100 sensor.

Again, if I understand correctly, I think the example project is not RUI3 compatible.

I find that RUI3 sounds like a great concept, but it is very much lacking in solid examples compared to most of the more “standard” way of doing things with Arduino… In most cases you can Google yourself out of trouble with Arduino related issues, but with RUI3 there’s basically almost nothing out there except for a bit on LoRaWAN parameters.

Hi @olis ,

RUI3 still has some library incompatibilities at the moment. It is not as mature as other BSPs that was already out there for many years. In addition, to accelerate RUI3 development, we will open source RUI3 soon so that the community can contribute as well on making the RUI3 compatible to most Arduino libraries.