Problem with display.sh ?

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
Post Reply
dpetx
Posts: 3
Joined: Sat Mar 20, 2010 3:07 pm

Problem with display.sh ?

Post by dpetx »

Hello.
I'm in the process of building the radio by this project. But I do not want to build it based on the router but the motherboard from the notebook. For now, I ran the display and tuning. For testing I use Debian (for now)
I have a problem with the speed performance of the script display2.sh (or interface.sh - I'm not sure). Script runs very slowly - sends data TITLE, NAME to display approximately every 2 minutes. I do not know where the problem is.
Once unlocked display echoes on the local console is the same.

Sorry for my English.
User avatar
mightyohm
Site Admin
Posts: 1063
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Problem with display.sh ?

Post by mightyohm »

Wow, interesting problem! I would try to get the display2.sh script working by itself first.

You will need to uncomment the #stty line towards the top of the script (normally interface.sh takes care of this).

If the updates are still slow, try adding some echo statements at various points in the script to see if it is stalling in a particular place.

It might be interesting to see if "sleep 1" waits for one second, as intended, or some other amount on your system.
dpetx
Posts: 3
Joined: Sat Mar 20, 2010 3:07 pm

Re: Problem with display.sh ?

Post by dpetx »

It looks that the "sleep 1" in my case means 1 minute. Data is sent exactly once every minute. The documentation shows that the default is 1 second, I do not understand how this change.
I hope that the target system (openwrt) will be fine.
Currently I'm trying to compile openwrt for x86, unfortunately, ineffective.
User avatar
mightyohm
Site Admin
Posts: 1063
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Problem with display.sh ?

Post by mightyohm »

I find this very puzzling.

If you execute "sleep 1" from your Debian shell, how long does it take for the command to run?

From the Debian manual page:

Code: Select all

SLEEP(1)                         User Commands                        SLEEP(1)

NAME
       sleep - delay for a specified amount of time

SYNOPSIS
       sleep NUMBER[SUFFIX]...
       sleep OPTION

DESCRIPTION
       Pause for NUMBER seconds.  SUFFIX may be `s' for seconds (the default),
       `m' for minutes, `h' for hours or `d' for days.  Unlike most  implemen-
       tations  that require NUMBER be an integer, here NUMBER may be an arbi-
       trary floating point number.  Given two or more  arguments,  pause  for
       the amount of time specified by the sum of their values.

       --help display this help and exit

       --version
              output version information and exit

AUTHOR
       Written by Jim Meyering and Paul Eggert.

REPORTING BUGS
       Report bugs to <bug-coreutils@gnu.org>.

COPYRIGHT
       Copyright  (C) 2008 Free Software Foundation, Inc.  License GPLv3+: GNU
       GPL version 3 or later <http://gnu.org/licenses/gpl.html>
       This is free software: you are free  to  change  and  redistribute  it.
       There is NO WARRANTY, to the extent permitted by law.

SEE ALSO
       sleep(3)

       The full documentation for sleep is maintained as a Texinfo manual.  If
       the info and sleep programs are properly installed at  your  site,  the
       command

              info coreutils 'sleep invocation'

       should give you access to the complete manual.

GNU coreutils 6.10               January 2008                         SLEEP(1)
dpetx
Posts: 3
Joined: Sat Mar 20, 2010 3:07 pm

Re: Problem with display.sh ?

Post by dpetx »

It's strange, "sleep 1" is performed exactly in the 1s. Appropriately such as "sleep 5" stops for 5 seconds, I'm confused ... It seems that the command "sleep" is responding properly.
Post Reply