Eye-Fi 4 Linux

Help with issues related to the Eye-Fi Manager

Eye-Fi 4 Linux

Postby Raptox_BE » Wed Aug 27, 2008 9:37 am

While investigation how to write my own receiver in .net I came upon next site

http://dave-hansen.blogspot.com/2008/01/wine-patch.html

These guy's made an actual Eye-Fi picture receiver in cgi..that runs on linux... I guess it works, cause this code made developing my .net application possible.

Tool itself : http://www.eyefitools.org/eyefitools-0.01.tar.gz
Raptox_BE
 
Posts: 9
Joined: Thu Aug 14, 2008 2:07 am
Location: Antwerp - Belgium

Re: Eye-Fi 4 Linux

Postby trjonescp » Wed Nov 19, 2008 2:38 pm

Raptor,
Any updates to this? 0.01 release?

Eye-Fi,
You still haven't realeased any kind of solution for Linux users? I'd love to buy 2 or 3 of these for family members this X-mas, but they are all using Ubuntu Linux.
trjonescp
 
Posts: 1
Joined: Wed Nov 19, 2008 2:23 pm

Re: Eye-Fi 4 Linux

Postby cdavies » Tue Nov 25, 2008 8:46 pm

Being the author of that there piece of software, I can tell you there isn't currently an update for it. One of the previous firmware updates stopped the card talking to perl's libwww daemon for reasons I can't figure out. Also, they changed the authentication algorithm, if anyone is interested the new algorithm is (last time I checked):

card -> server = md5sum( mac + upload_key + nonce);
server -> card = md5sum( mac + nonce + upload_key);

