Coder Social home page Coder Social logo

pc-autobackup's Introduction

PC AutoBackup for Linux and OS X for Samsung digital cameras

This project is in active development and is currently a work-in-progress.

If you'd like to donate to the development of PC AutoBackup use the following link:


Getting Started

Requirements

Configuring your camera

If your camera has already been setup with PC AutoBackup for Windows

* Mount your camera's SD card
* pc_autobackup.py --import_camera_config=/path/to/camera
* Uninstall PC AutoBackup on Windows **_(failure to do so will prevent this server from working)_**

If you have never setup PC AutoBackup before

* Mount your camera's SD card
* pc_autobackup.py --create_camera_config=/path/to/camera

Starting the server

  • pc_autobackup.py

See pc_autobackup.py --help for more options

Tested with the following cameras:

  • DV300F
  • NX1000
  • WB150F
  • WB350F
  • ST200F
  • NX2000
  • NX300
  • Does it work with your camera? Send me a pull request editing this README.

Tested on the following OS:

  • Arch 64-bit
  • Ubuntu 12.04 (precise) 32/64-bit
  • Ubuntu 16.04 (xenial) 64-bit
  • Mac OS X 10.8.2 (Mountain Lion)

Tested on the following Python versions:

  • Python 2.7.2
  • Python 2.7.3
  • Python 2.7.11
  • Python 2.7.12

This software is NOT created or supported by Samsung

Samsung is a registered trademark of Samsung Electronics Co., Ltd.

pc-autobackup's People

Contributors

birgerro avatar kweck avatar n-i-x avatar nemanjan00 avatar vo2le avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pc-autobackup's Issues

Does not work with NX2000 Firmware 1.13

First time backup never finds the server. Following error message:
user@icybox:/srv/data$ sudo /usr/local/pc-autobackup/pc_autobackup.py -o 
/srv/data/nx2000
[04/18/2014 09:44 PM] PCAutoBackup started on 127.0.1.1
[04/18/2014 09:44 PM] Server name: [PC]AutoBackup
[04/18/2014 09:44 PM] SSDPServer started
[04/18/2014 09:44 PM] MediaServer started
[04/18/2014 09:44 PM] Sending SSDP response to 192.168.178.28:24234
[04/18/2014 09:44 PM] Sending SSDP response to 192.168.178.28:24234
[04/18/2014 09:44 PM] Sending SSDP response to 192.168.178.28:24234
[04/18/2014 09:44 PM] New connection from 192.168.178.28 (Samsung User-Agent 
DLNADOC/1.50)
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/basic.py", line 564, in dataReceived
    why = self.lineReceived(line)
  File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 1551, in lineReceived
    self.allContentReceived()
  File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 1618, in allContentReceived
    req.requestReceived(command, path, version)
  File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 773, in requestReceived
    self.process()
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/web/server.py", line 132, in process
    self.render(resrc)
  File "/usr/lib/python2.7/dist-packages/twisted/web/server.py", line 167, in render
    body = resrc.render(self)
  File "/usr/lib/python2.7/dist-packages/twisted/web/resource.py", line 216, in render
    return m(request)
  File "/usr/local/pc-autobackup/mediaserver.py", line 173, in render_GET
    response = self.GetDMSDescriptionResponse()
  File "/usr/local/pc-autobackup/mediaserver.py", line 296, in GetDMSDescriptionResponse
    with open(os.path.join('DMS', 'SamsungDmsDesc.xml'), 'r') as dms_desc:
exceptions.IOError: [Errno 2] No such file or directory: 
'DMS/SamsungDmsDesc.xml'

Original issue reported on code.google.com by [email protected] on 18 Apr 2014 at 7:47

Offline creation of SAMSUNGAutoBackupDESC.ini ?

I want to run pc-autobackup on a headless VM, which makes it a bit tricky to 
"connect" the camera to it.

Is there a way to generate SAMSUNGAutoBackupDESC.ini without the camera being 
connected, allowing me to manually place the .ini in the /dlna_web_root/ 
directory?


Original issue reported on code.google.com by [email protected] on 27 Nov 2013 at 10:13

Connection issues on server with multiple network devices.

I've a NX3000 and your tool works great on my desktop (Arch Linux). Unfortunately, not on my always running home server.

By using the --create_camera_config parameter, the config file gets written with a local MAC Address (device: p4p1) , presumably the first one from ifconfig?. In my configuration the correct port would be the second one, which is connected to the internal network (device: br0).

However, It would be cool if I could choose which port the camera should bind to while connecting.

Changing the MAC Adress manually was not succesfull. I guess the UUID also needs some adjustment. But don't know enough about UPnP.

