0

I am using Ubuntu 13.04 version and raspberry device is connect with my laptop through Ethernet cable. I want to transfer some python(.py) file to raspberry pi.

How I transfer data or files between them?

1

Command line

  1. Install sshfs and fuse on your laptop
  2. open a terminal and continue with the following commands:
  3. On your laptop's home directory create a directory on which you will mount your RPi $ mkdir ~/rpi_mount
  4. make a note of your RPi's ip address. Say xxx.yyy.zzz.xxx
  5. mount the rpi's file system: $ sshfs pi@xxx.yyy.zzz.xxx:/dir/to/mount ~/rpi_mount/
  6. enter pi's password when prompted to do so.
  7. you should now see all your RPi's files from your Ubuntu file navigator.
  8. when you are done, unmount the mount with fusermount -u rpi_mount

Using the GUI

  1. Install sshfs and fuse on your laptop
  2. mount the RPi over sshfs using the Gnome "Connect to Server" tool in the desktop Places menu.

Troubleshooting

If the above doesn't work, make sure you are in the fuse group on your laptop: $ groups. If you don't see your username in the list, add it to the fuse group: $ sudo usermod -g fuse $USER

More info here

1
  1. Plug your Raspberry Pi into your router using the ethernet cable. Power on the Pi
  2. Plug your laptop into the router with a second cable or connect via WiFi.
  3. Identify your Pi's IP address, either directly on the Pi or by logging onto your router's admin web interface
  4. On your laptop, you can use Secure CoPy (SCP) to copy the files to your Pi. Example:

scp mypythonfile.py username@192.168.1.50:/home/username/

You'll be prompted to enter the username's password. This also assumes you are running Raspbian (or some other Linux distro) and have SSH setup (it is setup by default in Raspbian).

HTH

  • My laptop and raspberry pi are connected through remote desktop using Ethernet cable.But I have only Ether cable, can I send some file from laptop to raspberry pi? – Zeb Dec 19 '13 at 4:57
0

Using direct Ethernet? Why?

To even make direct talk possible you would need a crosstalk cable, which is an ethernet cable where the wires are crossed so that what is output by one computer is received on the input pins of the other.

This will take some specific knowledge of socket protocols, but could be done. My suggestion would be to use a router as an intermediate or transfer with a flashdrive.

  • 1
    A router is not needed. A hub or a switch would be enough to establish a Ethernet connection. Many Network Cards can also do Auto-MDI. So direct connection without cross over cable works. – Lars Pötter Dec 18 '13 at 22:07
  • My laptop and raspberry pi are connected through remote desktop using Ethernet cable. I want to transfer file from laptop to raspberry pi device. – Zeb Dec 19 '13 at 5:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.