I've got a lot of work to do at the moment, but some day I'll write some software that other people to use (though, you'll probably get some smartphone software before you see some desktop software from me.) To be honest, it'd be about five minutes work to hack this up in PHP or turn the Perl I wrote in to CGI for those willing to run Apache or Boa or summit.
cdavies
 
Posts: 47
Joined: Tue Nov 25, 2008 8:36 pm

Re: Eye-Fi 4 Linux

Postby jtchang » Wed Jan 07, 2009 12:42 pm

For those looking around for a standalone server for Eye-Fi I went ahead and implemented a basic one here:

http://returnbooleantrue.blogspot.com/2 ... erver.html

Comments are appreciated.
jtchang
 
Posts: 11
Joined: Sun Aug 24, 2008 8:19 pm

Re: Eye-Fi 4 Linux

Postby berend » Wed Jan 07, 2009 1:08 pm

Jeff,

(And Chris, of course), great work! I posted some technical feedback on your blog.

For the record, the change to the authentication scheme should be credited to Chris because he pointed out a replay attack scenario that was possible with the original version once upon a long time ago. He's being humble in saying "they changed [it]."

Berend
User avatar
berend
Eye-Fi'er
 
Posts: 844
Joined: Mon Oct 01, 2007 11:09 am

Re: Eye-Fi 4 Linux

Postby smbgaiden » Thu Jan 29, 2009 9:33 pm

Hi Gents,

You guys have come a long way in figuring out how to make the most of the card! I haven't located much in the way of firmware replacement (like the ZipIt is allowing these days). Reason why firmware modification looks interesting is because Ad Hoc is a hotly requested feature and is still unsupported. The underlying chip supports it, but I can't know Eye-Fi agreement with Atheros and whether Eye-Fi decided to just remove some code or library blocks to conserve space.

From: http://www.atheros.com/pt/bulletins/AR6 ... lletin.pdf

Wireless Module Interface (WMI) – High-level API to allow setup and
configuration of the networks from the host
- WLAN mode configuration (Infrastructure or Ad-Hoc)
- Regulatory control
- Power consumption vs. performance oriented modes
- Listen Interval

The use case with a local server running from a connected phone, minus the MiFi unavailable hardware, is widely desirable.
smbgaiden
 
Posts: 1
Joined: Thu Jan 29, 2009 5:37 pm

Re: Eye-Fi 4 Linux

Postby cdavies » Mon Mar 16, 2009 10:52 am

In an effort to make this thread something of a one stop shop for third party eye.fi software info, I'll add this here.

I spent yesterday reverse engineering the integrity digest field in the upload process, with a little help from Berend. For those who have third party server software, the digest is calculated as follows:

for every 512 byte block of the tar file, calculate the TCP checksum of that block and concatenate the results, to that append the upload key and calculate the MD5 sum of the whole thing.

Here's some Perl code to calculate the checksums. If there is ever a point in the future where something other than a tar file is uploaded, this will need to be updated to pad input that has an odd number of bytes.

Code: Select all
sub calculate_tcp_checksum($)
        {
        my ($block) = @_;

        my $val = 0;
        my @words = unpack "S*", $block;
        foreach (@words)
                {
                $val += $_;
                }

        while ($val >> 16)
                {
                $val = ($val >> 16) + ($val & 0xFFFF);
                }

        $val = ~$val;
        return $val & 0xFFFF;
        }   
cdavies
 
Posts: 47
Joined: Tue Nov 25, 2008 8:36 pm

Re: Eye-Fi 4 Linux

Postby eyefi4rohit » Mon Mar 30, 2009 4:46 am

hi,

Can anyone port the python standalone server script to "C" language,so that it will be useful to use it on some embedded system.

Thanks,
rohit
eyefi4rohit
 
Posts: 4
Joined: Mon Mar 30, 2009 4:39 am

Re: Eye-Fi 4 Linux

Postby jtchang » Mon Mar 30, 2009 5:22 pm

Hi Rohit. Do you have an embedded system target in mind? The work to port the standalone server to straight C is a lot of work.
jtchang
 
Posts: 11
Joined: Sun Aug 24, 2008 8:19 pm

Re: Eye-Fi 4 Linux

Postby eyefi4rohit » Tue Mar 31, 2009 3:39 am

hi,

ya we have embedded system target that supports wifi with AP capability.So we are planning to port your python script to simple "C".Plese let us know what are the ground work we have to do ?

Can we use socket programming to duplicate the functionality of the standalone server ?

we expected that we have to do lot of work to port the code.But we are ready get our hands dirty.Thats why we need your help to port the code.

Regards,
Rohit
eyefi4rohit
 
Posts: 4
Joined: Mon Mar 30, 2009 4:39 am

Re: Eye-Fi 4 Linux

Postby hacker » Thu Apr 02, 2009 9:01 am

Would C++ suffice? I've done it in c++, can be done in C, of course, if you really need to. Take a look at http://kin.klever.net/iii/

Love,
H
hacker
 
Posts: 27
Joined: Thu Apr 02, 2009 6:49 am

Re: Eye-Fi 4 Linux

Postby jtchang » Thu Apr 02, 2009 12:19 pm

What is the difference between the integrity digest and the file signature? Is the file signature just an MD5 hash over the photograph?
jtchang
 
Posts: 11
Joined: Sun Aug 24, 2008 8:19 pm

Re: Eye-Fi 4 Linux

Postby cdavies » Thu Apr 02, 2009 1:22 pm

As far as I can gather, the file signature isn't a checked quantity and thus I can't figure out how it is computed without reverse engineering the card firmware. I'm going to hazard a guess that it is used to uniquely identify the photo for purposes of duplicate detection. I don't believe that it is a security measure per se, so I wouldn't worry terribly much about it.
cdavies
 
Posts: 47
Joined: Tue Nov 25, 2008 8:36 pm

Re: Eye-Fi 4 Linux

Postby jtchang » Thu Apr 02, 2009 8:50 pm

Just thought I'd let everyone know that I posted a new version and would appreciate any comments:

http://returnbooleantrue.blogspot.com/2009/04/eye-fi-standalone-server-version-20.html

Thanks!
jtchang
 
Posts: 11
Joined: Sun Aug 24, 2008 8:19 pm

Re: Eye-Fi 4 Linux

Postby eyefi4rohit » Fri Apr 03, 2009 3:56 am

hi,

"Hacker".Thanks for helping us with a C++ version of a server for eyefi card.I went through the link which you have sent.I found that we need gSOAP to build the code.Is there any alternative for SOAP.Because our embedded platform doesn't support SOAP.Our embedded platform supports TCP/IP and socket libraries.

Right now we don't want to upload the photos to a particular server.We just need to only download the photographs from the eye-fi card and store it temporarily in memory.

Can we establish the above by simply using the socket libraries.?

Please help.....

Regards,
Rohit
eyefi4rohit
 
Posts: 4
Joined: Mon Mar 30, 2009 4:39 am

Re: Eye-Fi 4 Linux

Postby cdavies » Fri Apr 03, 2009 4:22 pm

Well, someone has to say it.

Rohit, you don't even seem to have done the basic due diligence on how the card works. Either reading the code of one of the various bits of software linked from this thread, or observing a session in a packet sniffer like wireshark will tell you everything you need to know. It really isn't that complicated.
cdavies
 
Posts: 47
Joined: Tue Nov 25, 2008 8:36 pm

Re: Eye-Fi 4 Linux

Postby hacker » Sat Apr 04, 2009 5:34 pm

cdavies wrote:for every 512 byte block of the tar file, calculate the TCP checksum of that block and concatenate the results, to that append the upload key and calculate the MD5 sum of the whole thing.


Before I get to try it, I can't really figure out what exactly is concatenated? The result of the function as is (decimal representation?), hex, binary?

And, if it works fine, how do I give you proper credits? (name or email or link, all of them, some of them, etc.)

Love,
H
hacker
 
Posts: 27
Joined: Thu Apr 02, 2009 6:49 am

Re: Eye-Fi 4 Linux

Postby cdavies » Sun Apr 05, 2009 3:26 am

I'll copy and paste what I sent to Jeff:

[T]he checksums are concatenated as binary. Now, since the TCP checksum is deliberately designed to be endianess independent, you need to write the checksums in the same endianess as they were calculated, if that makes any sense. I guess the best way to explain would be with some code... here's some perl I used for my testing:

Code: Select all
    sub calculate_tcp_checksum($)
            {
            my ($block) = @_;

            my $val = 0;
            my @words = unpack "S*", $block;
            foreach (@words)
                    {
                    $val += $_;
                    }

            while ($val >> 16)
                    {
                    $val = ($val >> 16) + ($val & 0xFFFF);
                    }

            $val = ~$val;
            return $val & 0xFFFF;
       }


    sub checksum_data_by_block($)
            {
            my ($data) = @_;

            my @ret = ();
            my $block_size = 512;
            my $len = length $data;
            my $offset = 0;
       
            while ($offset < $len)
                    {
                    my $block = substr $data, $offset, $block_size;
                    push @ret, calculate_tcp_checksum($block);
                    $offset += $block_size;
                    }

       return @ret;
       }

    sub calculate_integrity_digest($)
       {
       my ($data) = @_;

       my @checksums = checksum_data_by_block($data);
       my $sumblock = pack "S*", @checksums;
       my @bytearray = ();
       append_hex_string_to_byte_array($upload_key, \@bytearray);
       my $key = pack "C*", @bytearray;   

       return md5_hex($sumblock . $key);
       }



Note the data is packed and unpacked using S* for little endian shorts. It would work just as well, replacing both with n* for network byte order.

Oh, and I wouldn't worry terribly much about crediting me with anything. If you really feel strongly about it, the best thing you can do is link back to this thread so other people know where to get the information from.
cdavies
 
Posts: 47
Joined: Tue Nov 25, 2008 8:36 pm

Re: Eye-Fi 4 Linux

Postby hacker » Sun Apr 05, 2009 7:49 am

Thanks for the description. Worked like a charm, suprisingly, at first attempt ;-)

