Mar 10, 2008

Setup ME1 as a BT downloader

Note : There is an upate post which let you set ME1 as BT downloader, Samba Server, GMedia Server and SSH with couple steps only.
http://emprex-me1.blogspot.com/2008/06/easy-way-to-enable-samba-server.html


There are people out there are trying to build more APs for ME1, I think BT downloader and Samba Server are the most useful. This post is base on their contributions to help more users easier to build APs.

It's quiet easy to setup ME1 as BT downloader, the performacnec is considering good and power saving. After BT download you could just play it back directly by ME1, no need to transfer file. And even better part is that you can copy files over LAN, not just steaming. Have ever, there are risks, for example ME1 might won't boot up again and you would need to remove all partitions and re-initial hard disk again, all data will be lost.
You could download Debian 1.0 from bellow link, it would require to unzip .gz under Linux :
Part1: http://www.uploading.com/files/9VWJTFII/bcm47xx_debian_v1.0.part1.exe.html
Part2: http://www.uploading.com/files/DZX1G806/bcm47xx_debian_v1.0.part2.rar.html
Pwassword : orz101.com

Or you could download Ext2 from
http://cid-09ea019cecf560ad.skydrive.live.com/self.aspx/Set%20up%20ME1%20as%20a%20BT%20dwonloader
{There are 11 rar files}{The provided image will create 4G space, you could create your own if needed and know how to.}

