Your Digital Media Has Never Looked So Good

 
BoldBelvoir
Topic Author
Posts: 18
Joined: Sat Jul 07, 2007 6:50 am

Can't telnet my SLUG

Sun Nov 11, 2007 9:10 am

Hi guys

Not sure if this is the right section to post in, but here goes..
I recently bought the Linksys NSLU2 in order to run may music without the PC on.

OK, with much help from a friend, we managed to Unsling it and install Firefly.

I set its IP address, hooked it up to my network and Hey! it appears in my 'Network Places' I am able to log in to the Slug's web interface.

The problem is, I can't telnet into the slug to configure it.
If I use hyperterminal I can connct to the IP address, but when I try to type anything, no characters appear on the screen, and as soon as I press enter, the status bar informs me 'Disconnected'.

So I try to telnet in using 'Run'... telnet xxx.xxx.xxx.xxx 80. A console opens, but again I can't see any characters and as soon as I hit 'enter', the window closes.

I have tried this on both my desktop and laptop and results are exactly the same. Now I'm no expert at Telnet or Hyperterminal, so I would think I'm doing something wrong. Can anyone please point me in the right direction?

Regards, Phil.
 
somemightsay
Posts: 14
Joined: Sat Aug 18, 2007 6:10 pm
Location: The States

Sun Nov 11, 2007 7:15 pm

I think you have to go to the management web page for your slug and enable telnet.
 
mas
Posts: 281
Joined: Tue Dec 05, 2006 11:46 am

Tue Nov 13, 2007 3:31 pm

exactly thats what he needs to do. And the next thing you should do is an ipkg install ssh...
Those who sacrifice freedom over safety deserve neither.
 
BoldBelvoir
Topic Author
Posts: 18
Joined: Sat Jul 07, 2007 6:50 am

Wed Nov 14, 2007 5:24 am

OK guys, thanks.

I will try this on my next day off (tomorrow) - I may be back for some more help after that!!

Regards,
 
BoldBelvoir
Topic Author
Posts: 18
Joined: Sat Jul 07, 2007 6:50 am

Thu Nov 15, 2007 5:58 am

OK folks, I feel I am so near, but cannot quite get everything to work!!!! Please help!!

So far: I can get to the web config page of my SLUG and can also telnet into it.
My hard disc appears as HDD_1_1_1

Instructions say to check if Firefly is running by typing:
# ps -ef | grep mt-daapd

I get the return:
602 ttyp0 root 2668 S grep mt-daapd

So I type:
# /opt/etc/init.d/S60mt-daapd

And get return:
Bad mp3 directory (/share/hdd/data/public): No such file or directory
Error reading config file (/opt/etc/mt-daapd/mt-daapd.conf)

I cannot get to the configuration page of Firely by typing http://(IP of my SLUG):3689 to try and change the mp3 folder location, so it seems Firefly won't start because it doesn't know the location of my MP3's, but I cant tell Firefly where they are because I can't log in to the web page, so I'm going round in circles!!!!

Can someone here get me sorted please?

Best regards,

Phil.
 
fizze
Posts: 191
Joined: Wed May 03, 2006 5:46 am
Location: Austria
Contact:

Thu Nov 15, 2007 1:23 pm

Ok, you need to tell it your MP3s are located on the HD on the other USB port. So the location is /share/flash/public iirc.

To tell mt-daapd to look there just edit your mt-daapd.conf.
Now the caveat is that the default unix editor that comes with unslung is VI and thats crap, to put it blunt.
Nevertheless you'll manage to change the path ;)

telnet into the slug
type
vi /opt/etc/mt-daapd/mt-daapd.conf
followed by ENTER.

Now that will launch VI in all its glory. By default, VI is in a read-only mode when you launch it, and while you can navigate the file, you can't actually change anything.

So, scroll down until you see a section called "mp3_dir = /share/hdd/data"

Now, here's a tricky part: hit the i-key to enter the insert/edit mode. Now you can actually edit the file. Make the changes, but notice that the delete key probably might not work, so use backspace.

So, remember, the like should read like
mp3_dir = /share/flash/hdd/public

once you're done.

After that you want to save and quit. This is again very unobvious in VI.
To exit the edit-mode press ESC.
Now enter this:
:wq
followed by ENTER.

the semicolon enters the command-mode, and s is the command for save, while q is the command for quit.
So after you press enter your changes are saved and VI is closed. Voila!

Now try again to fire up mt-daapd and it should work ;)
Soundbridge M1001
de-u/c'd NSLU2 Unslung 6.8 - mt-daapd svn-1696
 
BoldBelvoir
Topic Author
Posts: 18
Joined: Sat Jul 07, 2007 6:50 am

Fri Nov 16, 2007 2:40 am

Thanks for your help. I really appreciate it.

