Page 2 of 4

Re: Tv unable to find Xtreamer NAS!! Need Help!!!!!!!

Posted: Tue Feb 21, 2012 5:28 pm
by brunogts77
thanks for the quick response. Look, I can edit the file samba.init, the problem is what to do to add the IP address of my NAS?

Re: Tv unable to find Xtreamer NAS!! Need Help!!!!!!!

Posted: Tue Feb 21, 2012 5:52 pm
by juusso
For example your samba IP address is 192.168.1.100,
then you have to open samba.init (copy over ftp to pc, use N++ to edit and change:

Code: Select all

SERVER=""
# SERVER="10.0.0.1" # if you want a fixed server
SHARES="" 
to:

Code: Select all

SERVER="192.168.1.100"
# SERVER="10.0.0.1" # if you want a fixed server
SHARES="" 
If you have few servers, then write one by one:

Code: Select all

SERVER="192.168.1.100 192.168.1.200 192.168.1.250"
# SERVER="10.0.0.1" # if you want a fixed server
SHARES="" 
If you need to mount some, but not all samba shares, then change according:

Code: Select all

SERVER="192.168.1.100"
# SERVER="10.0.0.1" # if you want a fixed server
SHARES="Video Music Photo" 
Here are just few examples, please be patient and find your best solution for that. Save file ANSI encoding and upload to TV over ftp back.

Username and password are to be set here:

Code: Select all

##### CHANGE MEEEEE !!!!! ######
USER=""
PASSWD=""
PERM="rw" # can be ro or rw
##### CHANGE MEEEEE END ###### 

Same principles are for all other scripts (NFS, curlftp)...

Re: Tv unable to find Xtreamer NAS!! Need Help!!!!!!!

Posted: Tue Feb 21, 2012 6:32 pm
by brunogts77
Hey thanks so much. Already did what you told me and can?t find my NAS on the network! I do not know what else to do?
Below, I made the change to the file samba.ini! What is the ip address of my NAS!




#!/bin/sh
#
# ? Copyright 1996-2010, ZsoltTech.Com
# by Ser Lev Arris <arris@ZsoltTech.Com>
#
# donated for the SamyGo Project
# http://samygo.sourceforge.net/
#
# Version: SamyGO svn $Id: 04_04_samba.init 1069 2011-01-03 16:47:24Z arris69 $
#

. /dtv/SGO.env
# sleep 9
##### CHANGE MEEEEE !!!!! ######
USER=""bruno
PASSWD=""carteiro
PERM="rw" # can be ro or rw
##### CHANGE MEEEEE END ######

[ -e /mtd_rwarea/smb_userdata ] && source /mtd_rwarea/smb_userdata

[ -z $USER ] && exit 1
[ -z $PASSWD ] && exit 1

DEST_DIR=$MOUNT_PATH/smb
SERVER=""
# SERVER="192.168.1.251" # if you want a fixed server
SHARES=""
FR_NAME="Samba Server"
# M_OPTS="rw,user=${USER},password=${PASSWD}"
M_OPTS="$PERM,user=${USER},password=${PASSWD},codepage=cp1250,iocharset=utf8"

SERVERS="Don't set me!!"

do_mount()
{
# $(echo -e "[sdh]\nVendor : CifsMount\nProduct : $FR_NAME\n\
#Serial : Q80VQLFH\nDevpath : 8\nLun : 0\nMountDir : $DEST_DIR\nFileSystem : vfat\n" >> /dtv/usb/log)

for i in $S_MOUNTS ; do
i="$(echo -n $i | sed -e 's/SGOspace/ /g')"
M_POINT="$DEST_DIR/$1/$(echo -n $i | sed -e "s/\\\$/_/g")"
mkdir -p "$M_POINT"
if [ `cat /proc/mounts | grep -c "$M_POINT"` -lt "1" ] ; then
/bin/busybox mount -o "${M_OPTS}" -t cifs "//$1/$i" "$M_POINT"
else
echo "$M_POINT is mounted!"
fi

done
}

get_shares()
{
echo "Search Shares"
for i in $SERVERS ; do
echo "on: $i"
S_MOUNTS=$(smbclient -s "$SYSROOT/etc/samba/smb.conf" -U ${USER}%${PASSWD} \
-g -L $i | grep "Disk|" | grep -v "\\$" | grep -v " Service" | sed -r 's/.*\|(.*)\|.*/\1/' | sed -r 's/ /SGOspace/g')
# -g -L $i | grep "Disk|" | grep -v "\\$" | grep -v " Service" | cut -d "|" -f2)
[ -n "$S_MOUNTS" ] && do_mount $i
done
}

get_servers()
{
if [ -z "$SERVER" ] ; then
# SERVERS=$(cat /proc/net/arp | grep -v "IP address" | cut -d " " -f1)
SERVERS=$(cat /proc/net/arp | grep -v "IP address" | sed 's/^\(\w*.\w*.\w*.\w*\) *.*/\1/')
else
SERVERS=$SERVER
fi
}

case $1 in
start)
insmod $MOD_DIR/kernel/fs/cifs/cifs.ko
mkdir -p "$DEST_DIR"
get_servers
get_shares
;;
stop)
# may can fail if device access the mount from content library
# for i in $(cat /proc/mounts | grep cifs | cut -d " " -f2) ; do
for i in $(cat /proc/mounts | grep cifs | grep "$DEST_DIR" | sed 's/^\(.*\) \(.*\) cifs .*/\2/') ; do
i="$(echo -n $i | sed -r 's/\\040/ /g')"
/bin/busybox umount "$i"
done
;;
status)
/bin/mount | grep "$DEST_DIR"
;;
*)
echo "Usage: $0 {start|stop}" 1>&2
exit 0
;;
esac

