TurboNewb
Posts: 2
Joined: Tue Apr 02, 2013 3:54 pm

Using RP to transfer files from SD card to Hard Drive

Tue Apr 02, 2013 4:10 pm

Hi, King of the Newbs here, so please bear with me.

I'm a travelling videographer and I've been looking for a way to back up the footage I shoot on SD cards onto an external hard drive without having to lug my laptop around airports. It seems all I would need for this is a Raspberry Pi with a USB hub and a USB SD card reader (since the built-in reader has to hold the operating system). What additional software would I need to use my Android phone (Galaxy S3) in order to copy the files from the card to the drive? I see that the Android operating system is still in the development stages, but is there a way I could just use Linux or some other OS on the RP and use my phone as a screen to move the files? I tried searching for the answer but I fear that my level of newbness prevents me from knowing quite what to search for. Would really appreciate some wisdom here!

6677
Posts: 383
Joined: Wed Mar 14, 2012 9:23 pm

Re: Using RP to transfer files from SD card to Hard Drive

Tue Apr 02, 2013 10:12 pm

Hmm, you might also need a wireless router too. From there you could get a VNC server on the pi and a VNC client on the phone easily enough.


Alternately. Take a USB-OTG adaptor. This is a cable with a full size USB socket on one side and a micro USB on the other. Plug this into your phone. Then plug a mains powered hub (gonna have to be mains powered, same as if you were using the pi though) and plug that into the OTG adaptor. Then a USB-SD card reader could be connected to the hub and you can connect your hard disk to the hub. Unless samsung have messed with it, android natively supports this configuration with 1 limitation. Many USB hard drives are formatted as NTFS. Android and many linux distro's do not have NTFS support. If you reformat the hard disk as exFAT first though then you should be good to go.

I would then recommend "ES File Explorer" on the android market. This will easily allow you to browse the contents of the SD card, copy them, and then browse the hard drive to paste.



I know this is a pi forum and I should be recommending the pi based solution but really, the OTG adaptor is probably most convenient.

I love OTG adaptors. You can use them for all sorts, hell, connect a mouse and keyboard to one. Android gains a mouse cursor and whenever you tap on a text field the on screen keyboard no longer appears, you can then use the proper keyboard for typing. I have heard some limited success with optical drives over USB. Android natively supports the xbox-360 controller through it (but only the wired version, the keymapping is broken for the wireless version although that is fixable on a rooted device).



In short: this plus a powered USB hub, USB card reader and the hard drive you mentioned. No pi needed, can all be done on your phone.

TurboNewb
Posts: 2
Joined: Tue Apr 02, 2013 3:54 pm

Re: Using RP to transfer files from SD card to Hard Drive

Wed Apr 03, 2013 8:12 pm

Wow, this is great news, thank you so much! I didn't think there would be a cheaper or easier way to do this. I'm glad I was wrong!

swiftpint
Posts: 1
Joined: Thu Apr 18, 2013 8:30 pm

Re: Using RP to transfer files from SD card to Hard Drive

Thu Apr 18, 2013 8:55 pm

Would it not be easier to write a script which detects when an SD card is inserted and automatically copies files to the hard drive - maybe using something like rsync to only back up new/changed files.

This would make me paranoid as to whether it was actually transferring - so maybe some LEDs to show when transfers are in progress and complete.

This would avoid faffing around with finding a way to connect to a phone/screen to see if transfers have happened.

I wonder how easy it would be to shrink the Pi, usb hub, reader and hard drive into a neat case...

This is something that I'd be interested in looking into for backing up photos on the move.

AnakTeka
Posts: 1
Joined: Sat Apr 20, 2013 10:47 am

Re: Using RP to transfer files from SD card to Hard Drive

Sat Apr 20, 2013 11:02 am

I believe Samsung Galaxy SIII has support NTFS using a custom kernel

Saahilj
Posts: 10
Joined: Tue May 07, 2013 11:49 pm

Re: Using RP to transfer files from SD card to Hard Drive

Wed May 08, 2013 12:03 am

AnakTeka wrote:I believe Samsung Galaxy SIII has support NTFS using a custom kernel
I believe that you can build the custom kernel for any android device which will then support NTFS,
Maybe an android expert can help out on this topic

