Page 2 of 3

Re: [App] libText D/E/F/H

Posted: Mon Oct 26, 2015 9:07 pm
by astrakid
when the issue occurs i get no screen output, and it is only happening with font 0. but with simpliest options it is working fine. Unfortunately the log is removed after reboot...

Re: [App] libText D/E/F/H

Posted: Mon Oct 26, 2015 9:18 pm
by zoelechat
You have enough time to catch log between injection and crash, but not sure it will tell anything interesting anyway. You tried using FB arg?

Re: [App] libText D/E/F/H

Posted: Mon Oct 26, 2015 9:33 pm
by astrakid
yes. i didn't see any difference.
what do you mean with "enough time between injection and crash"? as soon as the event, that causes a crash, is sent my connection is gone! so how shall i catch the log?

Re: [App] libText D/E/F/H

Posted: Mon Oct 26, 2015 9:36 pm
by zoelechat
astrakid wrote:as soon as the event, that causes a crash, is sent my connection is gone!
Not true, you have enough time to:

Code: Select all

cat /dtv/Text.log
...except maybe if you didn't disable Watchdog.

Re: [App] libText D/E/F/H

Posted: Mon Oct 26, 2015 9:46 pm
by astrakid
Watchdog is disabled. And there is no time to display the log-content, because my ssh connection is killed immediately. So how shall I cat it? I tried to perform a "tail -f" on Alert.txt, but because the log is not appended to the file, it doesn't show anything (tested with call libAlert-injection).

Re: [App] libText D/E/F/H

Posted: Mon Oct 26, 2015 9:47 pm
by zoelechat
Ahh ssh...
Try Telnet :)

Re: [App] libText D/E/F/H

Posted: Tue Jun 07, 2016 1:24 pm
by bugnotme
zoelechat
Thx for the lib!I've use it to show the data from Arduino DIY weather station. Works flawlessly :)
SpoilerShow
Image

Re: [App] libText D/E/F/H

Posted: Tue Jun 07, 2016 1:57 pm
by zoelechat
Hehe, always interesting to be aware of such original usage :)

Re: [App] libText D/E/F/H

Posted: Tue Jun 07, 2016 2:40 pm
by juusso
bugnotme wrote:zoelechat
Thx for the lib!I've use it to show the data from Arduino DIY weather station. Works flawlessly :)
Wow, i`m very interested in details. Do you have any link? Schematics, sketch etc description? :)

Re: [App] libText D/E/F/H

Posted: Tue Jun 07, 2016 3:56 pm
by bugnotme
Here is a component list: :)

Arduino
BMP280 (temperature + pressure) - indoor sensor
Si7021 (temperature + humidity) - outdoor sensor
ENC28J60 - network

There are tons of examples how to connect it together and make it work.

In my case Arduino is listening on 80 port for "GET /?now" request. Then generates a response in format like:

Code: Select all

[indoor_temp];[outdoor_temp];[humidity];[pressure];
I've wrote a simple bash script that make request to Arduino every N seconds, parses response and finally calls libText.
SpoilerShow

Code: Select all

#!/bin/sh

url="http://192.168.0.200:80/?now"

while true; do
   result=$(wget --tries=5 --timeout=5 -qO- ${url})

   temp=$(echo $result | cut -d \; -f 1 | sed -r "s/(.*\..).*/\\1/")
   press=$(echo $result | cut -d \; -f 4 | sed -r "s/(.*\..).*/\\1/")
   humi=$(echo $result | cut -d \; -f 3)

   if [ -z $(echo $temp | grep '-') ]; then
     temp=+$temp
   fi

   cmdline="samyGOso -d -A -B -l /mtd_rwcommon/libText.so TEXT:'${temp} ${humi}% \\${press}mm  ' FONT:1 CENTER:3 FB"

   eval $cmdline
   sleep 30
done
Something like that... :)