I find the easiest way is to download Ext2 and follow the bellow processes. Here are the steps :
Unzip downloaded file to ME1's FAT32 partition through USB connection. {Make sure there are 4GB space available}
Disconnect USB connection and boot up ME1, make sure time is set at present and LAN is connected.
In Windows, go to the Start menu, select Run,at the command line, type "telnet 192.168.1.3" {Assume ME1's IP address is 192.168.1.3}
Venus login : root {Type "root" for login}
/ # cd /usr/local/etc/hdd/volumes/HDD1/
/usr/local/etc/hdd/volumes/HDD1 # mkdir chroot
/usr/local/etc/hdd/volumes/HDD1 # mount -o loop -w ./debin-4g.ext2 ./chroot
/usr/local/etc/hdd/volumes/HDD1 # chroot ./chroot
sh-3.1# mount -t proc proc /proc
sh-3.1# mount /dev/hda1 /mnt/hda
sh-3.1# apt-get update
sh-3.1# apt-get install mldonkey-server
...
...
After unpacking 10.9MB of additional disk space will be used.Do you want to continue [Y/n]? y {type "y" to continue}
...
...
Launch MLDonkey at startup ? {Select Yes to enable it at startup}MLDonkey directory : {Just press Enter to accept default}
...
...
Maximal download speed :{Just press Enter to accept default}
...
...
Password of admin user: {Type in password}
Retype Password of admin user: {Type in password again}
...
...
sh-3.1# /etc/init.d/mldonkey-server stop
sh-3.1# vim /var/lib/mldonkey/downloads.ini
{find 'allowed_ips = ["127.0.0.1";]' and rewrite it as 'allowed_ips = ["192.168.1.0/24";]',assume ME1 and PC IP is in range of 192.168.1.X (X=1~254)}
sh-3.1# /etc/init.d/mldonkey-server start
{If MLdonkey doesn't work, you can check /var/lib/mldonkey/mlnet.log for detail message}
Now you could use IE and type "http://x.x.x.x:4080/ (x.x.x.x is ME1's IP address)click Servers -> Import Server.met ( use google find sever.met and copy and paste link adress )

PS : Sancho is a good GUI connects to MLDonkey core application. (http://sancho-gui.sourceforge.net/download.phtml)

If you would like to set ME1 as a samba sever, execute the bellow command :
sh-3.1# apt-get install samba
sh-3.1# mv /etc/samba/smb.conf{,.bk}
sh-3.1# /etc/init.d/samba stop
sh-3.1# vim /etc/samba/smb.conf {Modify smb.conf as bellow}
*******
[global]
workgroup = workgroup
netbios name = ME1
server string = server
include = /etc/samba/dhcp.conf
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 50 syslog = 0
guest account = root
security = share
encrypt passwords = false
[ME1 share]
comment = mldonkey download folder
path = /var/lib/mldonkey/incoming
read only = no
public = yes
[ME1 HDD]
comment = the fat32 partition of HDD
path = /mnt/hda
read only = no
public = yes
***********

sh-3.1# /etc/init.d/samba start {Start Samba server}{After Samba server is active, type "file://x.x.x.x/" to access ME1' FAT32 partition}

Have fun !

33 comments:

Anonymous said...

Have tried this step by step and it does not work even after correcting this line
sh-3.1# mount -t proc proc /procsh-3.1# mount /dev/hda1 /mnt/hda

Anonymous said...

Works for me.
Any error message while doing the process ?

Jamie Ross said...

i cant make heads or tails of this would love to do it but i just dont understand all this code. i got started by logging into telnet but anytime i type a line it says permission denied plus i dont understand what im typing any1 wanna write this process in layman terms ?? like im really stupid :)

Anonymous said...

Error with apt-get update
W: CPG error: http://non-us.debian.org stable/non-US Release: The following signature couldn't be verified because the public key is not avabilable NO_PUBKEY P1D53D8C4F368D5D
W: you may want to run apt-get update to correct these problems.
tried next step to install seems to install but just goes to prompt no yes no questions

Anonymous said...

That error can be ignored.
Try type "ml" then Tab key to check if there is mlnet has installed already. If there is mlnet that mean MLdonkey is installed. Just go through from login to "sh-3.1# mount /dev/hda1 /mnt/hda" command then you will have MLdonkey enabled.

Anonymous said...

jayjay1980
In answer to your post, I would assume that from you are typing the commands in wrong ie.
from the second line of code in tutorial you are probably typing

/usr/local/etc/hdd/volumes/HDD1 # mkdir chroot

when ifact you should be typing
just the section of code just after the # eg.

mkdir chroot

The same appies to all the commands typed in the dos box
hope this helps

Anonymous said...

Hey, Thank you for this interesting information. And i have got it working, sort of.

My problem is that after rebooting it stops working. I cannot acces through the browser or sancho.

What have I missed? And what could i try to make the Daemon running at boot?

Thanks in advance

Anonymous said...

Anyone know how to get pure-ftpd to work on this package I seem to get it to install but when trying to logon it saya authorisation failed after the user ok password required
Thanx

Jamie Ross said...

when i login with root it says 'warning: cannot change to home directory' why is this??? also when i start to type the info eg mkdir chroot..it says cannot create directory 'chroot':read only file system?????

Jamie

Anonymous said...

There are only some folders writeable, so plz check the folder where you are by pwd command.

Anonymous said...

When you install Mldonkey, it will asking you if you could like to "Launch MLDonkey at startup ?", if you answer Y then it should startup auto. However, if you didn't shut it down proerply, it will have problem to restart it again. You could need to do the bellow to enable it again.

*************************
Venus login: root
warning: cannot change to home directory


BusyBox v1.1.3 (2007.09.04-07:27+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

/ # cd /usr/local/etc/hdd/volumes/HDD1/
/usr/local/etc/hdd/volumes/HDD1 # mount -o loop -w ./debin-4g.ext2 ./chroot
/usr/local/etc/hdd/volumes/HDD1 # chroot ./chroot
sh-3.1# mount -t proc proc /proc
sh-3.1# mount /dev/hda1 /mnt/hda
sh-3.1# /etc/init.d/mldonkey-server start
Starting MLDonkey: mlnet file[s] should no exist: /var/lib/mldonkey/mlnet.pid -- delete it first
sh-3.1# rm /var/lib/mldonkey/mlnet.pid
sh-3.1# /etc/init.d/mldonkey-server start
Starting MLDonkey: mlnet.
*********************************

Anonymous said...

Nice Work. Thanks a lot. Until today, I just used the Emule program. So I still have one or two Questions.

1. Do I have to open some ports at my router? Like the tcp and the udp? Where are these ports defined?

2. Which files will be shared by me? Everything in the multimedia partition, or ist there something like a incoming folder?

3. Do you know have any configuration hints to give me a good download rate?

Thx

Anonymous said...

Thank you again for the explaination about how to autostart :) thank you.

Have you got an idea how to make the player play mp3 songs via the commandline? I would love an HTML interface to start mp3 playback (with playlists etc etc ;)

Also i took the liberty to copy and paste this tip to another forum

http://moviecube.xooit.fr/t136-Another-Torrent-application-that-works-with-Sancho.htm

We have an extensive tweaking guide that might be interesting for others.

You are free to copy whatever you wish from my topics to post here :)

Anonymous said...

there is a wiki now for RTD 1261 based players, please join and help me

http://rtd1261.wikidot.com/

Anonymous said...

hi, i just have one or two questions...

if i just want to install the samba application, i need do install debian, or i can just download samba package and install it? if so, can anyone tell me where to find the smallest package to install (with just that application).

the problem you say that may happen where ME1 might not boot up again and we need to remove all partitions and re-initial hard disk again, use to be frequent? does it happen with samba or just with the BT downloader?

thanks

Anonymous said...

Is it possible to autostart samba or mldonkey just after power on the ME1 ???

Anonymous said...

I just installed the plain samba server (without torrent) using the debian file and guide from the original post.

Ive written a startup script which will initialise the server each time you start the ME1.
Saves logging in a chrooting.

this is my script named ME1_init_deb.sh
-------
sleep 30
mount -o loop -w /usr/local/etc/hdd/volumes/HDD1/debian.ext2 /usr/local/etc/hdd/volumes/HDD1/chroot
chroot /usr/local/etc/hdd/volumes/HDD1/chroot mount -t proc proc /proc
chroot /usr/local/etc/hdd/volumes/HDD1/chroot mount /mnt/hda
chroot /usr/local/etc/hdd/volumes/HDD1/chroot /etc/init.d/samba start
exit
-------

I added the hard disk mount info to the debian /etc/fstab to allow it to mount semi automatically.

save that in /usr/local/etc
and edit the /usr/local/etc/rcS to launch the script on startup, that will then allow auto starting of the samba server (and torrent if you add it into the script)

Anonymous said...

Yeah you do need to install debian for the samba server, theres no way to build samba on the ME1 or to place it properly.

Ive written a guide with an auto starting script which initialises the debian each time you boot:
http://rtd1261.wikidot.com/forum/t-51556/autostart-of-samba-on-me1-install-guide

Anonymous said...

Found this on RTD1261 wiki
http://rtd1261.wikidot.com/forum/t-51556/autostart-of-samba-on-me1-install-guide#post-139102

Excelent samba step by step guide to autostart samba on ME1 boot by
danwood76

Anonymous said...

Hi folks,

I sucessfuly setup samba server.
Works fine, howeve only to power down. How to modify inicjalization script?

regards,

Anonymous said...

Check out my complete guide on wikidot.
http://rtd1261.wikidot.com/tweaking-the-official-firmware#toc13

step by step with copy and pastable instructions.

any qs ask them on the forum at wikidot!

regards,
danwood76

Anonymous said...

Hi!
Have tried to setup, but when performing the command mount -w ./debin-4g.
ext2 ./chroot
I get the error message
mount: Mounting /dev/loop/0 on ./chroot failed: Invalid argument

I don't have a Me1, but the same kernel and busybox (Ellion HMR-700a)

Regards,
Peter

Anonymous said...

Hi!
I have a similar system and tried your guide; I get the following error:
mount -w ./debin-4g.
ext2 ./chroot
mount: Mounting /dev/loop/0 on ./chroot failed: Invalid argument

Do you have any idea???
Regards,
Peter

Anonymous said...

A youtube player app would be a good send!!!!!!

Jamie Ross said...

For those of you that recieve the error W: GPG error: http://non-us.debian.org stable/non-US Release: ...etc

Check out this forum posting http://forums.debian.net/viewtopic.php?t=4762
Its not what we wanna do, but the same principals apply :)