Re: Tv unable to find Xtreamer NAS!! Need Help!!!!!!!

Posted: Tue Feb 21, 2012 7:04 pm
by juusso
we have [ code ] [ / code ] and other text formatting tools for scripts. Please change your previuos message and put script code to [ code ] tags. thanks.

What is this???

Code: Select all

# SERVER="192.168.1.251" # if you want a fixed server 
You have to put your IP not to this row. Please be more acurrate and read my previous post with examples.

Re: Tv unable to find Xtreamer NAS!! Need Help!!!!!!!

Posted: Tue Feb 21, 2012 7:58 pm
by brunogts77
Ok, I apologize for my lack of attention. However already modified the file and still does not work. Any suggestions??

#!/bin/sh
#
# ? Copyright 1996-2010, ZsoltTech.Com
# by Ser Lev Arris <arris@ZsoltTech.Com>
#
# donated for the SamyGo Project
# http://samygo.sourceforge.net/
#
# Version: SamyGO svn $Id: 04_04_samba.init 1069 2011-01-03 16:47:24Z arris69 $
#

. /dtv/SGO.env
# sleep 9
##### CHANGE MEEEEE !!!!! ######
USER="bruno"
PASSWD="carteiro"
PERM="rw" # can be ro or rw
##### CHANGE MEEEEE END ######

[ -e /mtd_rwarea/smb_userdata ] && source /mtd_rwarea/smb_userdata

[ -z $USER ] && exit 1
[ -z $PASSWD ] && exit 1

DEST_DIR=$MOUNT_PATH/smb
SERVER="192.168.1.251"
# SERVER="10.0.0.1" # if you want a fixed server
SHARES="Video Music Photo"
FR_NAME="Samba Server"
# M_OPTS="rw,user=${USER},password=${PASSWD}"
M_OPTS="$PERM,user=${USER},password=${PASSWD},codepage=cp1250,iocharset=utf8"

SERVERS="Don't set me!!"

