Forum

Full Version: Direct Ethernet connection to a mac
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,

I had a very nice configuration on my late alpha xbian install, which allowed me to use my ethernet cable to directly copy large files over to my raspi's external hd. The only thing I had to do for this to work was to disable wifi on my mac during the start of the connection. That was very practical but is gone since I installed Beta 1.2. Now, I cannot find the page where this was explained. I think it was something about routing, but that's not something I know very well...

Any hope anybody could give me a short explanation on what I have to do (actual terminal commands gladly welcome)?

Thanks,
Jan
I would have thought the simplest solution would be to use SMB with your Mac. Finder -> Go -> Connect to Server -> RPi IP -> Select shared folder.

However, in the Standard configuration, it is only R/O.

I'll have a look to see what configuration is needed to changed that to R/W unless someone else jumps in.
Thanks for the follow up!
Any news Smile?
(6th Feb, 2014 05:38 AM)IriDium Wrote: [ -> ]However, in the Standard configuration, it is only R/O.

This is the easy part... edit /etc/usbmount/usbmount.conf
but using smb just adds to comfort, it is not my actual issue.

Which is: I am usually connected to the net via wlan0, but want to use an ethernet cable for a quick file transfer from my notebook to my rpi. When I connect the cable, seemingly nothing happens. I assume I need to configure a dhcp client to somehow kick in and get an ip and register it to ahavi (bonjour).

Then I can just connect via the cable and the common name and get much better speeds than via wifi.

But how can this (or something similar) be done?
Run a dhcp server on your mac and configure xbian eth0 as dhcp. Or configure both in the same ip range. You can use either a straight or a crossover cable.
(11th Feb, 2014 09:52 AM)Jan Wrote: [ -> ]Then I can just connect via the cable and the common name and get much better speeds than via wifi.

But how can this (or something similar) be done?

you need something like "hotplug" for eth0. but hotplug directive in /etc/network/interfaces on eth0 won't work as "hotplug" in that sense means hot-plugging the adapter, not "network link".

you can play a bit with package "ifplugd" what is a daemon supposed to watch network link changes (cable out/in).

but most reliable and easiest to configure solution is as CurlyMo told you with static address on eth0 from different net as your wlan0 usually gets.

(just got idea) possible would be also to define a bridge interface (br0), configure static/dhcp address on it and putting wlan0/eth0 to static (but without actual ip defined) and auto - like this:

Code:
auto lo eth0 br0
allow-hotplug wlan0

iface lo inet loopback
iface eth0 inet static
iface wlan0 inet static

iface br0 inet static
        address 192.168.1.104
        network 192.168.1.0
        netmask 255.255.255.0
        broadcast 192.168.1.255
        gateway 192.168.1.2
    dns-nameservers 127.0.0.1
    dns-search private
        bridge_ports eth0 wlan0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0

or br0 as dhcp

Code:
iface br0 inet dhcp
        bridge_ports eth0 wlan0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0

you will have just one IP address at all times and should be no difference if you connect via wlan0, eth0 or even both.
Reference URL's