cdavies wrote:Oh, and I wouldn't worry terribly much about crediting me with anything. If you really feel strongly about it, the best thing you can do is link back to this thread so other people know where to get the information from.


Heh, I knew something like that was coming ;-) I would say I feel strongly about using your work and not giving credits, so, perhaps, I need that more than you do. Anyway, I complied to your wish.

Thanks again.

Love,
H
hacker
 
Posts: 27
Joined: Thu Apr 02, 2009 6:49 am

Re: Eye-Fi 4 Linux

Postby alexeena » Thu Apr 09, 2009 11:24 pm

How do you install ubuntu linux on your PC WITHOUT gettig rid of Windows Vista or XP? Okay, I would like to have linux and Windows Vista both running on one machine. I DON'T want to get rid of Windows Vista, so what do I do after I download linux. I would also like to do the same with XP too. And please NO bad mouthing about windows or windows vista. I happen to like Microsoft and Windows Vista and I DON'T want to get rid of it.
alexeena
 
Posts: 2
Joined: Wed Apr 08, 2009 9:55 pm

Re: Eye-Fi 4 Linux

Postby cdavies » Fri Apr 10, 2009 12:16 am

This isn't really the right forum to ask on, but the short answer is defrag the windows drive then follow some advice like this: http://www.howtoadvice.com/ResizePartition/
cdavies
 
Posts: 47
Joined: Tue Nov 25, 2008 8:36 pm

Re: Eye-Fi 4 Linux

Postby colindstephenson » Fri Apr 10, 2009 5:03 am

like cdavies says, its not really the place but if you go with Ubuntu 8.x thay have an option to unstall via Windows using wubi. Never tried it but gets reasonable reviews. Other option is to drop another disk into your machine.

Other option is virtualisation (if you machine has plenty of RAM). Vitualbox is pretty good, a lot lighter than VMWare if you are just wanting to run a VM.
colindstephenson
 