I have stumbled at the first fence!!! As you instructed, I typed:
vi /opt/etc/mt-daapd/mt-daapd.conf

And this was returned...

~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/opt/etc/mt-daapd.conf" line 1 of 1 --100%--

I cannot 'scroll' any further down (or up, for that matter).
 
jtbse
Posts: 229
Joined: Fri Jan 20, 2006 10:45 am
Location: USA East Coast

Fri Nov 16, 2007 7:16 am

fizze wrote:
Now the caveat is that the default unix editor that comes with unslung is VI and thats crap, to put it blunt.


What's wrong with vi fizze? :wink:

Anyway BoldBevoir...looks like your mt-daapd.conf file doesn't exist where it should. vi is trying to create a new file when you try to edit it in the /etc directory.

From the 'nix command line try issuing:

find / -name mt-daapd.conf

to see if you can find the file. You might need to copy to the correct location using a command like:

 cp /<where I found the file>/mt-daapd.conf /etc/mt-daapd.conf
.

Then edit it with vi as fizze suggests. If you can't find the file at all, then possibly something went wrong with your Firefly install??
 
BoldBelvoir
Topic Author
Posts: 18
Joined: Sat Jul 07, 2007 6:50 am

Fri Nov 16, 2007 8:27 am

Ok, guys, I got some progress..

following jtbse's instructions, I then tried to edit in vi and got:

# $Id: mt-daapd.conf 1148 2005-02-15 03:35:19Z rpedde $
#
# This is the mt-daapd config file.
#
# If you have problems or questions with the format of this file,
# direct your questions to rpedde@users.sourceforge.net.
#
# You can also check the website at http://mt-daapd.sourceforge.net,
# as there is a growing documentation library there, peer-supported
# forums and possibly more.
#

#
# web_root (required)
#
# Location of the admin web pages. If you installed from
# ipk, this is correct
#

web_root /opt/share/mt-daapd/admin-root

#
# port (required)
"/opt/etc/mt-daapd/mt-daapd.conf" line 1 of 249 --0%--

But again, I cannot 'scroll' beyond the last line


However, I think Firefly is running now, as when I type:

ps -ef | grep mt-daapd

the SLUG now returns:

547 root 1956 R vi /opt/etc/mt-daapd/mt-daapd.conf
552 ttyp1 root 1040 D grep mt-daapd

However, I still cannot get to the Firefly config page at 192.168.xxx.xxx:3689
 
jtbse
Posts: 229
Joined: Fri Jan 20, 2006 10:45 am
Location: USA East Coast

Fri Nov 16, 2007 9:58 am

Ok...I think you're learning first hand why fizze has such disdain for vi, heh :). Definitely not the easiest editor for someone just trying to learn it for the first time!

First of all...on your "ps -ef|grep"...it's not showing that Firefly is running, but that you still have a vi session running on the slug. We need to get rid of that first. If you can't still see the vi "screen" then kill it with...

kill -9 547


Now try running vi on your mt-daapd.conf file again.

Some basic vi navigation keys:

j = down 1 line
k = up 1 line
l = right 1 character
h = left 1 character
w = right 1 word
b = back 1 word
G = jump to last line
1G = jump to first line
/ = search for a string (forward from current position)
? = search for a string (backward from current position)
:wq = write(save) and quit
:q! = quit without saving (use this if you make a mistake :?)

Ok...now that all of that's out of the way, after you have your conf file opened with vi again, find the line that fizze wants you to modify using this command:

/ mp3_dir =


This should jump you right where you want to be.

Now use the "l" or "w" key to move the cursor to the first character where you want to start changing text (probably the first non-blank after the "=")

Next type c$ (for "change to end of line"). The remaining text on the line should disappear and you should see something like "--Insert--" at the bottom of the display. This means you are in "Insert" mode and can type new text.

Now type in the text you want for the remainder of this line (as fizze gave you before).

When you have the line the way that you want it, hit the Esc key to escape Insert mode.

Now :wq to "write" and "quit".

If you make a mistake or get stuck somewhere, just press Esc a couple of times and :q! to quit and start over.

Then try starting Firefly again.

Good luck! :)

[edit: btw, I see I had an error in my previous post...the normal location for mt-daapd.conf is /opt/etc/mt-daapd/mt-daapd.conf as fizze originally stated, not /etc/mt-daapd.conf as I indicated in my "cp" command example]
 
BoldBelvoir
Topic Author
Posts: 18
Joined: Sat Jul 07, 2007 6:50 am

Fri Nov 16, 2007 11:23 am

Phew!

After several tries, I think I have changed the conf file.
I have changed the path to: /share/flash/hdd/public - saved & quit.

Type in: ps -ef | grep mt-daapd

