Register
Page 1 of 5 12345 LastLast
Results 1 to 15 of 75
  1. #1
    Member
    Join Date
    Dec 2008
    Posts
    91
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default Help Needed (please) with a VERY simple script

    Hi,

    I have my DM800HD set up for use when on the road (Motorhome) using a Netgear MBR624GU Mobile Router and a Huawei E220 Modem.

    It works fine for x amount of time and then it starts to jitter, we seem to have got to the root of the problem in that the Modem drops from HSDPA mode into UMTS because of lack of data (i.e I update the EPG then the jittering stops because the modem goes back to HSDPA Mode).

    I have read of a similar problem that was fixed by writing a very simple script to PING an IP address every x amount of seconds (I think it was every 2 seconds) and this worked.

    My problem is I have no idea how to write or use a script on a DM800. Could someone PLEASE help me by advising in laymans terms how I do it.

    THANKS IN ADVANCE
    Last edited by tipster69; 26th March, 2012 at 10:19 PM.

  2. #2
    Member
    Join Date
    Dec 2008
    Posts
    91
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Hi,

    I have added a one line sript called ping.sh with nothing other than "PING bbc.co.uk" in it.

    I have run the script from the script executor on the remote and whilst it has the desired effect of sending a ping every second, I have no way of leaving it running in the background which is what I need to do.

    PLEASE HELP!

  3. #3
    Member
    Join Date
    Dec 2008
    Posts
    91
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Hi,

    Can anyone help with this? Any script experts about.

    Thanks

  4. #4
    DK Veteran
    Join Date
    Apr 2009
    Posts
    666
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    12
    Thanked in
    12 Posts

    Default

    you need to set up a crontab and script for your image
    a crontab will run the script every 2 seconds

    and ping the ip 173.194.78.94

    thats google

    i will try and make one for you tonight

    what image r u using

  5. #5
    Member
    Join Date
    Dec 2008
    Posts
    91
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Hi Davvo,

    That would be VERY MUCH APPRECIATED, the kids are driving me mad with the Disney Channel Jittering like it is.

    CHEERS

  6. #6
    DK Veteran
    Join Date
    Apr 2009
    Posts
    666
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    12
    Thanked in
    12 Posts

    Default

    files at bottom of page

    ok iv made the script
    it works and setup the crontab on
    Dream Elite BH Phoenix Edition 2

    the crontab will only work in minutes hours days months
    not seconds
    so i got it down to ping google every 1 minute


    here is the script put in usr/script
    name it ping.check.sh give it 755


    Code:
    ping -c 5 173.194.67.94
    if [[ $? != 0 ]]; then
        date '+%Y-%m-%d %H:%M:%S Connection Unavailable' >> /var/log/checkconnection.log
    else
        date '+%Y-%m-%d %H:%M:%S Connection Available' >> /var/log/checkconnection.log
    fi
    make a file in var/log
    called checkconnection.log give it 644

    then if your using dream elite PHOENIX
    go to
    var/etc/bhcron
    make a file called root
    inside root paste this and give it 755

    */1 * * * * /usr/script/ping.check.sh

    then reboot

    go to var/log checkconnection.log

    and you will see that it has pinged google every one minute

    and it will log like this

    2012-03-27 14:36:05 Connection Available
    2012-03-27 14:37:05 Connection Available
    2012-03-27 14:38:05 Connection Available
    2012-03-27 14:39:05 Connection Available
    2012-03-27 14:40:05 Connection Available
    2012-03-27 14:41:05 Connection Available
    2012-03-27 14:42:05 Connection Available
    2012-03-27 14:43:05 Connection Available
    2012-03-27 14:44:05 Connection Available

    to make it easy
    iv also posted all 3 files here
    just put in right places give chmod rights as above






    Attached Files Attached Files
    Last edited by davvo; 27th March, 2012 at 05:23 PM.

  7. #7
    Member
    Join Date
    Dec 2008
    Posts
    91
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Hi,

    MANY THANKS for taking the time out to do this for me it really is VERY MUCH APPRECIATED.

    I will do this now.

    Out of interest, if pinging once every minute is not enough for it to work. Is there an other option of me adding no timer to the ping, i.e it just pings constantly (i.e like every second). I have read of another person having success doing it this way.

    THANKS AGAIN for your help.

  8. #8
    DK Veteran
    Join Date
    Apr 2009
    Posts
    666
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    12
    Thanked in
    12 Posts

    Default

    if 1 minute is not enough

    i could try and make a while bash loop script

    but give the 1 minute crontab a go first

  9. #9
    Member
    Join Date
    Dec 2008
    Posts
    91
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Hi,

    It is just rebooting now, gonna try it on my 3G Dongle in the house now.

    THANKS

  10. #10
    Member
    Join Date
    Dec 2008
    Posts
    91
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Hi Davvo,

    I have the script running now (I have checked the log file it is definitely running).

    Unfortunately, the once a minute mustn't be enough to keep the modem in HSDPA Mode as it is still jittering.

    Ideally if there was a variable (or just a number that I knew was timing related) I could edit to find the timing that would work best with it, that would be great.

    Any further help would also be great.

    CHEERS

    EDIT: Is the -c for the number of pings it sends? If so could I increase this to keep pinging xx amount of times per minute?

    EDIT 2: Changed the count to 20, it is definitely having some effect, as it doesn't glitch nearly as much -DAVVO, I OWE YOU A DRINK MATE, THIS WAS VERY KIND OF YOU - CHEERS
    Last edited by tipster69; 27th March, 2012 at 08:40 PM.

  11. #11
    DK Veteran
    Join Date
    Apr 2009
    Posts
    666
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    12
    Thanked in
    12 Posts

    Default

    file is at bottom of page

    this will ping google every 1 second

    keep all the 3 files you had before

    now place this in usr/script
    and name it every-1-seconds.sh give it 755

    Code:
    while true
    do
     /usr/script/ping.check.sh
     sleep 1 then
     echo "ping google 1 sec OK!" >> /var/log/checkconnection.log
    
     done
    start dcc telnet and paste this in

    /usr/script/every-1-seconds.sh

    that will start the loop script

    press CTRL+C to stop

    check the log in
    var/log checkconnection.log


    i cant get nohup to run the script
    so you will have to start it this way
    Attached Files Attached Files
    Last edited by davvo; 27th March, 2012 at 08:53 PM.

  12. #12
    Member
    Join Date
    Dec 2008
    Posts
    91
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Hi,

    Thanks again for going out of your way to help. I know I keep repeating myself, but it is genuinely mega appreciated.

    CHEERS MATE.

  13. #13
    Member
    Join Date
    Dec 2008
    Posts
    91
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Hi,

    With regards to how I would start this script, does this mean I need to access the box via PC to start it? Because it will be used whilst away in the Motorhome I wouldn't normally have a PC to access the box.

    I am unsure if I understand this correctly, though I am sure there is a way around it perhaps via my iphone or ipad?

    Cheers
    Last edited by tipster69; 27th March, 2012 at 09:24 PM.

  14. #14
    DK Veteran
    Join Date
    Apr 2009
    Posts
    666
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    12
    Thanked in
    12 Posts

    Default

    the 1 sec script yes you will need to start it by pc
    unless i can get it to run at boot
    as the crontab that normally starts is stuck at 1 min

    the ping.check.sh script change the -c 5 to -c 60
    and see if it pings more

    did you try the 1 sec script and did it stop the jittering
    Last edited by davvo; 27th March, 2012 at 09:32 PM.

  15. #15
    Member
    Join Date
    Dec 2008
    Posts
    91
    Thanks Thanks Given 
    1
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts

    Default

    Hi Davvo,

    I have been having a play with the -c and currently at -c 35 it is working very very well with only a little jittering (watchable and a 100x times better than before, which is why I am eternally grateful for your help).

    Out of interest, I am using my PC now to test this, but I am thinking when out in the field I may want to edit your script to fine tune it to suit the situation. Is there a plugin that will allow me to edit your script via the remote control rather than via ftp?

    Cheers

    edit: Just when I think it is sussed the bugger starts jittering again though I am hoping it could be down to a poor signal as it as been much better since using your script
    Last edited by tipster69; 27th March, 2012 at 09:40 PM.

 

 
Page 1 of 5 12345 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.