Page 1 of 1

Re: Using SAMBA to bypass DNLA with virtual usb

Posted: Thu Nov 25, 2010 12:12 pm
by juusso
How about

Code: Select all

[sda4]
Vendor : Linux
Product : [WOPR_samba]
Serial : Q80VQLFL
Devpath : 4
Lun : 0
MountDir : /dtv/usb/sda4
FileSystem : vfat
Look at the very first row of code. You have [sdd]. try edit code to [sda4] in your mounting script.

Added:
Forget it, it doesn`t play any role for recognition of USB.

Re: Using SAMBA to bypass DNLA with virtual usb

Posted: Thu Nov 25, 2010 12:52 pm
by juusso
Attach USB to TV (not virtual)
Edit cifs_mount.sh script to mount to /dtv/usb/sda1
Is here an USB pluged in to tv? it is sda1, right?

Here is my mount.sh file, it mounts to sda1 if physical USB is plugged in at system start, or to sda1 virtual usb if it isn`t :

Code: Select all

    #!/bin/sh

    # Enable CIFS sharing
    insmod /mtd_rwarea/modules/cifs.ko
    sleep 10

    #====================================================================
    # Variables
    #====================================================================
    CIFS="/dtv/usb/sda1"
    IP="//192.168.1.200"
    USER="YOUR WINDOWS USERNAME"
    PASSWORD="YOUR WINDOWS PASSOWRD"
    SHARE1="Filmukai"
    SHARE2="Downloads"
    SHARE3="Muzika"
    SHARE4="Foto"

    #====================================================================
    # append sda1 notification to log file:
    #====================================================================
    echo "[sda1]
    Vendor : CIFSMount
    Product : File-Stor Gadget
    Serial : Q80VQLFH
    Devpath : 8
    Lun : 0
    MountDir : /dtv/usb/sda1
    FileSystem : vfat
    " >> /dtv/usb/log
       
    #====================================================================
    #Create Folder for VUSB-Mountpoints
    #====================================================================
          if [ `mount | grep -c $CIFS` == 0 ]; then
            mkdir -p $CIFS
          fi
       
    #====================================================================
    # Mounting the shares
    #====================================================================
          if [ `mount | grep -c $CIFS/$SHARE1` == 0 ]; then
            echo "Mounting Windows Shares"
           mkdir -p $CIFS/$SHARE1
            mount -o user=$USER,password=$PASSWORD -t cifs $IP/$SHARE1 $CIFS/$SHARE1      
           else
           echo "Windows Shares already Mounted"
          fi

          if [ `mount | grep -c $CIFS/$SHARE2` == 0 ]; then
            echo "Mounting Windows Shares"
           mkdir -p $CIFS/$SHARE2
            mount -o user=$USER,password=$PASSWORD -t cifs $IP/$SHARE2 $CIFS/$SHARE2      
           else
           echo "Windows Shares already Mounted"
          fi
       
          if [ `mount | grep -c $CIFS/$SHARE3` == 0 ]; then
            echo "Mounting Windows Shares"
           mkdir -p $CIFS/$SHARE3
            mount -o user=$USER,password=$PASSWORD -t cifs $IP/$SHARE3 $CIFS/$SHARE3      
           else
           echo "Windows Shares already Mounted"
          fi   
       
          if [ `mount | grep -c $CIFS/$SHARE4` == 0 ]; then
            echo "Mounting Windows Shares"
           mkdir -p $CIFS/$SHARE4
            mount -o user=$USER,password=$PASSWORD -t cifs $IP/$SHARE4 $CIFS/$SHARE4      
           else
           echo "Windows Shares already Mounted"
          fi   
        
   exit
If you want, you can use my file, all what you need is to change your data in Variables block. If you have less than 4 shares, edit script by deleting code in Variables, like:
SHARE4="Foto"
and code blocks like :

Code: Select all

          if [ `mount | grep -c $CIFS/$SHARE4` == 0 ]; then
            echo "Mounting Windows Shares"
           mkdir -p $CIFS/$SHARE4
            mount -o user=$USER,password=$PASSWORD -t cifs $IP/$SHARE4 $CIFS/$SHARE4      
           else
           echo "Windows Shares already Mounted"
          fi   
To add new shares, just add the same blocks with $SHARESxx="mount name". To mount to virtual usb (to use mounts without USB plugged), you have to load virtual usb at system start.

Re: Using SAMBA to bypass DNLA with virtual usb

Posted: Fri Nov 26, 2010 2:23 pm
by edelfalke
You have no VUSB Modules,

look @ http://forum.samygo.tv/viewtopic.php?f=5&t=231

That is what is missing in your script:

Code: Select all

#Install Kernel Modules for smb

Module="/mtd_rwarea/modules"

dd if=/dev/zero of=/dtv/vusb bs=512 count=4

insmod $Module/dummy_hcd.ko
sleep 3

insmod $Module/g_file_storage.ko
sleep 3

echo -e "[sda]
Vendor : CifsMount
Product : VUSB Stick
Serial : Q80VQLFH
Devpath : 8
Lun : 0
MountDir : /dtv/usb/sda1
FileSystem : vfat
" >> /dtv/usb/log   
before you load cifs.ko

Code: Select all

insmod $Module/cifs.ko
The files dummy_hcd.ko and g_file_storage.ko you can get from Samygo_All_Extensions from Folders .\SamyGO\lib\modules\XXXXX\kernel\drivers\usb\gadget
Copy this files to /mtd_rwarea/modules.