beegee-tokyo / RUI3-Modular

An approach to create a sensor application with RUI3 without coding. Check the README file how it works.
MIT License
3 stars 0 forks source link

Sleep mode ?? #1

Open vincegre opened 1 year ago

vincegre commented 1 year ago

Hi

Thanks for your code and your design that looks very nice. I'm going to try it to program my RakWireless module with its two sensors. But does it handle sleep mode or not at all ? os it's for a wireless sensor working on battery. I have seen the AT command ATC+SENDINT but it looks to setup only transmission interval and not sleep time right ?

Thanks

Vincèn

beegee-tokyo commented 1 year ago

Hi Vincen,

The code is designed for low battery application. The firmware is in sleep mode all the time unless it is woken up by the timer (set with AT+SENDINT) or by LoRaWAN activities.

vincegre commented 1 year ago

Thanks and sorry for late answer ! I'm back on it but unable to compile the sketch. I have an RAK3172 with RAK1901 and 12047. I have copied the CPP files of these two sensors in main directory, selected proper board in Arduino IDE and when I compile it complains it's missing: rak1901.h but that file doesn't exist in the repo :( What's wrong there ? or what did I miss ?

beegee-tokyo commented 1 year ago

You need the RUI3 RAK1901 library. Can be downloaded from RAK's Download Center.

It is mentioned in the README.md, but maybe difficult to find: image

vincegre commented 1 year ago

You need the RUI3 RAK1901 library. Can be downloaded from RAK's Download Center.

It is mentioned in the README.md, but maybe difficult to find: image

Thanks for clarification as I thought it was already included in code downloaded from repo ! So now it compiles fine and I can upload it on my RAK3172 but I'm unable to interact with it. Now the RAK3172 is not interacting anymore properly with Wistoolbox stating module is not in AT mode and unable to switch it back in AT mode. If I connect Minicom on serial port of RAK3172 all I get is that:

Bienvenue dans minicom 2.8

OPTIONS: I18n                                                                
Port /dev/ttyUSB0, 09:27:19                                                  

Tapez CTRL-A Z pour voir l'aide concernant les touches spéciales             

RAKwireless RUI3 Node                                                                                      
------------------------------------------------------                                                     
Setup the device with WisToolBox or AT commands before using it                                            
------------------------------------------------------                                                     
+EVT:RAK1901 OK                                                              
+EVT:RAK12047 OK                                                             
[AT_CMD] Read send interval 0X00 0X00 0X00 0X00                              
                                               [AT_CMD] Send interval found 0
                                                                             Current Work Mode: LoRaWAN.

and no way to send any AT commands :( I have tried quickly when board boots to send the AT+ATM to switch in AT mode but not much luck :(

beegee-tokyo commented 1 year ago

Looks like the RAk3172 runs into a code error and is stuck. I got this before and it is difficult to get it out of that status when the error happens within the setup routine. The easiest way is to flash the default RUI3 firmware with STM32CubeProgrammer.

vincegre commented 1 year ago

The easiest way is to flash the default RUI3 firmware with STM32CubeProgrammer.

Thanks for advice unhappy it's a long time I have given up on the shitty (at my eyes) GUI/dev tool of ST: STM32CubeProgrammer !! I have found out a solution by flashing the code supplied by RakWireless and so far it works this way !