logo elektroda
logo elektroda
X
logo elektroda

Openbk7231t: Console Log Output to a File on LittleFS in Embedded Systems

dansch 1008 4
ADVERTISEMENT
  • #1 21543136
    dansch
    Level 2  
    Posts: 3
    Is it possible to write the console (debug) log to a file on the LittleFS (persistent logging)?
    AI: Which firmware or software environment are you using with the OpenBK7231T (e.g., OpenBeken, official SDK, or something else)?
    OpenBK7231T
    AI: Are you looking to redirect all console/debug output automatically to a file, or do you have a specific logging function or library in use?
    I want to write all console/debug output to a file automatically.
  • ADVERTISEMENT
  • #2 21543202
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14584
    Help: 654
    Rate: 12607
    Well, how big log file would you like to have? LittleFS is a bit limited in size, so even if we tried to store log in the LFS, it would just store few latest messages... Maybe I could try to create such modification for you, but I'm not sure if it would be feasible for your application.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 21543321
    dansch
    Level 2  
    Posts: 3
    I want to debug why some of my devices (bl602) go offline (My AP shows them as online. So wifi module is working but I guess the http server is not working anymore.) and come back or do a restart via watchdog. I guess it has something to do with "PowerSave". But for now I just wrote a Script to collect all log via "http://xxx.xxx.xxx.xxx/lograw". Maybe this gives already some informations.

    I also measured the difference of the "Current" with and without "PowerSave" and it seems not much (about 1 mA). Is this a reasonable value? Is PowerSave meaningful for a device like this (https://www.elektroda.com/rtvforum/topic4020634.html) ?

    What exactly is the difference between "PowerSave" and "DeepSleep"? The latter is not implemented for bl602 devices, right?
  • ADVERTISEMENT
  • #4 21543684
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14584
    Help: 654
    Rate: 12607
    Do they reboot while using MQTT, or are you not using MQTT?

    DeepSleep basically turns device off until given time passes or until an event on GPIO occurs (like a button press).

    Which OBK version? We recently had BL602 SDK update.
    Helpful post? Buy me a coffee.
  • #5 21543890
    dansch
    Level 2  
    Posts: 3
    I am aware of the SDK update (I was part of the discussion on GitHub) and I am using version 1.18.98 with the following startupCommand:
    backlog startDriver BL0937; startDriver NTP; ntp_timeZoneOfs 02:00; PowerSave 1


    I am also using MQTT. Yesterday I changed the MQTT host from DNS name to IP to exclude DNS resolve problems.
    Does MQTT trigger watchdog reboots?
ADVERTISEMENT