Download (zip): http://www.darkeneddesire.com/EyeFiServer/2.0/EyeFiServer-v2.0.zip
I know some people just like to browse around the source without having to download stuff (I'm one of those people):
http://www.darkeneddesire.com/EyeFiServer/2.0/Release/
This new version has the following features:
- The server can now execute an arbitrary command on each uploaded photo. This is a very dangerous feature and should be used with caution. On the other hand it is also very cool. You can have the server FTP files, display them using an image viewer, or even run sorting programs on the images.
- Improved security: the server now generates its own nonces instead of using one that was hard coded. The nonce is based on the random library provided by python. The INTEGRITYDIGEST field is also checked.
- Ability to read settings from a configuration file (there is a included DefaultSettings.ini for reference). The file allows you to configure the listen port, console output, logging, download location, and execute on upload, and upload key.
Getting usage information as to how to specify a configuration file:
C:\EyeFiServer\Release>EyeFiServer.py -h
Usage: EyeFiServer.py [options]
Options:
-h, --help show this help message and exit
-c CONFIGFILE, --config=CONFIGFILE
Path to configuration file (example in
DefaultSettings.ini)
Actually specifying a configuration file:
C:\EyeFiServer\Release>EyeFiServer.py -c DebugSettings.ini

79 comments:
Is there a way to have the pictures deleted after they are uploaded?
Deleted from the computer running the server or deleted from the memory card?
There is no way to delete it from the memory card.
Yeah. The card. That stinks.
I will be loading version 2 today. This will solve many issues I am having with using the Eye-fi card for our emergency first responder aerial surveillance system. Thank you Jeff!
Kevin
I have an application where a device logs data in .CSV format onto an SD card. I would like to use a EyeFi card instead, and have these text files beamed up somewhere. is this possible with your software? thanks!
@jwgorman That is not possible without a firmware hack to the card.
Right now, there is an option to run a program after the upload is complete. This is very handy.
How difficult would it be to call a program when the upload starts? (Something that could be used to show a notification that a photo is starting the upload, or perhaps do something else.)
@Andrew It's possible but not sure why you'd want to do so. The upload is in a tar format and may or may not complete. What kind of use case are you thinking about?
The official Eye-Fi software shows a preview of the image as it is loading. I was thinking about having a similar thing under Linux. (Even if it just says 'An image is uploading' and doesn't have a thumbnail to show for it.)
I see. I have a TODO in the code actually:
# TODO: Implement some kind of visual progress bar
You will see that the code is commented out right now because I am not entirely sure how I want to implement this feature.
on another note, question about SDIO - do you think device would present information about sd card disk writes on the COM port as serial events?
http://www.spectec.com.tw/sdrs232.htm
just for context, my application is this - trying to get the live data recorded (usually) on an sd card by this device:
http://english.ivt-hirschau.de/content.php?parent_id=CAT_64&doc_id=DOC_220
it is a solar controller that makes a file called solarlog.txt and it's in comma or tab delimited format on the SD card. I would like to intercept that file, and log it directly into a database. that software we have already written to accomodate a number of controllers - here is the site:
http://www.solarnetwork.net/
thanks, John
Is it possible to use this with multiple EyeFi cards?
@Andrew This will probably not work out of the box with multiple Eye-Fi cards. I only own one card so can't really test.
I've been considering buying an Eye-Fi at some point, but the current closed nature of the device has made me a little unsure so far (at the price).
However your server looks very interesting. Looking at something Dave Hansen said had me wondering, what about a PythonCE implementation for mobile phones?
Bob
@Bob H
I'd love to port this to mobile phones but the reason this server works is because the Eye-Fi card connects to an access point. There are exactly zero phones on the market place right now that support acting as an access point.
The only phone I know if that even has a remote possibility of this is the OpenMoko phone in which you'd have to write drivers to have it function in AP mode. This phone is really on its deathbed though because of Android.
You're a clever dude Jeff. I'm Eying the Eye-Fi to help streamline data entry for out non-profit organisation. We receive donated furniture which we data enter into a web-based inventory management app. Each item requires a (reasonably high-res) photograph which we currently have to download to a fileshare from the camera and at a later time painstakingly associate each one with its inventory record via the web interface (this is stupid). I'm looking for ways to get a decent digital camera to provide an image to a web applicaiton in one hit right at the point of data entry. Can you see a way forward using Eye-Fi... or even have any suggestions for things I could investigate?
@matt
Depending on the resolution of the image (along with other factors, like proximity to the wireless access point since the eye-fi's wireless isn't as strong as a normal laptop's wireless) it may take up to a couple minutes before the image is fully uploaded (with either Jeff's server or the official one). This may or may not affect your entry of data. (Perhaps write it so that it associates the photo after you add the details based on exif time or something.)
@Matt
Here is a scenario that could work:
1. User brings up the web-based inventory management app.
2. User clicks a button and the web based app waits for an image.
3. When image is uploaded the web based application associates the image to the correct inventory description.
How this would happen technologically:
I own a small netbook (an MSI Wind). One of the best things about this netbook is that it comes with an RALink wireless card that supports access point mode in windows. What this means is that you can essentially have a mobile access point. What I did was setup this netbook as an access point and run my Eye-Fi software. When the EyeFi card in my camera starts up it connects to the netbook and starts uploading photographs.
My scenario would be having a person walking around with the netbook and camera. They would bring up the inventory management app and click a button when they were ready to upload a photograph. They would then snap a quick photo. My software would capture it within 1-2 minutes and associate it to the inventory item. I imagine this use case would work because the person would be filling out details about the item as they were waiting for the photograph to finish transferring.
The pluses to this is that you can do any sort of photograph transformation inline. Photos are never deleted off the SD disk so you can do it manually later if you need to.
I would be interested in working on this as a side project (sounds like fun). If you want some help feel free to e-mail me! :)
The Windows Mobile phone can work as an access point. You just need to install a piece of software called wmwifirouter. http://www.wmwifirouter.com/
On a side note I tried your script on my linux box and it starts up but does not receive any files. I opened the firewall port and still no love. I double checked the upload key. How does the card know to send the pics to the server? Is there anything else I should do?
@cochran242
Please post a log or enable logging.
Thanks for helping!!! It would noy let me paste in my log so I have uploaded it here:
http://rustyfenders.com/Log.txt
Thanks again
@cochran242
Basically what is happening is that the card does not trust the server. This usually happens because the UploadKey is incorrect.
Are you sure you got the right upload key?
Ok, I have uploaded the Settings.xml file from my windows box here: http://rustyfenders.com/settings.txt
and I have uploaded a new log here without editing (looked like it reattempted):
http://rustyfenders.com/Log.txt
Again, thank you for your time
@cochran242
Did you recently upgrade the firmware? What kind of card do you have? EyeFi might have changed something and I just didn't pick up on it. It doesn't seem like anything is blatantly wrong. Odd.
Do you have chat? Go ahead and e-mail me directly your screen name. My e-mail is on this site.
-Jeff
Ack. I just saw that Eye-Fi released a new firmware. Need to check it. Probably the cause.
The new Eye Fi firmware adds an option called "Relayed Uploads". If this is enabled the Eye-Fi server on this site will not work out of the box. The easy fix is to disable it. I will release a new version shortly that will take care of all this.
The detailed answer is that the relayed uploads feature adds a new transfermode. This transfermode, which happens to be 3, is sent by the card to the server. The problem is I hardcoded a transfermode of 2. I just need to clean up the code and make sure I send back whatever transfermode the card sends me.
Is there a way to have the server only upload images from the eye-fi card that have been "tagged" protected in camera?
That's the biggest problem using an eye-fi card is it's too slow when uploading all the images, but if it could only upload selected images it would really be useful.
Thanks for all your work.
Rob
@sorboimages Since the sending of images is completely handled by the card and not the server, that wouldn't be something that this could do. I'd recommend checking the official Eye-Fi forums for your suggestion (or posting it if you can't find it) since it would have to be done on the card's firmware.
@Andrew Yes, I was just wondering if the server could accept or reject a download based on the "tagged" meta data or is that just not doable?
Thanks for your reply.
i dream of this thing on a synology NAS ...
fred
If you are getting the following error:
TypeError: stat() argument 1 must be (encoded string without NULL bytes), not str
then you are most likely running Python 2.5.1 or less. This error is the result of a bug in the tarfile library that I use. In Python 2.5.2 or later this is fixed.
Link to the issue where people talk about it on the mailing list:
http://mail.python.org/pipermail/tutor/2008-July/063075.html
-Jeff
Jeff, I was hoping to use your setup out in the field, to beam pictures directly to my laptop via AP, with no Internet connection available. Is this possible? If so, I am unable to get it to work that way. Looks like the script is making calls to specific web sites. Help!
Jeff, I was hoping to use your setup out in the field, to beam pictures directly to my laptop via AP, with no Internet connection available. Is this possible? If so, I am unable to get it to work that way. Looks like the script is making calls to specific web sites. Help!
@eeyago
What seems to be the problem? The script does not call out to any websites.
In general to debug I need to know what your setup. Also the logs would be a great help.
@Jeff,
The log file is located here:
http://www.crazyclix.com/temp/EyeFiServer.log
At home, my network is WEP secure connected to the Net and the upload works fine. I bought a cheap router (Dynex) and setup the wireless config the same, but fails. However, as stated previously, this new router is not connected to the Net.
Thanks and look forward to what you find out. PS: Server ver 2.0.4.
@eeyago
The Eye-Fi card does seem to find the server but doesn't want to upload to it. Double check that you have relayed upload disabled (using the standard Windows tool). Make sure you have it configured to upload to a computer (you can specify any destination).
Let me know what you find.
This script is working great. I have one feature request. If this script could place files in subfolders based on the picture taken date. Thanks!
@Jeff,
Apparently, I was using an older version of your code. I upgraded to the latest version, but still unable to successfully connect. Log in same place: http://www.crazyclix.com/temp/EyeFiServer.log
The relayed upload is disabled thru the EyeFi config online, but don't know where to check otherwise. Please advise.
Thanks!
Would anyone care to write a short tutorial on how to get this up and running for those of us who aren't computer experts? It looks like a great idea, and I'd love to try it, but I don't really know how Python works, or how to get up and running so that I can transfer photos via ad-hoc.
is it possible to use eye-fi standalone server and used relayed upload?
Or have something running on a server on the internet and whenever I take a picture and get in coverage for a public access point the pictured would be uploaded to my own server. Either directly or via eye.fi or something like that...
hi,
because you now well know the eye-fi, do you know if there is a way to configure it to use it like on wayport but not on wayport ? see : http://f28f2.tk and http://n73aq.tk
regards
Is there any of you using this on an iphone?
I managed to install python using Cydia on my jailbroken iphone, then connect to the iphone using ssh and download and run the Eye Fi Standalone Server, but I don't have a Eye-Fi card, so I don't know if it *really* works! ;)
It would be nice since it would allow to transfer the photos directly on the iphone. Once it's done, then the iphone becomes a great photo manager. It can even post pictures on the Net using the 3G network!
I guess I'll buy an Eye-Fi card and see for myself... :)
Do you know how the eye-fi card finds the computer running the server ? I would like to run the server on a completely different computer and expect that it will not "just work" ...
@gifford
The Eye-Fi card actually does a scan of the subnet in which it obtains the DHCP address.
Therefore running the Eye-Fi server on a different computer really will "just work"!
@gifford
In addition to Jeff's comment, make sure you only have one eye-fi server running on the network.
@{Jeff Tchang, Andrew}
Thanks for the insight! I guess Eye-Fi actually makes it pretty easy.
@Jeff Tchang. I've got a few questions about your standalone server:
1. Will it work for any file type or just images and video?
2. If not, is there a way to disable the code that prevents it from checking the file type or can we make any file look like the correct file type with?
I appreciate any help.
Thanks,
Daniel
Can I embed your code into another application?
Thanks again!
@Daniel It should work with any type of file that the Eye-Fi card sends. This software has no control over what the card does or does not send.
Thanks, I'm guessing that it's limited to image and video files since that's what the Eye-fi card would send. Has anyone tried transferring a PDF file or something completely different from a media file?
Thanks again.
Hmmm... I can run old script fine but with new script, when receiving image I get:
File "/home/jon/nbprojects/NewPythonProject/src/configobj.py", line 580, in __getitem__
val = dict.__getitem__(self, key)
KeyError: 'Card'
I am running Python 2.6.2 and relevant config is same directory and I believe correct.
Not sure what my problem is but just wanted to say I really appreciate writing / releasing this software.
@Jonathan
What do the logs say? More than likely you didn't specify a configuration file or you forgot to edit it and make sure there is a [Card] section.
-Jeff
Oops forgot to specify config file - my bad! Yeah going fine.
Would be nice idea to put out help message if no parameters specified?
Thanks.
Hi Jeff,
Can multiple Eye-Fi cards download at the same time to the same computer or does it only allow for one Eye-Fi card to download at a time?
Thanks,
Daniel
@Daniel: The code included with this post does not support more than one card. I have altered the code to allow for multiple cards. I'll try to get it up in a few hours. (Running out now, and will have to find it.)
Thanks !!! I appreciate it.
Hi Andrew,
Can you tell me where I can find the code that allows the multiple cards to download simultaneously?
Thanks,
Daniel
@Daniel
Here are the changes that I made to the original code:
http://sandbox.ahotw.com/eye-fi/multipleCards.txt
@Daniel
Andrew e-mailed this a while back but I never actually incorporated the change. Just have been too busy with other stuff. That said the project is on github if anyone wants to work on it. Here is the change:
Config File:
In the section [Card], for each card put the mac address and the upload key (mac address is also in the file where the uploadkey is found).
[Card]
[[001856xxxxxx]]
UploadKey=c686e547e3728c63a8f78729c1592757
[[001856xxxxxx]]
UploadKey=c686e547e3a8f78729c15927573728c6
EyeFiServer.py:
396c396
< self.server.eyeFiConfiguration['Card']['UploadKey'])
---
> self.server.eyeFiConfiguration['Card'][handler.extractedElements["macaddress"]]['UploadKey'])
482c482
< credentialString = handler.extractedElements["macaddress"] + self.server.eyeFiConfiguration['Card']['UploadKey'] + self.server.serverNonce;
---
> credentialString = handler.extractedElements["macaddress"] + self.server.eyeFiConfiguration['Card'][handler.extractedElements["macaddress"]]['UploadKey'] + self.server.serverNonce;
534c534
< eyeFiUploadKey = self.server.eyeFiConfiguration['Card']['UploadKey']
---
> eyeFiUploadKey = self.server.eyeFiConfiguration['Card'][handler.extractedElements["macaddress"]]['UploadKey']
Cool, thanks guys; much appreciated.
Hey Jeff awesome script but I am have some questions about which eye fi card to use. I have both versions (basic and pro). The pro uses the ad hoc feature and the basic does not. Is your script applicable to both and finally when I run the regression.py in IDLE python I get an error which I guess is my major problem. I have not yet had a successful upload and was wondering If I missed something.
@neociano This script was written prior to the release of the Pro cards, and I doubt it's been tested with them.
seems there a lot activity backon this thread ! nice !
does anybody tried to use that on a synology nas ?
++
fred
@Andrew Thank you for your quick response! I am still having difficulty setting this up. I have the defaultsettings.ini configured correctly, and I am running the eyefiserver.py with the -c command but I just get no response from the card. I got the uploadkey error but once I changed the key I get nothing. I also tried running the recession test and it said it couldn't upload. I am using python 2.63 for winxp and a Nikon D40 to capture. Any help would be greatly appreciated as I need this technology for my current business,
Thanks again!
@neociano
I have had some people tell me that the pro card works. If you post a log I can troubleshoot what is going on.
@Jeff Will do! Thank you very much
@Jeff these are my configuration files....http://rapidshare.com/files/294990568/Settings.xml
http://rapidshare.com/files/294990437/DefaultSettings.ini
http://rapidshare.com/files/294990221/log.txt
Thanks again for all your help in advance
Regards Neociano
I hope I didn't confuse anyone this is still neociano! lol for some reason the blog changed it to my real name..if anyone could help me with my config settings I would greatl appreaciate it!
@Everyone (lol) I would like to confirm that the script works for both regular and pro cards. The pro card is a bit faster and I am currently testing if it works ad hoc with no internet connection, as of right now I have only gotten the script to work when connected to my home wifi internet with either card.
@Jeff Thanks again for all your help, You are the man.
Jeff,
Just got my pro card to adhoc to jaunty running your EyeFiServer v2.0. Thanks for all your hard work!
Craig
Ok 1 last question I have a belkin router which has a access point feature, I just cannot get it configured correctly....I have tried to connect the card to the router (with no internet access)with no success. If any one has I would love to discuss how you did it..Thanks Neociano
I've never had issues with setting up a card to use an access point. You will need to use the eye-fi manager to set the card up with the access point and give the card the ssid (wireless network name) and any encryption keys that might be in place.
Dear Jeff,Andrew,
(Sorry to repeat a question.)
1. Will it work with all file types(mp3,avi,mpg,pdf etc)
2. Can we write data on Card using wifi server.
*This hack will be used to power my Car stereo mp3 player, My Sony HDTV with USB(EyeFi hooked to card reader)
Rajadurai:
1. No (perhaps if you found a way to make custom firmware for the card).
2. No (the only way to write data *to* the card is via normal means).
@Andrew
Thanks
I'm working on a HARDWARE project.
WLAN NAS FlashDrive. So i was intrested in Modding EyeFi. When i came across the standalone server, i geussed that they were controlled at server.
Thanks.
Post a Comment