Jamie

Anonymous said...

@peter

The line
'mount -w ./debin-4g.
ext2 ./chroot'

is all on one line but also it may help to add the loop command:

mount -o loop -w ./debin-4g.ext2 ./chroot

Anonymous said...

Hi,
everythind works fine in my case (ME1, aftrer reseting samba everything works) until leaving debian environment. until then, disk is accesible. after completing the tutorial, when trying to open the ME1 disk from PC, have warning like this: unable to access, volume may be unaccessible or you don't have permision to access the volume (free translation from polish).
any idea, what is the reason?

Anonymous said...

Hi,
everythind works fine in my case (ME1, aftrer reseting samba everything works) until leaving debian environment. until then, disk is accesible. after completing the tutorial, when trying to open the ME1 disk from PC, have warning like this: unable to access, volume may be unaccessible or you don't have permision to access the volume (free translation from polish).
any idea, what is the reason?

Karthik said...
This comment has been removed by the author.
Anonymous said...

Hi
atlast i Have installed successfully

tks for above posts but i am unable to connect from Sancho could you please help to shortit out
cheers
karthik

Anonymous said...

with new version of firmware:
mount -o loop -w ./debin-4g.ext2 ./chroot
gives error:
mount: Mounting /dev/loop/0 on ./chroot failed: Invalid argument

any linux gurus able to troubleshoot this?

Anonymous said...

further to my previous post -

"with new version of firmware:
mount -o loop -w ./debin-4g.ext2 ./chroot
gives error:
mount: Mounting /dev/loop/0 on ./chroot failed: Invalid argument"

it appears emprex have removed ext2 filesystem (/proc/filesystems only lists ext3). To work around this convert the debin-4g.ext2 filesystem to ext3 using the tune2fs command (this only needs to be done once):
cd /usr/local/etc/hdd/volumes/HDD1
tune2fs -j ./debin-4g.ext2
then mount as before. The filesystem should now be automatically detected as ext3 (I renamed the file to debin-4g.ext3 but I don't think this is really necessary).

This may help people on similar systems who were getting the same error - check /proc/filesystems to see whether ext2 is listed.

Unknown said...

Not sure why but I had to specific the size of the journal before this would work...

tune2fs -j -J size=1 root_fs_mipsel.ext2