ge0rg / samsung-nx-hacks

Firmware Hacks for the Linux-based Samsung NX mirrorless camera models (NX300, NX2000, ???)
119 stars 12 forks source link

Taking shots with the nx3000 #10

Open algemir opened 7 years ago

algemir commented 7 years ago

Hello, I should start by stating that I do not know much about sending/receiving requests. I still somehow managed to pair my raspberry pi with my nx3000, and start viewfinder using the following request:

POST /smp_4_ HTTP/1.0

Content-Type: text/xml
HOST: http://192.168.107.1:7676
SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#GetInfomation"

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
    <u:GetInfomation xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
        <GPSINFO>UNKNOWN</GPSINFO>
    </u:GetInfomation>
</s:Body>
</s:Envelope>

In the wiki about the nx3000 it is then explained that a similar request can be used to take a shot for instance, by just replacing "GetInformation" by the correct action. I tried "Shot" and "ShotWithGPS" (from smp3.xml) but it doesn't work. Could anyone help me and tell me what request should be use to command the camera to take a shot ? Thank you.

Nikolas-LFDesigns commented 7 years ago
POST /smp_3_ HTTP/1.0

Content-Type: text/xml
HOST: http://192.168.107.1:7676
SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Shot"

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
    <u:Shot xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
    </u:Shot>
</s:Body>
</s:Envelope>

What's changed:

UPD: checked my findings again, you should still use smp4 as a link, while smp3 is a capabilities-checker protocol