P.S From newbie=1 and expert=10 I am 4

WaynePd
Posts: 1
Joined: Fri May 17, 2013 6:01 am

Re: Using RP to transfer files from SD card to Hard Drive

Fri May 17, 2013 6:09 am

Can this be done without the android phone?

My hope was to connect an external HDD and sd card to the RPi with the two USB ports. All files on the sd card would be transferred to the HDD via a script that is run when both devices are detected. Once the transfer is complete, the sd card is wiped clean.

Is this possible?

6677
Posts: 383
Joined: Wed Mar 14, 2012 9:23 pm

Re: Using RP to transfer files from SD card to Hard Drive

Sat May 18, 2013 9:25 pm

WaynePd wrote:Can this be done without the android phone?

My hope was to connect an external HDD and sd card to the RPi with the two USB ports. All files on the sd card would be transferred to the HDD via a script that is run when both devices are detected. Once the transfer is complete, the sd card is wiped clean.

Is this possible?
It is possible but the main reason for mentioning the android phone is because that was what was on hand.

ismaels
Posts: 1
Joined: Thu Nov 14, 2013 11:38 pm

Re: Using RP to transfer files from SD card to Hard Drive

Fri Nov 15, 2013 12:40 am

I've wrote a python script that detects a HDD and a SD, with all the options that i wanted to have:
  • Copy SD (JPEG, RAW, VIDEO, ALL) 2 HDD
  • Copy firmware (Magic Lantern) from HDD 2 (new) SD
  • Format SD
When the RP powers on, the script starts automatically and shows a menu on the Adafruit RGB Negative 16x2 LCD+Keypad, where the above options can be selected with the buttons.