Returned:
547 root 1956 R vi /opt/etc/mt-daapd/mt-daapd.conf
617 root 1964 R vi /opt/etc/mt-daapd/mt-daapd.conf
622 root 1964 R vi /opt/etc/mt-daapd/mt-daapd.conf
630 root 1952 R vi opt/etc/mt-daapd/mtdaapd.conf
633 root 1964 R vi /opt/etc/mt-daapd/mt-daapd.conf
642 root 1964 R vi /opt/etc/mt-daapd/mt-daapd.conf
658 root 1964 R vi /opt/etc/mt-daapd/mt-daapd.conf
662 ttyp7 root 1040 D grep mt-daapd

Still cannot access web configuration via 192.168.xxx.xxx:3689

Nearly there?

Phil.
 
jtbse
Posts: 229
Joined: Fri Jan 20, 2006 10:45 am
Location: USA East Coast

Fri Nov 16, 2007 11:41 am

BoldBelvoir wrote:
Phew!

Type in: ps -ef | grep mt-daapd

Returned:
547 root 1956 R vi /opt/etc/mt-daapd/mt-daapd.conf
617 root 1964 R vi /opt/etc/mt-daapd/mt-daapd.conf
622 root 1964 R vi /opt/etc/mt-daapd/mt-daapd.conf
630 root 1952 R vi opt/etc/mt-daapd/mtdaapd.conf
633 root 1964 R vi /opt/etc/mt-daapd/mt-daapd.conf
642 root 1964 R vi /opt/etc/mt-daapd/mt-daapd.conf
658 root 1964 R vi /opt/etc/mt-daapd/mt-daapd.conf
662 ttyp7 root 1040 D grep mt-daapd
Still cannot access web configuration via 192.168.xxx.xxx:3689

Nearly there?

Phil.


Almost, but not quite. It looks like you still just have several "vi" processes running (abandoned edit sessions), but not mt-daapd itself.

In your display above, the numbers at the beginning of the lines are process id's (pid's for short). We need to make all of the ones that show "vi /opt/etc/mt-daapd/mt-daapd.conf" go away.

Use a kill command to cancel each of those....for example:

kill -9 547
for the first one,
kill -9 617
for the second one, and so on.

Now when you issue "ps -ef|grep mt-daapd" you should see only the line involving "grep".

So then issue the command

/opt/etc/init.d/S60mt-daapd


To try and start Firefly.

After that your ps -ef|grep command should produce output like

2000 ttyp0   guest      9348   S   /opt/sbin/mt-daapd -c /opt/etc/mt-daapd/mt-daapd.conf 
2004 ttyp0   root       2900   S   grep mt-daapd
 
BoldBelvoir
Topic Author
Posts: 18
Joined: Sat Jul 07, 2007 6:50 am

Fri Nov 16, 2007 12:26 pm

jtbse - Thanks for your patience, I REALLY do appreciate it.

I have killed all the lines as instructed. Now I am getting:

# ps -ef | grep mt-daapd
606 ttyp1 root 2668 S grep mt-daapd

# /opt/etc/init.d/S60mt-daapd
Bad mp3 directory (/share/flash/hdd): No such file or directory
Error reading config file (/opt/etc/mt-daapd/mt-daapd.conf)

Have I changed the mp3 folder location correctly?
My mp3 files are located on hard disk on USB port 1 under a folder called 'music' (i.e. on Widows it would be X:\music\mp3)
 
fizze
Posts: 191
Joined: Wed May 03, 2006 5:46 am
Location: Austria
Contact:

Fri Nov 16, 2007 12:35 pm

Erm, well, if you are really using a NSLU2 thats been unslung to 6.8, then tiese should be the correct paths. Weird.

Ok, you need to follow the instructions we post here more careful. Its really tricky, but the slug is not forgiving any mistakes! ;)

So, changing the path finally worked, but you changed it to the wrong path.
it should read
/share/flash/public/
like I posted before.

Just be patient, you are almost there. You've come a long way!
Oh and besides, I do not despise VI, it's just not exactly a beginner's tool I'd say. :)
Soundbridge M1001
de-u/c'd NSLU2 Unslung 6.8 - mt-daapd svn-1696
 
jtbse
Posts: 229
Joined: Fri Jan 20, 2006 10:45 am
Location: USA East Coast

Fri Nov 16, 2007 12:42 pm

From what you're saying, I think your music is probably in

/share/flash/data/public/music/mp3

To verify this use the find command again:

find / -name mp3


If you find the mp3 directory where I suspect, you should be able to set the value in the mt-daapd.conf file to any of these:

"/share/flash/data/public"
"/share/flash/data/public/music"
"/share/flash/data/public/music/mp3"

[Edit: looks like fizze beat me to the punch. But Fizze, on my nslu2, everything lives under /share/flash/data/public. Is mine not "standard" in some way??]

Who is online

Users browsing this forum: No registered users and 2 guests