Hospitality mode hack (for D6 series only) - updated

Here is information about customize your D series firmware..:!:This forum is NOT FOR USER questions or problems but DEVELOPER.

daviddrf
Posts: 87
Joined: Sat Jul 01, 2017 4:05 am

Re: Hospitality mode hack (for D6 series only) - updated

Post by daviddrf »

Hello. I've tried the Hospitality mode hack (https://wiki.samygo.tv/index.php?title= ... arm_models) on my UE32D6100 with 1028 firmware and it worked flaweslly. Now I am able to access to the television IP address through FTP on port 21 and I've got an USB source (labeled "SamyGo Virt. USB") permanently.
Now what I would want/need is to mount some shared folders I have on my local network (computers, hard disk connected to a router, STBs...)for watching them on the television directly. I've been looking for this information on the wiki and forum but I don't know how to do it ("SamyGO.sh" or "start.sh" editing maybe?). I've read that NFS is faster and has a better performance than CIFS or SMB. Thanks in advance for your help and information.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: Hospitality mode hack (for D6 series only) - updated

Post by juusso »

Connect via ftp and enable /mnt/etc/init.d/04_04_samba.init script. If you want nfs, corresponding script also exists there.
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
daviddrf
Posts: 87
Joined: Sat Jul 01, 2017 4:05 am

Re: Hospitality mode hack (for D6 series only) - updated

Post by daviddrf »

juusso wrote: Mon Oct 16, 2017 9:57 am Connect via ftp and enable /mnt/etc/init.d/04_04_samba.init script. If you want nfs, corresponding script also exists there.
Hello juusso and thank you again for your support. I'm trying the CIFS/SMB shared folders first. If I succeded then I will try NFS after that.
I am not being able to view the shared folders in the virtual Samygo's USB in the sources option. I only see a folder called "Muzik".
I edited and uploaded to /mnt/etc/init.d/ the file "04_04_samba.init" using FTP. I only modified 4 lines from its default content:

Code: Select all

#!/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 !!!!! ######
[b][i][u]USER="Administrador"
PASSWD=""[/u][/i][/b]
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
[b][i][u]SERVER="192.168.0.3"[/u][/i][/b]
# SERVER="10.0.0.1" # if you want a fixed server
[b][i][u]SHARES="PCSALON"[/u][/i][/b]
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
USER="Administrador" (the username in my Windows 7 computer).
PASSWD="" (there's no password for that username in my computer).
SERVER="192.168.0.3" (the LAN IP of my computer)
SHARES="PCSALON" (the name given from me to the shared computer).

If I access to that computer from another one connected in the same LAN using \\192.168.0.3 I can see two shared folders (called "d" and "e") which are the two hard disks that are being shared but the cannot be seen using the television. Maybe I made some mistakes? I've been looking for information in the forum but I only found topics related like these ones:

viewtopic.php?p=50329#p50329

viewtopic.php?f=52&t=5822c

viewtopic.php?t=6199

viewtopic.php?f=24&t=2973

Thanks in advance.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: Hospitality mode hack (for D6 series only) - updated

Post by juusso »

please put your code to corresponding tag. Thank you. Until that - no support.
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
daviddrf
Posts: 87
Joined: Sat Jul 01, 2017 4:05 am

Re: Hospitality mode hack (for D6 series only) - updated

Post by daviddrf »

juusso wrote: Fri Oct 20, 2017 4:43 pm please put your code to corresponding tag. Thank you. Until that - no support.
I aldready tried the code tag display for the previous message. The problem is I realized it's not possible (at least I wasn't able) to use bold, italic and/or underlined text for indicate the modified lines in the file:

Code: Select all

#!/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="Administrador"
PASSWD=""
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.0.3"
# SERVER="10.0.0.1" # if you want a fixed server
SHARES="PCSALON"
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

Thanks in advance.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: Hospitality mode hack (for D6 series only) - updated

Post by juusso »

Go to web interface of your tv (http://IP/cgi-bin/test.cgi ) and give the log of 04_04_samba script.
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
daviddrf
Posts: 87
Joined: Sat Jul 01, 2017 4:05 am

Re: Hospitality mode hack (for D6 series only) - updated

Post by daviddrf »

I tried but I don't know why it's not possible. I have no access to WebGUI in http://192.168.0.9/cgi-bin/test.cgi, nor WebShell using http://192.168.0.9/phpsysinfo/shell.php, nor File manager using http://192.168.0.9/phpsysinfo/file.php, nor Samba server using \\192.168.0.9 and not netcat connection throug cmd.exe in Windows using "nc 192.168.0.9 1023"...I don't know why is this happening because some days ago I could use every of this protocols without problems...I could access completely to my television. Now only FTP server works with no problem and I can see my whole television using ftp://192.168.0.9 or a FTP client like FileZilla. Maybe should I reapply the hospitaly hack juusso? Thanks again for your help!

PS: ruSamsungTVCommunicator works perfectly too.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: Hospitality mode hack (for D6 series only) - updated

Post by juusso »

do you have exlink cable? output might help to figure out what`s happening.
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
daviddrf
Posts: 87
Joined: Sat Jul 01, 2017 4:05 am

Re: Hospitality mode hack (for D6 series only) - updated

Post by daviddrf »

juusso wrote: Sun Oct 22, 2017 4:36 pm do you have exlink cable? output might help to figure out what`s happening.
Yes, I have a working Ex-Link Cable. How can I show you that output? What commands or menus do you need? Thanks again juusso!
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: Hospitality mode hack (for D6 series only) - updated

Post by juusso »

Show log from tv start up to vusb appears. Put it to pastebin.com
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

Post Reply

Return to “[D] Firmware”