Usb network/folder sharing


elw3

ƐʍlƎ
Joined
Aug 10, 2010
Messages
1,827
How to mount the pandora over usb and share network with it. Tested on Ubuntu 14.04.

1. On the pandora, edit the file /etc/network/interfaces.

You need to uncomment or add the usb section:

auto usb0
iface usb0 inet static
        address 10.0.1.3
        netmask 255.255.255.02. Load the module
Code:
sudo modprobe g_cdc
This can be automated on each boot via Menu -> Settings -> Startup -> Enable/Disable services on boot.Check start USB Network on bootup.

3. Connect the Pandora with your desktop.

4. Enable the connection

sudo ifconfig usb0 up 5. On you desktop you should now see the Pandora connected as wired connection in the network icon.

Right click the icon and edit said connection, you need to go to the IPv4 Tab and set "Method" to sharing with other computers.

6. Back on the Pandora:

sudo dhclient usb0You should now be connected to the net, ping google to make sure
Code:
ping 8.8.8.8
 7. (Optional) We need to set a fixed mac address or the network icon ads a new entry every time we plug the pandora in.

On the Pandora do:

dmesg | grep usb0We need the two lines with "MAC" and "HOST MAC".Now open the file /etc/modprobe.conf as root and ad the following line to the end:

options g_cdc dev_addr=XX:XX:XX:XX:XX:XX host_addr=YY:YY:YY:YY:YY:YYWhere X is to be replaced by what we had after "MAC" and Y is "HOST MAC".
8. Next we need to start the ssh client

sudo dropbearAgain this can be automated via boot settings, check "start dropbear".
9. Now we need the right IP, with

ip awe find it behind "inet" under the usb0 entry.With that you could log in now from you desktop using

ssh USERNAME_ON_PANDORA@THE_IPfor example
Code:
ssh elw@10.42.0.91
for me.
10. Now lets mount the whole Pandora as a network drive.

On you desktop install the tool "gigolo", open it and hit connect. Fill in:

Type SSH

Server the IP we had before.

Port 0 (not importand it seems)

and your username.

Thats it, the Pandora should now appear as a network drive within your file manager.

Orginal post:

Two little things that i wanted to set up for a long time already but always remitted to later:

First i want the pandora to use my computers internet over USB. Connecting it already shows something in nm-applet but being a noob with network stuff i have no idea what to click next. So if someone knows better please point me to where to click or what to do.

Next i want to access the SD cards over usb but without setting it into cardreader mode i always end up damaging my Files with it due to beeing too lazy to properly unmount.

I assume a network shared folder works for that, i just have no idea how to set it up. 

If someone could share some experiences on that that would be very helpful.
 
Last edited by a moderator:
Concerning network setup, you can try these instructions. Personally, I execute the following script:


sudo rmmod g_cdc
sudo modprobe g_ether
sudo ifconfig usb0 down
sudo ifconfig usb0 10.0.1.3 netmask 255.255.255.0 up

To share files, you'd have to set up a file server either on your PC or on your pandora.
 
Last edited by a moderator:
What OS is your PC running ?

If it is also Linux, SSHFS or NFS are convenient. If windows, you can create a samba share on the pandora.
 
Whew has been a while, has been lazy for some time. Well time to dig this out again.

@dimag0g

I dont understand this instructions. If i plug the pandora into the pc nothing happens at all. With or without the script.

@benoitb

Linux ONLY pls.

Any other ppl around with some advice?
 
Not really, but you say it shows something in nmapplet.  What does it show?

Secondly, if you want to share the network of the PC over USB, you'll need to configure the PC to share it.  I'm not entirely sure how you'd do that mind you.

For sharing I personally use scp - but that depends on you setting up ssh (quite a simple change to the config file really), and having network.
 
Okey for the good news: i got it working. 

1. Add/uncomment usb0 into the interfaces file like said in the link.

2. modprobe g_cdc, yes this one. 

3. plug in

4. ifconfig usb0 up

5. Set your desktop to share its connection. 

And the bad new: This does not work in the current Zaxxon. I booted into my old debian/bodhi image for this. 

Now, question is: is that broken in general in this Firmware or is my firmware broken? The files in that debian install came right out of zaxxon 1.5 so i suppose it was working at that point. 

@Levi

Suprisingly nmapplet changes what it displays. Currently its just a "wired connection" without name. 
 
Last edited by a moderator:
Last edited by a moderator:
Okey have it running now, thx all.

I had a lot problems not only with my pandora beeing bitchy but my pc as well doing whatever it wanted.

Anyway i guess now i know the exact steps. 

I will put those three links together in one text for reverence later sometime just in case someone else is looking for it. 
 
As announced before i wrote down all steps that made it working for me and replaced the orginal post with it. See above.
 
Step 1  Isn't necessary.

Steps 2 and 8 can be automated to be enabled on boot

Menu -> Settings -> Startup -> Enable/Disable services on boot.

  + Start Dropbear (SSH login) on bootup

  + Start USB Network on bootup

- Neelix
 
Added that info to 2 and 8.

I need to check if it really woks the same without step 1.

Thanks for proofreading.
 
Whew has been a while, has been lazy for some time. Well time to dig this out again.


@dimag0g


I dont understand this instructions. If i plug the pandora into the pc nothing happens at all. With or without the script.


@benoitb


Linux ONLY pls.


Any other ppl around with some advice?
you could always set it up on some vmware. like oracle box.
 
Back
Top