The problem i have is that all this is powered from a powered USB hub (wall socket), and i need to have a portable powerbank to power this USB hub so i can use it wherever i am. (need to cut the voltage wires from the USB hub and connect it to a proper powerbank? The 2.5" HD can't get enough power when it's connected directly to the RP and the RP is powered from the regular power input, the RP is powered through the USB port).

Anyway,..I think it also can be done by using a PI and phone (instead of the solution i've described above), but you will need to have an USB hub to connect 3 devices (HDD, SD and WIFI) and probably also a portable powerpack if a portable solution is wanted. Use a remote desktop app to see Raspbian working or use a file manager (ES File Manager), and copy the files.

But i'm thinking the solution provided by 6677 is more portable, still..:

Overall problem, how to power a powered usb hub with a powerbank (when a portable solution is needed/wanted)?

NOTE: I'm currently using a Trust Pyramid 7 Port USB 2.0 Hub (15140), searching for a proper powerbank and if needed an other usb hub.

adammannpro
Posts: 3
Joined: Mon Jun 23, 2014 9:42 am

Re: Using RP to transfer files from SD card to Hard Drive

Mon Jun 23, 2014 10:28 am

Hi

I am looking into this same kinda thing, I film weddings, music videos etc and would like to be able to auto dump my files (Video .mp4 and photos .CR2) from my CF/SD card directly to a USB HDD/SSD as a back up firstly and if need be I can reuse the cards.

I have decided a RPi is a good starting point and have found a few guides I am going to try (need to buy the RPi this week). as above I need it to be portable and was looking into battery options. my camera uses Canon LE-P6 batteries (7.2v) to which I have been looking into how to convert them to the 5v needed for the RPi, but there are other options like the batter packs you get for charging your iPhone's, Tablets etc.

I was also looking into adding a small 2.8/3.x touchscreen to the RPi so that I dont need a keyboard/mouse/screen to use it all, even making a simple app that has a simple interface for copy that starts up with the OS, but this is in the future, I need to work on the main function first, as I am a newbie as well this might take some time to work out.

if anyone has any suggestions I would gladly look into them and would be grateful for the help

Adam

User avatar
DougieLawson
Posts: 38883
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Using RP to transfer files from SD card to Hard Drive

Mon Jun 23, 2014 2:34 pm

Plug the camera's USB cable directly into your RPi, mount the USB drive that appears and copy at will. When you're done umount the USB drive.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

adammannpro
Posts: 3
Joined: Mon Jun 23, 2014 9:42 am

Re: Using RP to transfer files from SD card to Hard Drive

Tue Jul 29, 2014 4:45 pm

I have since bought a RPi B+ (4 USB ;)) and using a 10000MHa iPhone portable battery charger, this seems to power all my devices for a long time with no issues so far.

I just need to work on the script to run it all

Adam

adammannpro
Posts: 3
Joined: Mon Jun 23, 2014 9:42 am

Re: Using RP to transfer files from SD card to Hard Drive

Tue Jul 29, 2014 4:48 pm

Would you share this script as I would like to see how you did things and add to my current bits and bobs I have found on the net, which so far just copies path to path on a windows box, I need to mod it to see the RPi paths
ismaels wrote:I've wrote a python script that detects a HDD and a SD, with all the options that i wanted to have:
  • Copy SD (JPEG, RAW, VIDEO, ALL) 2 HDD
  • Copy firmware (Magic Lantern) from HDD 2 (new) SD
  • Format SD
When the RP powers on, the script starts automatically and shows a menu on the Adafruit RGB Negative 16x2 LCD+Keypad, where the above options can be selected with the buttons.

The problem i have is that all this is powered from a powered USB hub (wall socket), and i need to have a portable powerbank to power this USB hub so i can use it wherever i am. (need to cut the voltage wires from the USB hub and connect it to a proper powerbank? The 2.5" HD can't get enough power when it's connected directly to the RP and the RP is powered from the regular power input, the RP is powered through the USB port).

Anyway,..I think it also can be done by using a PI and phone (instead of the solution i've described above), but you will need to have an USB hub to connect 3 devices (HDD, SD and WIFI) and probably also a portable powerpack if a portable solution is wanted. Use a remote desktop app to see Raspbian working or use a file manager (ES File Manager), and copy the files.

But i'm thinking the solution provided by 6677 is more portable, still..:

Overall problem, how to power a powered usb hub with a powerbank (when a portable solution is needed/wanted)?

NOTE: I'm currently using a Trust Pyramid 7 Port USB 2.0 Hub (15140), searching for a proper powerbank and if needed an other usb hub.

klaus.gabriel
Posts: 1
Joined: Sat Aug 23, 2014 2:43 pm

Re: Using RP to transfer files from SD card to Hard Drive

Sat Aug 23, 2014 3:14 pm

I'm a newbie as well and want have everthing light-weighted for long-term-traveling.
Daugie'S suggestion is nice but needs to have keybord and screen.

So HDD need extra power, USB-Hub wall-powerd will be needed.
Some camera uses SD, some CF and other Memorystick. Either you use the camera-interface if recognized (most likely a slow solution) or it makes you need a multicard-reader.
To drive the externals + RSPi is needs either a powerbank or a wall-plugged-powersupply with 2 USB-Sockets with each min. 2A currency-output.
OK, this about minimum hardware-environment. (minimizable by dropping HUB and plug HDD's-USB-Y-Kabel with the powerside direct to wall-plugged-powersupply and the other to RSPi)

Now the challenge: all is plugged, boot finished, script starts automatically and has to do followings steps:
# detect which is the data-source an which the larger target-HDD
# mount properly in appropriated format FAT/FAT32/exFat/NTFS
# search on target an e.g. 4-chipper long directory-name and create a new incremented
# use fast and secure copy command - may be cp indicate process running with RSPi's LED-flashing, keep files datetime
# after finishing that check source-targed-identity and optionally erase source (same or other LED is flashing for this step?)
(but may you like make a second backup and format your source later in yr camera.
# unmount both LED off ... job done ... happy happy !!!

Is there anybody out there who has such script done? and like to share with us/me?
Let us know pls!

DirkS
Posts: 10347
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Using RP to transfer files from SD card to Hard Drive

Sat Aug 23, 2014 4:10 pm

I'm a newbie as well and want have everthing light-weighted for long-term-traveling.
Is there a Android connection somewhere?
If not then I would post this in a more general part of the forum (and let a moderator remove this one). I don't think many people will see it here.

Gr.
Dirk.

Return to “Android”