Page 1 of 1

Run a script on B652 with fw 1004.1

Posted: Tue Jan 10, 2012 11:48 am
by nameh
Dear all,

I am completely lost although I read the wiki and the forum.

Let me explain what I would like to do. I have a NAS (WD MyBook) which I have connected to TV via router. I can play files over DLNA, however without the pause/play rw/fw functions. If I want such features I have to enable telnet, connect with Putty start cifs and mount the NAS on USB flash. After this I am able to play any files from NAS as if they would be played from USB Flash disc. This lets me use "advanced" functions (play/pause, fw/rw).
The problem is I have to "play" telnet enabler from Content library, run Putty on computer, type each time the same things again and again...

I came to three possibilities:
1) Make a script which would be run from the TV. The script would contain "insmod phrase" and the "mount phrase". This script would be stored in some TV directory. After running telnet enabler from Content Library, all I would need to do is run the script from Putty. At least this would save a lot of pain as I would not need to type the same all over again. I tried this solution but I cannot run the script ("-sh: ./: Permission denied")
2) make a "game" which would run the script, thus I would not need to run run telnet enabler, putty, etc. I do not know how to do this (and if it is possible).
3) change firmware to some Samygo firmware. I have read a lot but I do not know if I need to downgrade/upgrade my firmware or not. And if to which version. The problem is, I did not find my firmware on the list.

What would you do? What should I do? I do not know much about linux and hacking.

Thanks


The script I made is:

#!/bin/sh
insmod /dtv/usb/sda1/samygo/cifs.ko
mount -o user=admin,password=xxx -t cifs //IP/public /dtv/usb/sda1/files

after I copied the script, I ran chmod 775 t.sh

Re: Run a script on B652 with fw 1004.1

Posted: Tue Jan 17, 2012 12:26 am
by nameh
Nobody here to help me? Please

Re: Run a script on B652 with fw 1004.1

Posted: Tue Jan 17, 2012 8:25 am
by juusso
Add some sleep to let module load. Code should be like this:

Code: Select all

#!/bin/sh
insmod /dtv/usb/sda1/samygo/cifs.ko
sleep 10
mount -o user=admin,password=xxx -t cifs //IP/public /dtv/usb/sda1/files
Dont forget - you cant use Notepad, winword for script editing/creating. Use N++, AkelPad instead. ANd sure chmod 755...

Re: Run a script on B652 with fw 1004.1

Posted: Thu Jan 19, 2012 11:46 pm
by nameh
Thank you very much juuso, I tried it and it works. Perfect! Thank you

Any idea, how to make a "Game" from this script?

Re: Run a script on B652 with fw 1004.1

Posted: Sun Jan 29, 2012 6:44 am
by juusso
Yes. I have. :-)

We use injectso or gdb for that.

Re: Run a script on B652 with fw 1004.1

Posted: Mon Jan 30, 2012 11:55 pm
by nameh
:shock: and :?

I am sorry for dumb questions (I am linux and samygo newbie) but if I understand it well, the injectso puts a script into an executable of the TV and when I start TV, this script is run. Is that so?

If yes, how can I do that? Is it easy or recommended for experienced? Is it safe?
What tools to run, how can I run them?
Can I do that on my TV with the 1004.1 firmware?
Do I have to downgrade/upgrade firmware?

Thanks for help.