Add Telnet Command To Box Start Up

Dreambox information exchange on the best dreambox software images and help with all other operational problems with your Dreambox. The ultimate Dreambox satellite TV support forum.


Reply
 
LinkBack Thread Tools Display Modes
Old 18-04-2008   #1
Dreambox Gimp & Coder
 
B16MCC's Avatar
 
Join Date: 16-11-2005
Location: /var/tuxbox/config
Posts: 925
Thanks: 69
Thanked 510 Times in 227 Posts
Blog Entries: 13

My System: 2 Dreamboxes ------ DM 8000 HD PVR ------- ---------- DM 800 HD ---------- -------- Motek SG2100 -------- ---- Triax 80cm Dual LNB ----- -- Fixed Dish 28e Quad LNB -- ---------- Sky HD Full ---------- ------- 24" Apple iMAC --------


Creator of the CCCCC - only a true wizard could come up with such a name!!
Wink Add Telnet Command To Box Start Up

Hi peeps. Having 2 DM's I have my remote control programmed to control one DM on the Dream button and the other DM on the Shift Dream button ( AUX Mode).

To coinside with this I have to telnet the following commands to my boxes to ensure they only respond to the correct commands from the one remote.

Box 1 echo 1 > /proc/stb/ir/rc/mask0 (box responds to dream only)
Box 2 echo 2 > /proc/stb/ir/rc/mask0 (box responds to shift-dream only)

Without these commands the boxes repsond to both remote channels.

My question is , how would I add that command so its executed when the box powers up. This would save me from having to telnet in and set them manually if I reboot a box.

Thanks gang..
MCC
B16MCC is offline   Reply With Quote
Old 18-04-2008   #2
Super Moderator
 
mhku's Avatar
 
Join Date: 08-03-2005
Location: J6 M5
Posts: 4541
Thanks: 11
Thanked 180 Times in 169 Posts
Blog Entries: 1

My System: DM7020S ~ DM500s ~ sg2100 ~ Gemini


If he were not a wizard, from head down to the root, you would have got to worry-your DB only boots

You can create a shell script and put it in /var/etc/init.d (I think that's the startup folder).

Use a UNIX compatible editor as you don't want any Windows/ DOS characters in it (especially carriage returns).

Code:
#!/bin/sh
echo 1 > /proc/stb/ir/rc/mask0
echo 2 > /proc/stb/ir/rc/mask0
You can add logging to it as well. I've not tested it so the folder may be wrong; usually in Linux you'd add scripts to a user's folder that fire when the user logs in.

_http://www.net42.co.uk/satellite/dreambox-hints.html


You don't stop playing because you get old, you get old because you stop playing. Regras
Before posting in the Dreambox section please ensure you've read The Guide


Information is for educational purposes only


Last edited by mhku; 18-04-2008 at 12:01 PM.
mhku is offline   Reply With Quote
Old 18-04-2008   #3
Dreambox Gimp & Coder
 
B16MCC's Avatar
 
Join Date: 16-11-2005
Location: /var/tuxbox/config
Posts: 925
Thanks: 69
Thanked 510 Times in 227 Posts
Blog Entries: 13

My System: 2 Dreamboxes ------ DM 8000 HD PVR ------- ---------- DM 800 HD ---------- -------- Motek SG2100 -------- ---- Triax 80cm Dual LNB ----- -- Fixed Dish 28e Quad LNB -- ---------- Sky HD Full ---------- ------- 24" Apple iMAC --------


Creator of the CCCCC - only a true wizard could come up with such a name!!

Thanks for the info , much appreciated. I use an IMAC running Leopard, so hopefully I should be ok with the standard text editor.

I'll have a play around and see how I go.
Thanks again.
MCC
B16MCC is offline   Reply With Quote
Old 18-04-2008   #4
Super Moderator
 
mhku's Avatar
 
Join Date: 08-03-2005
Location: J6 M5
Posts: 4541
Thanks: 11
Thanked 180 Times in 169 Posts
Blog Entries: 1

My System: DM7020S ~ DM500s ~ sg2100 ~ Gemini


If he were not a wizard, from head down to the root, you would have got to worry-your DB only boots

You can also telnet into the Dreambox and create the file with the built-in editor (I think there's one, hopefully not VI).


You don't stop playing because you get old, you get old because you stop playing. Regras
Before posting in the Dreambox section please ensure you've read The Guide


Information is for educational purposes only

mhku is offline   Reply With Quote
Old 21-04-2008   #5
Dreambox Gimp & Coder
 
B16MCC's Avatar
 
Join Date: 16-11-2005
Location: /var/tuxbox/config
Posts: 925
Thanks: 69
Thanked 510 Times in 227 Posts
Blog Entries: 13

My System: 2 Dreamboxes ------ DM 8000 HD PVR ------- ---------- DM 800 HD ---------- -------- Motek SG2100 -------- ---- Triax 80cm Dual LNB ----- -- Fixed Dish 28e Quad LNB -- ---------- Sky HD Full ---------- ------- 24" Apple iMAC --------


Creator of the CCCCC - only a true wizard could come up with such a name!!

ok so I tried your info. I made a file called remote and put it in /usr/etc/init.d

It did not have the desired effect on reboot. Should the file have a specific name at all ? Does it get executed simply because its in that folder ?

I basically wrote :-

#!/bin/sh
echo 2 > /proc/stb/ir/rc/mask0

and saved it in a file called remote in the init.d folder
Rebooted, it seems the command was not executed. The box responded to both remote channels rather than the expected channel 2 only(AUX)

Any further tips please mate ?
Cheers
MCC
B16MCC is offline   Reply With Quote
Old 21-04-2008   #6
Super Moderator
 
mhku's Avatar
 
Join Date: 08-03-2005
Location: J6 M5
Posts: 4541
Thanks: 11
Thanked 180 Times in 169 Posts
Blog Entries: 1

My System: DM7020S ~ DM500s ~ sg2100 ~ Gemini


If he were not a wizard, from head down to the root, you would have got to worry-your DB only boots

I had a play over the weekend but couldn't find the file that is executed on boot up.

On a 500 a file called init in /etc will be executed on bootup (you may need to create it). I tried it with a 7020 but it didn't work.

It may be initab but I didn't have time to test it


You don't stop playing because you get old, you get old because you stop playing. Regras
Before posting in the Dreambox section please ensure you've read The Guide


Information is for educational purposes only

mhku is offline   Reply With Quote
Old 15-05-2008   #7
Dreambox Gimp & Coder
 
B16MCC's Avatar
 
Join Date: 16-11-2005
Location: /var/tuxbox/config
Posts: 925
Thanks: 69
Thanked 510 Times in 227 Posts
Blog Entries: 13

My System: 2 Dreamboxes ------ DM 8000 HD PVR ------- ---------- DM 800 HD ---------- -------- Motek SG2100 -------- ---- Triax 80cm Dual LNB ----- -- Fixed Dish 28e Quad LNB -- ---------- Sky HD Full ---------- ------- 24" Apple iMAC --------


Creator of the CCCCC - only a true wizard could come up with such a name!!

Not tried this yet, gonna try it when I get home tonight. I believe I need to edit this file :- /etc/init.d/bootup

I need to insert my telnet command at the end of this file. Please bare in mind this folder structure will be different in enigma 1 images.
B16MCC is offline   Reply With Quote
Old 16-05-2008   #8
Super Moderator
 
mhku's Avatar
 
Join Date: 08-03-2005
Location: J6 M5
Posts: 4541
Thanks: 11
Thanked 180 Times in 169 Posts
Blog Entries: 1

My System: DM7020S ~ DM500s ~ sg2100 ~ Gemini


If he were not a wizard, from head down to the root, you would have got to worry-your DB only boots

Backup the file before editing but you should be OK.


You don't stop playing because you get old, you get old because you stop playing. Regras
Before posting in the Dreambox section please ensure you've read The Guide


Information is for educational purposes only

mhku is offline   Reply With Quote
Old 16-05-2008   #9
Dreambox Gimp & Coder
 
B16MCC's Avatar
 
Join Date: 16-11-2005
Location: /var/tuxbox/config
Posts: 925
Thanks: 69
Thanked 510 Times in 227 Posts
Blog Entries: 13

My System: 2 Dreamboxes ------ DM 8000 HD PVR ------- ---------- DM 800 HD ---------- -------- Motek SG2100 -------- ---- Triax 80cm Dual LNB ----- -- Fixed Dish 28e Quad LNB -- ---------- Sky HD Full ---------- ------- 24" Apple iMAC --------


Creator of the CCCCC - only a true wizard could come up with such a name!!

Well, tried adding my command to that file, it doesn't work ! I still have to telnet the command manually after a reboot. The quest continues....
B16MCC is offline   Reply With Quote
Old 22-05-2008   #10
Specialist Contributor
 
compufunk's Avatar
 
Join Date: 07-05-2008
Location: NW, Ireland
Posts: 1405
Thanks: 126
Thanked 233 Times in 200 Posts

My System: DM 600-S, AB IPBox 9000HD, Moteck SG2100, Fracarro Penta 85 dish, + some puters
A little late on this.

If you haven't gotten that working yet.

It wont run unless the file is marked as executable so you'll need to change file permissions.
644 should become 744, you may even want to change it to 777 (executable by everyone).

I'm not sure what the correct directory is on a DB, on debian systems its /etc/init.d/

Code:
chmod 777 /etc/init.d/YourFileName
The above should do it, (change the directory and filename to suit your setup)
compufunk is offline   Reply With Quote
Old 22-05-2008   #11
Dreambox Gimp & Coder
 
B16MCC's Avatar
 
Join Date: 16-11-2005
Location: /var/tuxbox/config
Posts: 925
Thanks: 69
Thanked 510 Times in 227 Posts
Blog Entries: 13

My System: 2 Dreamboxes ------ DM 8000 HD PVR ------- ---------- DM 800 HD ---------- -------- Motek SG2100 -------- ---- Triax 80cm Dual LNB ----- -- Fixed Dish 28e Quad LNB -- ---------- Sky HD Full ---------- ------- 24" Apple iMAC --------


Creator of the CCCCC - only a true wizard could come up with such a name!!

Thanks for that , I'll check it out. However , seeing as I'm editing a file that is supposed to be already executed on start up, shouldn't it be ok as it is ?
B16MCC is offline   Reply With Quote
Old 22-05-2008   #12
Specialist Contributor
 
compufunk's Avatar
 
Join Date: 07-05-2008
Location: NW, Ireland
Posts: 1405
Thanks: 126
Thanked 233 Times in 200 Posts

My System: DM 600-S, AB IPBox 9000HD, Moteck SG2100, Fracarro Penta 85 dish, + some puters

Im not sure about the file you mentioned "/etc/init.d/bootup".

I haven't checked it out on my DB yet, but any other Linux based system I've used I have always placed a new file in a folder called /etc/init.d or similar and it works well.

You could also try to find one of the startup files for services that start at boot like little apache and add the required files to its startup file.
compufunk is offline   Reply With Quote
Old 22-05-2008   #13
Specialist Contributor
 
compufunk's Avatar
 
Join Date: 07-05-2008
Location: NW, Ireland
Posts: 1405
Thanks: 126
Thanked 233 Times in 200 Posts

My System: DM 600-S, AB IPBox 9000HD, Moteck SG2100, Fracarro Penta 85 dish, + some puters

Test the script too make sure it works before you add it to any startup folders or cron job.

To do this just type the full path and filename at the command line. e.g.

Code:
/root/StartupScript
If the script is correct and the permissions are set to execute then your remote should be functioning as you want it to at this point.
compufunk is offline   Reply With Quote
Old 22-05-2008   #14
Dreambox Gimp & Coder
 
B16MCC's Avatar
 
Join Date: 16-11-2005
Location: /var/tuxbox/config
Posts: 925
Thanks: 69
Thanked 510 Times in 227 Posts
Blog Entries: 13

My System: 2 Dreamboxes ------ DM 8000 HD PVR ------- ---------- DM 800 HD ---------- -------- Motek SG2100 -------- ---- Triax 80cm Dual LNB ----- -- Fixed Dish 28e Quad LNB -- ---------- Sky HD Full ---------- ------- 24" Apple iMAC --------


Creator of the CCCCC - only a true wizard could come up with such a name!!

I checked the file in question and it was already set to 755. I set it to 777 anyway but it still doesn't run my telnet command.

I was told to use this file specifically on the IHAD forums. I'd have thought the guys over there would know these things. So I have no idea if I'm doing something wrong , or possibly the boot sequence is undoing my command later in the sequence perhaps.

The search continues.....

Last edited by B16MCC; 22-05-2008 at 06:56 PM.
B16MCC is offline   Reply With Quote
Old 23-05-2008   #15
Super Moderator
 
mhku's Avatar
 
Join Date: 08-03-2005
Location: J6 M5
Posts: 4541
Thanks: 11
Thanked 180 Times in 169 Posts
Blog Entries: 1

My System: DM7020S ~ DM500s ~ sg2100 ~ Gemini


If he were not a wizard, from head down to the root, you would have got to worry-your DB only boots

/etc/init.d/bootup - did you try a simple test line such as writing a to a text file in /tmp ?


You don't stop playing because you get old, you get old because you stop playing. Regras
Before posting in the Dreambox section please ensure you've read The Guide


Information is for educational purposes only

mhku is offline   Reply With Quote
Old 23-05-2008   #16
Specialist Contributor
 
compufunk's Avatar
 
Join Date: 07-05-2008
Location: NW, Ireland
Posts: 1405
Thanks: 126
Thanked 233 Times in 200 Posts

My System: DM 600-S, AB IPBox 9000HD, Moteck SG2100, Fracarro Penta 85 dish, + some puters

Hi,
I managaed to get a script to run at startup last night, You were right to look at /etc/init.d/bootup.

I didnt try the command you are trying to get working, I just tested with some other commands. For the sake of tidiness i created a new file to run the commands I wanted then added the path to that file in /etc/init.d/bootup. This is cleaner because you only have one line added to the /etc/init.d/bootup file and you can modify the newly created file to do whatever you want at a later stage.

Make a backup of /etc/init.d/bootup

Create a new file to run your commands.
Code:
touch /home/root/boot_script
Add a few lines to the file using your favourite application.
I used the following.

Code:
echo "this file was created at boot time on " >  /tmp/boot_script_output
 date >> /tmp/boot_script_output
Set the executable bit on the file.
Code:
chmod 755 /home/root/boot_script
Add the path to the script to a new line in /etc/init.d/bootup.
Code:
echo /home/root/boot_script >> /etc/init.d/bootup
Reboot the dreambox.

When the box has rebooted you should find a file called boot_script_output in the /tmp directory. Open it up, it should read something like
Code:
this file was created at boot time on 
 Fri May 23 11:04:14 IST 2008
Add your own commands to the /home/root/boot_script file. If you are still having trouble I would suggest you redirect the output of your commands to a file. That way you can see any errors that were generated e.g.
Code:
 YourCommand >> /tmp/boot_script_output
To make sure your settings are not being overridden by something else in the boot sequence, just execute the script manually by typing the file path in at the command prompt. .

Code:
/home/root/boot_script
If running the script manually doesn't work then its not going to at boot.

Hope this helps.

Last edited by compufunk; 23-05-2008 at 07:15 PM.
compufunk is offline   Reply With Quote
Old 23-05-2008   #17
Specialist Contributor
 
compufunk's Avatar
 
Join Date: 07-05-2008
Location: NW, Ireland
Posts: 1405
Thanks: 126
Thanked 233 Times in 200 Posts

My System: DM 600-S, AB IPBox 9000HD, Moteck SG2100, Fracarro Penta 85 dish, + some puters

I've just noticed, there are some double spaces in the code snippets above, If anyone is copying them, remove any double spaces to avoid problems.
compufunk is offline   Reply With Quote
Old 17-06-2008   #18
Specialist Contributor
 
compufunk's Avatar
 
Join Date: 07-05-2008
Location: NW, Ireland
Posts: 1405
Thanks: 126
Thanked 233 Times in 200 Posts

My System: DM 600-S, AB IPBox 9000HD, Moteck SG2100, Fracarro Penta 85 dish, + some puters

Any luck with this B16MCC ?
compufunk is offline   Reply With Quote
Old 20-06-2008   #19
Specialist Contributor
 
BonceChops's Avatar
 
Join Date: 27-04-2004
Location: NW England
Posts: 259
Thanks: 4
Thanked 14 Times in 7 Posts

My System: Dreambox 500, Dreambox 600PVR, Dreambox 7025+, Dreambox 7000, 1m dish on a Moteck SG2100

Originally Posted by compufunk View Post
Any luck with this B16MCC ?
It looks like he has changed his older 7025 for a 800s. He might be trying to work out how the remote works on the 800 now
BonceChops is offline   Reply With Quote
Reply

Bookmarks

Tags
add, box, command, start, telnet


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off







All times are GMT +1. The time now is 02:53 AM.


All views and information expressed in users' communications and profiles represent the opinions of the users concerned and do not represent the views of Satellites.co.uk. All images and news content are believed to be in the public domain, except where otherwise stated. Forum software by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Content Relevant URLs by vBSEO 3.3.1