Second Virtual USB disc

Here for general support for B series TVs, request and problem solve area.
Post Reply

andyet88

Second Virtual USB disc

Post by andyet88 » Sat Feb 02, 2013 4:28 pm

Hi all,

I want Second Virtual USB on my tv Samsung B550 but i don't know how i can do it. My script looks like:

Code: Select all

######## Parameters ########### - Edit and uncomment according to your situation
SHARE1=/e/
SHARE1_DIR=network
SHARE2=/d/
SHARE2_DIR=network2

NFS=Y   # gdy korzystamy z przyk?adowo HaneWIN NFS Server lub serwera linuksowego.
SAMBA=N # dla plik?w udost?pnionych przez Windows. Niestety u mnie na Windows 7 x64 nie dzia?a?o.
SERVER_IP=adres_IP_serwera

if [ $NFS == 'Y' ] ; then
   ######## Modules for NFS ##############
   echo "Installing NFS kernel modules."
   insmod /mtd_rwarea/modules/sunrpc.ko
   insmod /mtd_rwarea/modules/nfs_acl.ko
   insmod /mtd_rwarea/modules/lockd.ko
   insmod /mtd_rwarea/modules/nfs.ko
fi

if [ $SAMBA == 'Y' ] ; then
   ######## Module for SAMBA (Windows share) #########
   echo "Installing SAMBA kernel module."
   insmod /mtd_rwarea/modules/cifs.ko #uncomment when needed!
fi

ALL_MOUNTED=N
while [ $ALL_MOUNTED == 'N'  ] 
do
  if [ `mount | grep -c /mtd_rwarea/$SHARE1_DIR` == 0 ] ; then
     if [ $NFS == 'Y' ] ; then
        echo "Mounting NFS Share: $SHARE1"
        mount -t nfs -o nolock -o rsize=32768,wsize=32768 $SERVER_IP:$SHARE1 /mtd_rwarea/$SHARE1_DIR  
     else
        if [ $SAMBA == 'Y' ] ; then
           echo "Mounting SAMBA Share: $SHARE1"
           mount -o user=guest,password="" -t cifs //$SERVER_IP$SHARE1 /mtd_rwarea/$SHARE1_DIR
        fi
     fi
     
     sleep 10
   
     if [ `mount | grep -c /mtd_rwarea/$SHARE1_DIR` == 1 ] ; then
        echo "Mounting network share $SHARE1: SUCCESS"
        ############## Bind netork share to Virtual USB ###########################
        VUSB=$(head -n $(($(grep -n SamyGO /dtv/usb/log | cut -d: -f1)+4)) /dtv/usb/log | tail -1 | cut -d' ' -f3)
        test -d $VUSB/$SHARE1_DIR || mkdir -p $VUSB/$SHARE1_DIR
        mount --bind  /mtd_rwarea/$SHARE1_DIR $VUSB/$SHARE1_DIR
        ALL_MOUNTED=Y
     else
        ALL_MOUNTED=N
        sleep 60
     fi
  fi

  
  if [ -z $SHARE2 ] ; then 
     break
  fi
  
  if [ `mount | grep -c /mtd_rwarea/$SHARE2_DIR` == 0 ] ; then
     if [ $SAMBA == 'Y' ] ; then
        echo "Mounting SAMBA Share: $SHARE2"
        mount -o user=guest,password="" -t cifs //$SERVER_IP$SHARE2 /mtd_rwarea/$SHARE2_DIR  
     else
        if [ $NFS == 'Y' ] ; then
           echo "Mounting NFS Share: $SHARE2"
           mount -t nfs -o nolock -o rsize=32768,wsize=32768 $SERVER_IP:$SHARE2 /mtd_rwarea/$SHARE2_DIR
        fi
     fi
     
     sleep 10
     
     if [ `mount | grep -c /mtd_rwarea/$SHARE2_DIR` == 1 ] ; then
        echo "Mounting network share $SHARE2: SUCCESS"
        ############## Bind netork share to Virtual USB ###########################
        VUSB=$(head -n $(($(grep -n SamyGO /dtv/usb/log | cut -d: -f1)+4)) /dtv/usb/log | tail -1 | cut -d' ' -f3)
        test -d $VUSB/$SHARE2_DIR || mkdir -p $VUSB/$SHARE2_DIR
        mount --bind  /mtd_rwarea/$SHARE2_DIR $VUSB/$SHARE2_DIR
        ALL_MOUNTED=Y
     else
        ALL_MOUNTED=N
        sleep 60
     fi
  fi
done

Of course i made folder /mtd_rwarea/network2. Everything is fine with folder network, but i don't see network2 on my tv. I find in SamyGo.sh file "vusb.image" and when i extract it i saw folder "network". So i think i must make new "vusb.image" with second folder? I tried do it but maybe i do mistakes and it doesn't work.

User avatar
pohybel
Posts: 45
Joined: Wed Jun 13, 2012 4:35 pm
Location: Poland

Re: Second Virtual USB disc

Post by pohybel » Sat Feb 02, 2013 7:09 pm

Try this link viewtopic.php?f=22&t=4722.

Mod probably will not work on your tv but if you analyse scripts you should be able to create additional USB disk. Look for g_file_storage.ko

p.s.
Polak?

andyet88

[SOLVED] Second Virtual USB disc

Post by andyet88 » Sat Feb 02, 2013 8:06 pm

How to create vusb.image (you need linux - LiveCD):
1) Make an empty image file
2) Mount it via loop and write the contents to it
$ dd bs=512c count=100 if=/dev/zero of=vusb.image
$ mkfs.msdos vusb.image
$ mkdir /media/image
$ sudo mount -o loop vusb.image /media/image/
<<<copy your files on to the "drive" now>>>
$ sudo umount /media/image/

In appendage vusb.image with two folders "network" and "network2". You must unzip this first.
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “[B] Support”