Advises for some Wisblock development?

Hi

I have played with some Wisblock modules I have since a while but so far mainly compiled some all done example codes from Internet/Rak github repos.
I now have a real project I’d like to work on. I plan to use it to retrieve data through LoRa from an electrical counter that works with DSMR protocol (serial one way communication only). The device would work on battery and recharge through the power given by the counter.
Of course, once working, all codes will be shared on my blog with tutorial on how to build the whole system as I guess it might interest quite a lot of people at least in Europe !
I have a RAK3172 core module and quite a few interface modules.
I’m not a noob in programming but only on some proprietary systems and not really in regular C++/C# for example.
I have few questions to be sure I’m not going in the wrong way since begin :smiley: I work only on Linux in case it’s important :wink:

  • Should I use RUI or program straight the controller ? I guess RUI3 will make things a lot easier ? and does it still allow to incorporate some extra libraries like the one I’ll need to handle the DSMR protocol ?
  • Which GUI to use ? I’m not at all a fan of Microsoft stuffs so I would prefer to avoid VS and go with Arduino IDE (I used in the past the Arduino IDE to program my Wisblock with demo codes).
  • What is the best way to interface Wisblock with a serial port working at 9600bps ?

Thanks for your advices and help,

Vincèn

Hi

(1) I would of course go with RUI3 as it takes away the problems to integrate LoRa drivers and LoRaWAN stack. RUI3 is compatible with 99% of the Arduino libraries (from what I tested). There are a few exceptions, like the OneWire library (DS18B20), but there are work-arounds possible.

(2) If you want to use Arduino IDE, both V1.8.x and V2.x.x are possible, but they will never be a choice for me. Visual Studio Code makes everything just more comfortable (including jumping directly into BSP functions to understand how they work, direct pull/push from Git repos, …).

(3) You will have only UART1 available for communication with the electrical counter. UART1 is available on the Base Boards as TXD1/RXD1.

Hi @beegee

Thanks a lot for your answer.

(1) makes sense so I’ll go with RUI3 :slight_smile:

(2) sad to know it’s better to work with VSCode. I tried to follow the tutorial on Rak wiki to setup it for RUI3 coding but I failed so far :frowning: Any advice on a basic tutorial on use of VSCode ? Also is it normal that Platformio documentation doesn’t list the rak3172 module based on stm32 and only modules based on RPI, ESP and nRF ?

(3) ok so I just need nothing extra, my baseboard that looks to be a RAK19007 and a RAK3172 board and so I just wire the TX1/RX1 of it for my DSMR link and it should be all good for hw :slight_smile: Just need to succeed to do some working code :laughing:

Vincèn

(2) RUI3 is not available for PlatformIO.
The only way to use RUI3 with VSC is to use the Arduino extension as shown in Visual Studio Code (Arduino Extension)

:bangbang:
Thanks to Microsoft loosing interest in the Arduino Extension, they marked it as DEPRECATED and stopped maintaining it.

:heavy_plus_sign: :heavy_plus_sign:
There is now a community driven version of the extension that I am using ==> Arduino Community Edition. It is listed in the Extensions of VSC already.

Following above tutorial for VSC, just install the Community Edition instead of the old (deprecated) extension.

(3) Yes, using the TX1/RX1 + GND should work.

We are not trying to push people to use a specific IDE. Just showing here my personal preference. For many people ArduinoIDE seems to be enough, it is just not good for me.

Thanks a lot @beegee for help and so I have been able to setup Arduino extension in VS Code and able to code one of the RUI3 sample code. I’ll just have to investigate why it doesn’t communicate with the RAK module. States all the time (serial port well setup and I know it works as I can communicate through it to send AT command at RUI that is already loaded in it).

ModuleNotFoundError: No module named ‘serial’

yeah no worries here, I got it :wink: Well both softwares are quite opposite I think: Arduino IDE is very simple and basic while VSCode is just a laybrinthine system (well the Microsoft way to do :laughing:).

You are on Linux? Could be a missing library in Python.
I am not familiar with Linux.

well it remembered me something that problem in the past when playing with the same Wisblock board but with Arduino IDE and your samples code for sensors and in fact it’s just the pyserial library that needs to be installed and all good.
I have been able to compile the default LoRa OTAA sample code so I guess it’s a good base to start for my project :wink: Will try to import a DSMR library and get it to work with the LoRa code :hand_with_index_finger_and_thumb_crossed:
Thanks for your help :slight_smile: