They would be for the MCU, the RAK3172 is an electrical implementation, which is what the three radio files are for, setting up the electrical connections that RAK used.
Yes you are right but RAK3172 uses STM32WLE5CC processor. I’m having a hard time finding examples of this. It would be great if Rakwireless could make a repo for this using stm32cubeide.
There is the software on the ST product page for that - STM32Cube_FW_WL_V1.1.0 - plus the examples in CubeMX plus on GitHub in ST’s repros.
And I see from Mistress Google that the Seeed offering is working on the same basis of altering the ST official software with the right connections.
Thank you for your answer. I reviewed Seed E5. I managed to get the code to the device. It throws a request to join the Lorawan network. But I am getting an error as in the screenshot. Can’t join. Can you help with this?
Hi @saffetblt17 ,
Can you try to change the APPKEY of the device registration in The Things Stack? If there is a MIC Mismatch, usually you got the right DEVEUI and APPEUI but your APPKEY needs to be refreshed.
Btw, is this for a Seeed Device or for the RAK3172? Did you use STM32WL code modification or you start with your own .ioc?
Unfortunately I tried this but couldn’t solve the problem. Is it an MSB, LSB, big endian problem? Unfortunately I tried this but couldn’t solve the problem. Is it an MSB, LSB, big endian problem? Please take a look at my settings.
MIC mismatch
probably means you have the right APPEUI and DEVEUI but APPKEY needs to be refreshed.
Can you regenerate a new APP KEY? You can find it on the General Settings
tab. Then you need to click Expand
in the Join Settings
. Generate a new one and don’t forget to save.
Then update the APPKEY on the STM32WL Code too.
Yes I tried that. I have created a new device registration in the images above. But the result did not change.
What is the LoRaWAN version do you use? Have you tried both v1.0.2 and v1.0.3? Same result?
Yes, I tried them all. Frankly, I couldn’t find where it was set in stm32. But I tried them all over TTN. The result is the same.
I can’t figure out directly what causes the MIC mismatch
. Usually, it is an APPKEY that needs to be changed to have a successful join if that is the issue.
I can try your code here in my setup if you can send me the joining code and the .ioc you use.
You can also use mbed-os, very easy now, check this out how
Really nice work @Charles ! Something to try
Btw, we also have now the STM32CubeIDE porting guide as well that uses the STM32WL SDK from ST.
Thanks @carlrowan
Yeah saw that, impressive documentation nice work team RAK.
BTW I noticed a serious issue on module consumption during transmit, check this one
Can you help me with RAK3172?
I took directly from the STM32, RAK3172 Low Level Development, I have changed all the files necessary (radio files and startup file), and I could compile the LoraWand End Node example, but every time that I need to change or configure another peripheral on .ioc file, I do the same procedure, copy and paste the same files in the same location, but i still unable to compile, even if I just configure a simple GPIO…
Welcome to RAK forum @matheus.smi ,
It is part of the guide that the modification of the Radio Files should be after setting up all the peripherals needed by the application. You can modify last the radio files. There was a guide created by RAK user that avoid this step but I haven’t personally tried it yet - RAK3172 - Stm32World Wiki.
Hi Carl,
Thanks for sharing this link!
I was able to configure my peripherals and everything else directly in CubeMX, and I successfully built the code with some additional modifications to use the RAK3172 module.
However, when I tried to flash my RAK3172 module, I ended up damaging the STM32WLE5 flash. This caused a significant amount of time and effort to recover, as the STM32CubeProgrammer couldn’t connect to the STM32WLE5 on the RAK3172.
Currently, I’d like to understand if this content is valid enough and if there are any best practices or additional precautions I should take to avoid such issues in the future. Specifically, I suspect the problem may have been due to not configuring the SDIO and SCLK pins correctly in CubeMX. Any insights or recommendations would be greatly appreciated.
Now Im able to flash my code into RAK3172, but I have a question, do we have a specific pins to configure RF_SWCTRL_1 and RF_SWCTRL_2 ? I saw in the guide he ask to configure 3 pins (2 outputs and 1 input), and set them as RF_SWCTRL_1, RF_SWCTRL_2, FREQUENCY.
But can we choose those or we need to configure in a specific gpio pin?
The RF control pins are set in the module hardware design.
Note these pins are different between the RAK3172 and the RAK3172-SIP targets.
The frequency pin is purely a configuration indicator - it is tied high or low by RAKWireless depending on whether it is an 959/915MHz or a 430MHz version of the module (as the tx/rx matching network would be different). It has no function otherwise.