do_mount()
{
# $(echo -e "[sdh]\nVendor : CifsMount\nProduct : $FR_NAME\n\
#Serial : Q80VQLFH\nDevpath : 8\nLun : 0\nMountDir : $DEST_DIR\nFileSystem : vfat\n" >> /dtv/usb/log)

for i in $S_MOUNTS ; do
i="$(echo -n $i | sed -e 's/SGOspace/ /g')"
M_POINT="$DEST_DIR/$1/$(echo -n $i | sed -e "s/\\\$/_/g")"
mkdir -p "$M_POINT"
if [ `cat /proc/mounts | grep -c "$M_POINT"` -lt "1" ] ; then
/bin/busybox mount -o "${M_OPTS}" -t cifs "//$1/$i" "$M_POINT"
else
echo "$M_POINT is mounted!"
fi

done
}

get_shares()
{
echo "Search Shares"
for i in $SERVERS ; do
echo "on: $i"
S_MOUNTS=$(smbclient -s "$SYSROOT/etc/samba/smb.conf" -U ${USER}%${PASSWD} \
-g -L $i | grep "Disk|" | grep -v "\\$" | grep -v " Service" | sed -r 's/.*\|(.*)\|.*/\1/' | sed -r 's/ /SGOspace/g')
# -g -L $i | grep "Disk|" | grep -v "\\$" | grep -v " Service" | cut -d "|" -f2)
[ -n "$S_MOUNTS" ] && do_mount $i
done
}

get_servers()
{
if [ -z "$SERVER" ] ; then
# SERVERS=$(cat /proc/net/arp | grep -v "IP address" | cut -d " " -f1)
SERVERS=$(cat /proc/net/arp | grep -v "IP address" | sed 's/^\(\w*.\w*.\w*.\w*\) *.*/\1/')
else
SERVERS=$SERVER
fi
}

case $1 in
start)
insmod $MOD_DIR/kernel/fs/cifs/cifs.ko
mkdir -p "$DEST_DIR"
get_servers
get_shares
;;
stop)
# may can fail if device access the mount from content library
# for i in $(cat /proc/mounts | grep cifs | cut -d " " -f2) ; do
for i in $(cat /proc/mounts | grep cifs | grep "$DEST_DIR" | sed 's/^\(.*\) \(.*\) cifs .*/\2/') ; do
i="$(echo -n $i | sed -r 's/\\040/ /g')"
/bin/busybox umount "$i"
done
;;
status)
/bin/mount | grep "$DEST_DIR"
;;
*)
echo "Usage: $0 {start|stop}" 1>&2
exit 0
;;
esac

Re: Tv unable to find Xtreamer NAS!! Need Help!!!!!!!

Posted: Tue Feb 21, 2012 8:07 pm
by juusso
What are your shares ?
Is there samba on your nas?
With login name and password? Then you have to write these too.

Can you see your samba shares if connect to TV over ftp (to /dtv/usb/sda/) or you're checking only media player?

Re: Tv unable to find Xtreamer NAS!! Need Help!!!!!!!

Posted: Tue Feb 21, 2012 8:12 pm
by brunogts77
Yes NAS asks login and password. I can not disable it

Re: Tv unable to find Xtreamer NAS!! Need Help!!!!!!!

Posted: Wed Feb 22, 2012 10:54 pm
by brunogts77
So any suggestions to get access to my NAS?

Re: Tv unable to find Xtreamer NAS!! Need Help!!!!!!!

Posted: Thu Feb 23, 2012 5:24 am
by juusso
You didn`t say: have you written your logi name and password to script? and what protocol are you trying to up? samba?

Re: Tv unable to find Xtreamer NAS!! Need Help!!!!!!!

Posted: Fri Feb 24, 2012 11:40 pm
by brunogts77
Good night, once again thanks for the help with this problem. I've tried putting the username and password on SAMBA fille and even then the tv does not detect the NAS. Look, what I wante is access to my NAS using the tv so i can see the movies. I have a Xtreamer media player, which can do this without anny problems. What is the difference between samba and upnp?