Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
102 lines (73 sloc) 3.35 KB
The EyeFi server listens on port 59278.
On startup the EyeFi card scans the subnet it is currently on and attempts to get an IP address via DHCP.
card -> server = md5sum( mac + upload_key + nonce);
credentialString = "0018560304f8" + "c686e547e3728c63a8f78729c1592757" + "99208c155fc1883579cf0812ec0fe6d2"
server -> card = md5sum( mac + nonce + upload_key);
Step 1)
The EyeFi card attempts to POST to "/api/soap/eyefilm/v1". One of the HTTP headers sent is SoapAction: "urn:StartSession".
The start session request has the follow elements:
transfermode
macaddress
cnonce
transfermodetimestamp
StartSession response:
The following is an actual conversation between the Eye-Fi card and server.
Eye-Fi Card:
POST /api/soap/eyefilm/v1 HTTP/1.1
Host: api.eye.fi
User-Agent: Eye-Fi Card/2.0001
Accept: text/xml, application/soap
Connection: Keep-Alive
SOAPAction: "urn:StartSession"
Content-Length: 407
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="EyeFi/SOAP/EyeFilm">
<SOAP-ENV:Body>
<ns1:StartSession>
<macaddress>0018560304f8</macaddress>
<cnonce>9219c72db0ecbd7e585bb10551f6bc38</cnonce>
<transfermode>2</transfermode>
<transfermodetimestamp>315532800</transfermodetimestamp>
</ns1:StartSession>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Server:
HTTP/1.1 200 OK
Server: Eye-Fi Agent/2.0.4.0 (Windows XP SP2)
Date: Fri, 20 Mar 2009 18:17:09 GMT
Pragma: no-cache
Server: Eye-Fi Agent/2.0.4.0 (Windows XP SP2)
Content-Type: text/xml; charset="utf-8"
Content-Length: 483
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<StartSessionResponse xmlns="http://localhost/api/soap/eyefilm">
<credential>f138ce5977a8962a089b87e17155e537</credential>
<snonce>99208c155fc1883579cf0812ec0fe6d2</snonce>
<transfermode>2</transfermode>
<transfermodetimestamp>1230268824</transfermodetimestamp>
<upsyncallowed>false</upsyncallowed>
</StartSessionResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
GetPhotoStatus allows the Eye-Fi card to query the server as to the current uploaded status of a file. Even more important is that it authenticates the card to the server by the use of the <credential> field. Essentially if the credential is correct the server should allow the filename, filesize, and filesignature to be uploaded.
POST /api/soap/eyefilm/v1 HTTP/1.1
Host: api.eye.fi
User-Agent: Eye-Fi Card/2.0001
Accept: text/xml, application/soap
Connection: Keep-Alive
SOAPAction: "urn:GetPhotoStatus"
Content-Length: 461
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="EyeFi/SOAP/EyeFilm">
<SOAP-ENV:Body>
<ns1:GetPhotoStatus>
<credential>10ff036d3861ed3d1c47eb52d14841d2</credential>
<macaddress>0018560304f8</macaddress>
<filename>CIMG1738.JPG.tar</filename>
<filesize>4518912</filesize>
<filesignature>1077ffb9ac2718b116a33475ad809bf7</filesignature>
</ns1:GetPhotoStatus>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
You can’t perform that action at this time.