Posts: 45
Joined: Fri Jan 09, 2009 7:20 am

Re: Eye-Fi 4 Linux

Postby Francois » Mon Apr 20, 2009 7:28 am

alexeena wrote:How do you install ubuntu linux on your PC WITHOUT gettig rid of Windows Vista or XP? Okay, I would like to have linux and Windows Vista both running on one machine. I DON'T want to get rid of Windows Vista, so what do I do after I download linux. I would also like to do the same with XP too. And please NO bad mouthing about windows or windows vista. I happen to like Microsoft and Windows Vista and I DON'T want to get rid of it.



I haven't tried it but I know there's something called Cooperative Linux (http://www.colinux.org/) which allows you to run both a Ubuntu based Linux and Windows Xp without repartitioning since they both run concurrently.
Francois
 
Posts: 24
Joined: Sat Mar 07, 2009 8:52 am

Re: Eye-Fi 4 Linux

Postby stasiana2 » Mon Jul 06, 2009 12:41 am

Hi folks -- I've been reading on the source code. One item of interested me -- upsync. What is this and why do the Python and C++ servers hardcode this to "false" on the StartSession request?
stasiana2
 
Posts: 2
Joined: Mon Jul 06, 2009 12:38 am

Re: Eye-Fi 4 Linux

Postby hacker » Thu Jul 16, 2009 1:27 pm

stasiana2 wrote:Hi folks -- I've been reading on the source code. One item of interested me -- upsync. What is this and why do the Python and C++ servers hardcode this to "false" on the StartSession request?


I have done it due to the lack of knowledge what it is and how to implement it and this is because I don't need to ;-)

Love,
H
hacker
 
Posts: 27
Joined: Thu Apr 02, 2009 6:49 am

Re: Eye-Fi 4 Linux

Postby chairman » Wed Jul 22, 2009 10:51 am

Is anyone working on any software that can download pictures from eye.fi so that you can download pictures on the home computer when you are out traveling? Or does anyone have any information about api.eye.fi
chairman
 
Posts: 2
Joined: Wed Jul 22, 2009 10:43 am

Re: Eye-Fi 4 Linux

Postby berend » Wed Jul 22, 2009 11:31 am

If you run an open-source Gallery 2 (or compatible) server on your home computer, you can configure it as your online destination and Eye-Fi's servers will happily forward your photos to it even while you're away from home. Alternatively, if your computer is always on and is running the Eye-Fi Manager software, you can enable "relayed uploads" and if you're away from home, your photos can be routed through Eye-Fi's servers, allowing your home computer to download them.

Berend
User avatar
berend
Eye-Fi'er
 
Posts: 844
Joined: Mon Oct 01, 2007 11:09 am

Re: Eye-Fi 4 Linux

Postby chairman » Thu Jul 23, 2009 3:36 am

berend wrote:If you run an open-source Gallery 2 (or compatible) server on your home computer, you can configure it as your online destination and Eye-Fi's servers will happily forward your photos to it even while you're away from home. Alternatively, if your computer is always on and is running the Eye-Fi Manager software, you can enable "relayed uploads" and if you're away from home, your photos can be routed through Eye-Fi's servers, allowing your home computer to download them.

Berend


I will check out Gallery 2(just upgraded to Gallery 3 and that doesn't work so I will see what I can do). Running the Eye-Fi manager is not possible since I'm using linux...
chairman
 
Posts: 2
Joined: Wed Jul 22, 2009 10:43 am

Re: Eye-Fi 4 Linux

Postby alundgren » Mon Aug 03, 2009 9:19 pm

I would like to have my linux server receive the image updates from Eye-fi rather than a windows desktop.

I setup the EyeFiServer then I built and ran iiid but neither one of them seemed to receive any images that are pending transfer from eye-fi. (Not at the same time, the python 1st, then the binary.

I configured a target directory and took the upload key from my windows machine.

Should these do what I want, or are these used for receiving images when an eyefi card is connected to the linux box? :?:
alundgren
 
Posts: 7
Joined: Mon Aug 03, 2009 10:10 am

Re: Eye-Fi 4 Linux

Postby cdavies » Tue Aug 04, 2009 3:10 am

Yes, but you also need to make sure you've updated the card firmware to the latest version. Oh, and ensure the Eye-Fi manager isn't also running on a windows machine on your network.
cdavies
 
Posts: 47
Joined: Tue Nov 25, 2008 8:36 pm

Next

Return to Eye-Fi Manager

Who is online

Users browsing this forum: No registered users and 4 guests