Doesn´t work with Samsung NX 300

It doesn´t work with Samsung NX 300

1. Enter \r\n on each line in SAMSUNGAutoBackupDESC.ini 
2. Put the following line in the common.py
  'SAMSUNG NX300': {'desc_file': os.path.join('dlna_web_root',
                                              'SAMSUNGAutoBackupDESC.ini')},
3. Put a ''] at the end of the ssdp.py Response (\r\n), it will go on.
Now it stops after the Connction1.xml Response. Normaly the Camera must send a 
push request.






Original issue reported on code.google.com by [email protected] on 27 Feb 2014 at 4:36

Attachments:

Does not work with NX1000 Firmware 1.13

What steps will reproduce the problem?
1. Wiped SD Card
2. Setup PC Autobackup via command line connected to camera
3. Start PC Autobackup
4. Start Autobackup on camera, but it never finds the computer

Please provide any additional information below.

The camera tries to connect, but eventually comes up and says it cannot 
connect.  Below is the output..

dlambert@proton:~/dev/pc-autobackup$ python pc_autobackup.py -d -b 
192.168.2.219 enabling debug
[04/19/2013 09:33 PM] PCAutoBackup started on 192.168.2.219
[04/19/2013 09:33 PM] Server name: tron
[04/19/2013 09:33 PM] SSDPServer started
[04/19/2013 09:33 PM] MediaServer started
[04/19/2013 09:33 PM] Sending SSDP response to 192.168.2.201:24234
[04/19/2013 09:33 PM] Sending SSDP response to 192.168.2.201:24235
[04/19/2013 09:33 PM] Sending SSDP response to 192.168.2.201:24236


I'm not sure where to debug... let me know how I can provide more information.

Original issue reported on code.google.com by [email protected] on 20 Apr 2013 at 1:34

Patch for EX2F

I tried to use it with a Samsung EX2F, I attached my patches for this.

I added the filename I encountered. Also the SSDP response needed two \r\n at 
the end, so I added them, too. And thirdly it was important, that the 
description file on the camera has DOS/Windows linebreaks (\r\n) instead of 
just \n. After these changes, it worked.

Original issue reported on code.google.com by [email protected] on 25 Apr 2013 at 9:15

Attachments:

Doesn't work with WB350F

First time backup with WB350F doesn't work:


[08/27/2014 07:59 PM][pc_autobackup] INFO:PCAutoBackup started on 192.168.1.22
[08/27/2014 07:59 PM][pc_autobackup] INFO:Server name: [PC]AutoBackup
[08/27/2014 07:59 PM][pc_autobackup] DEBUG:Command-line: /usr/local/bin/pc_autob
ackup.py -d
[08/27/2014 07:59 PM][pc_autobackup] DEBUG:Python Version: 2.6.6
[08/27/2014 07:59 PM][pc_autobackup] DEBUG:System Information (platform): Linux-
2.6.32-5-amd64-x86_64-with-debian-6.0.1
[08/27/2014 07:59 PM][pc_autobackup] DEBUG:System Information (uname): Linux ste
phen 2.6.32-5-amd64 #1 SMP Mon Mar 7 21:35:22 UTC 2011 x86_64 
[08/27/2014 07:59 PM][pc_autobackup] DEBUG:System Information (node): stephen
[08/27/2014 07:59 PM][pc_autobackup] DEBUG:System Information (hostname): stephe
n
[08/27/2014 07:59 PM][pc_autobackup] DEBUG:Config (AUTOBACKUP): uuid = 4a682b0b-
0361-dbae-6155-a24cf40b72dd
[08/27/2014 07:59 PM][pc_autobackup] DEBUG:Config (AUTOBACKUP): server_name = [P
C]AutoBackup
[08/27/2014 07:59 PM][pc_autobackup] DEBUG:Config (AUTOBACKUP): create_date_subd
ir = 1
[08/27/2014 07:59 PM][pc_autobackup] DEBUG:Config (AUTOBACKUP): backup_dir = /da
ta/pic/raw
[08/27/2014 07:59 PM][pc_autobackup] DEBUG:Config (AUTOBACKUP): default_interfac
e = 192.168.1.22
[08/27/2014 07:59 PM][pc_autobackup] INFO:SSDPServer started
[08/27/2014 07:59 PM][pc_autobackup] INFO:MediaServer started
[08/27/2014 08:00 PM][pc_autobackup.ssdp] DEBUG:Received SSDP M-SEARCH for Media
Server from 192.168.1.112:24234
[08/27/2014 08:00 PM][pc_autobackup.ssdp] INFO:Sending SSDP response to 192.168.
1.112:24234
[08/27/2014 08:00 PM][pc_autobackup.ssdp] DEBUG:Sending SSDP response to 192.168
.1.112:24234: 'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age = 1800\r\nEXT:\r\nLOCAT
ION: http://192.168.1.22:52235/DMS/SamsungDmsDesc.xml\r\nSERVER: MS-Windows/XP U
PnP/1.0 PROTOTYPE/1.0\r\nST: urn:schemas-upnp-org:device:MediaServer:1\r\nUSN: 4
a682b0b-0361-dbae-6155-a24cf40b72dd::urn:schemas-upnp-org:device:MediaServer:1\r
\nCONTENT-LENGTH: 0\r\n'
[08/27/2014 08:00 PM][pc_autobackup.ssdp] DEBUG:Received SSDP M-SEARCH for Media
Server from 192.168.1.112:24235
[08/27/2014 08:00 PM][pc_autobackup.ssdp] INFO:Sending SSDP response to 192.168.
1.112:24235
[08/27/2014 08:00 PM][pc_autobackup.ssdp] DEBUG:Sending SSDP response to 192.168
.1.112:24235: 'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age = 1800\r\nEXT:\r\nLOCAT
ION: http://192.168.1.22:52235/DMS/SamsungDmsDesc.xml\r\nSERVER: MS-Windows/XP U
PnP/1.0 PROTOTYPE/1.0\r\nST: urn:schemas-upnp-org:device:MediaServer:1\r\nUSN: 4
a682b0b-0361-dbae-6155-a24cf40b72dd::urn:schemas-upnp-org:device:MediaServer:1\r
\nCONTENT-LENGTH: 0\r\n'
[08/27/2014 08:00 PM][pc_autobackup.ssdp] DEBUG:Received SSDP M-SEARCH for Media
Server from 192.168.1.112:24236
[08/27/2014 08:00 PM][pc_autobackup.ssdp] INFO:Sending SSDP response to 192.168.
1.112:24236
[08/27/2014 08:00 PM][pc_autobackup.ssdp] DEBUG:Sending SSDP response to 192.168
.1.112:24236: 'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age = 1800\r\nEXT:\r\nLOCAT
ION: http://192.168.1.22:52235/DMS/SamsungDmsDesc.xml\r\nSERVER: MS-Windows/XP U
PnP/1.0 PROTOTYPE/1.0\r\nST: urn:schemas-upnp-org:device:MediaServer:1\r\nUSN: 4
a682b0b-0361-dbae-6155-a24cf40b72dd::urn:schemas-upnp-org:device:MediaServer:1\r
\nCONTENT-LENGTH: 0\r\n'
[08/27/2014 08:01 PM][pc_autobackup.ssdp] DEBUG:Received SSDP M-SEARCH for Media
Server from 192.168.1.112:24234
[08/27/2014 08:01 PM][pc_autobackup.ssdp] INFO:Sending SSDP response to 192.168.
1.112:24234
[08/27/2014 08:01 PM][pc_autobackup.ssdp] DEBUG:Sending SSDP response to 192.168
.1.112:24234: 'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age = 1800\r\nEXT:\r\nLOCAT
ION: http://192.168.1.22:52235/DMS/SamsungDmsDesc.xml\r\nSERVER: MS-Windows/XP U
PnP/1.0 PROTOTYPE/1.0\r\nST: urn:schemas-upnp-org:device:MediaServer:1\r\nUSN: 4
a682b0b-0361-dbae-6155-a24cf40b72dd::urn:schemas-upnp-org:device:MediaServer:1\r
\nCONTENT-LENGTH: 0\r\n'
[08/27/2014 08:01 PM][pc_autobackup.ssdp] DEBUG:Received SSDP M-SEARCH for Media
Server from 192.168.1.112:24235
[08/27/2014 08:01 PM][pc_autobackup.ssdp] INFO:Sending SSDP response to 192.168.
1.112:24235
[08/27/2014 08:01 PM][pc_autobackup.ssdp] DEBUG:Sending SSDP response to 192.168
.1.112:24235: 'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age = 1800\r\nEXT:\r\nLOCAT
ION: http://192.168.1.22:52235/DMS/SamsungDmsDesc.xml\r\nSERVER: MS-Windows/XP U
PnP/1.0 PROTOTYPE/1.0\r\nST: urn:schemas-upnp-org:device:MediaServer:1\r\nUSN: 4
a682b0b-0361-dbae-6155-a24cf40b72dd::urn:schemas-upnp-org:device:MediaServer:1\r
\nCONTENT-LENGTH: 0\r\n'
[08/27/2014 08:01 PM][pc_autobackup.ssdp] DEBUG:Received SSDP M-SEARCH for Media
Server from 192.168.1.112:24236
[08/27/2014 08:01 PM][pc_autobackup.ssdp] INFO:Sending SSDP response to 192.168.
1.112:24236
[08/27/2014 08:01 PM][pc_autobackup.ssdp] DEBUG:Sending SSDP response to 192.168
.1.112:24236: 'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age = 1800\r\nEXT:\r\nLOCAT
ION: http://192.168.1.22:52235/DMS/SamsungDmsDesc.xml\r\nSERVER: MS-Windows/XP U
PnP/1.0 PROTOTYPE/1.0\r\nST: urn:schemas-upnp-org:device:MediaServer:1\r\nUSN: 4
a682b0b-0361-dbae-6155-a24cf40b72dd::urn:schemas-upnp-org:device:MediaServer:1\r
\nCONTENT-LENGTH: 0\r\n'
[08/27/2014 08:04 PM][pc_autobackup.ssdp] DEBUG:Received SSDP M-SEARCH for Media
Server from 192.168.1.112:24234
[08/27/2014 08:04 PM][pc_autobackup.ssdp] INFO:Sending SSDP response to 192.168.
1.112:24234
[08/27/2014 08:04 PM][pc_autobackup.ssdp] DEBUG:Sending SSDP response to 192.168
.1.112:24234: 'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age = 1800\r\nEXT:\r\nLOCAT
ION: http://192.168.1.22:52235/DMS/SamsungDmsDesc.xml\r\nSERVER: MS-Windows/XP U
PnP/1.0 PROTOTYPE/1.0\r\nST: urn:schemas-upnp-org:device:MediaServer:1\r\nUSN: 4
a682b0b-0361-dbae-6155-a24cf40b72dd::urn:schemas-upnp-org:device:MediaServer:1\r
\nCONTENT-LENGTH: 0\r\n'
[08/27/2014 08:04 PM][pc_autobackup.ssdp] DEBUG:Received SSDP M-SEARCH for Media
Server from 192.168.1.112:24235
[08/27/2014 08:04 PM][pc_autobackup.ssdp] INFO:Sending SSDP response to 192.168.
1.112:24235
[08/27/2014 08:04 PM][pc_autobackup.ssdp] DEBUG:Sending SSDP response to 192.168
.1.112:24235: 'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age = 1800\r\nEXT:\r\nLOCAT
ION: http://192.168.1.22:52235/DMS/SamsungDmsDesc.xml\r\nSERVER: MS-Windows/XP U
PnP/1.0 PROTOTYPE/1.0\r\nST: urn:schemas-upnp-org:device:MediaServer:1\r\nUSN: 4
a682b0b-0361-dbae-6155-a24cf40b72dd::urn:schemas-upnp-org:device:MediaServer:1\r
\nCONTENT-LENGTH: 0\r\n'
[08/27/2014 08:04 PM][pc_autobackup.ssdp] DEBUG:Received SSDP M-SEARCH for Media
Server from 192.168.1.112:24236
[08/27/2014 08:04 PM][pc_autobackup.ssdp] INFO:Sending SSDP response to 192.168.
1.112:24236
[08/27/2014 08:04 PM][pc_autobackup.ssdp] DEBUG:Sending SSDP response to 192.168
.1.112:24236: 'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age = 1800\r\nEXT:\r\nLOCAT
ION: http://192.168.1.22:52235/DMS/SamsungDmsDesc.xml\r\nSERVER: MS-Windows/XP U
PnP/1.0 PROTOTYPE/1.0\r\nST: urn:schemas-upnp-org:device:MediaServer:1\r\nUSN: 4
a682b0b-0361-dbae-6155-a24cf40b72dd::urn:schemas-upnp-org:device:MediaServer:1\r
\nCONTENT-LENGTH: 0\r\n'

Original issue reported on code.google.com by [email protected] on 28 Aug 2014 at 1:07

Not detect WB150F Camera

What steps will reproduce the problem?
1. pc_autobackup.py --import_camera_config=/path/to/camera or pc_autobackup.py 
--create_camera_config=/path/to/camera

What is the expected output? What do you see instead?
I expected import config or create new, but he say 
[10/02/2014 05:38 PM] Unable to determine camera model


What version of the product are you using? On what operating system?
My camera is WB150F, system Ubuntu 14.04. 

Please provide any additional information below.
if i try transmite he send response but camera not detect PC.


Original issue reported on code.google.com by [email protected] on 2 Oct 2014 at 8:44

Begineer needs help

Hello, i am really interested into use this feature with my Samsung NX20, but i never do any programing, i will appreciate your help to guide me about how to do that works, maybe an short video tutorial can help not jus me but a lot of other users

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.