Skip to content
Georg Lukas edited this page Feb 27, 2023 · 1 revision

Connecting as remote viewfinder to NX camera

Simple yet powerful way to utilize remote viewfinder mode on NX camera without having special app.

This information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. The authors take no responsibility for deleting your baby photographs, bricking your expensive camera or making demons fly out of your nose.

Important notice: The information below is only tested on Samsung NX 3000 smart camera and possibly works somewhere else in the NX ecosystem, try at your own risk.

Communication with NX camera is based on UPnP tech and SOAP for requests. Here are the platform-agnostic steps for establishing connection with your camera.

Connecting to wifi

First thing that needed is connecting to special wifi access point which camera opens when Remote Viewfinder is switched on. If it's not opened via NFC communication, you have this shown on screen, format is as follows:

AP_SSC_[camera model]_0(possibly some other digit)-[first 3 digits of camera mac address]

for example

AP_SSC_NX3000_0-7E:8A:C1

Some platforms like Android and Linux could connect to it programmatically. Fun fact: tap with camera NFC to any NFC-capable device causes camera to go to the specified mode without checking that "app" is actually started. That way, any NFC-capable device may connect to the camera faster.

About commands

When access point is connected, camera awaits for your commands. The best way to push these comand would be http requests or plain sockets. Commands below are presented as raw requests (likely for sockets), higher-level HTTP clients should strip down first header

[HTTP method name] [url part] HTTP/1.0

and HOST header, replacing them with language-specific command like passing full url (HOST+url part) into HTTP client object as well as http method name. Remaing headers should also be passed in language-specific way. Space after headers means payload for request which should be uploaded on connection.

Connection commands sequence

First command in chain would be discovery/pairing.

GET /mode/control HTTP/1.0

HOST: http://192.168.107.1:7788
User-Agent: SEC_MODE_[your mac]
Access-Method: manual
NTS: alive
Content-Length: 0
HOST-Mac: [your mac]
HOST-Address: 192.168.107.11
HOST-port: 7788
HOST-PNumber: none

On that command, if your platform is not known to a camera, it asks for pairing on screen. Later that command is used for camera to identify your platform as known and provide services like viewfinder.


[Camera info] (https://github.com/ge0rg/samsung-nx-hacks/blob/master/smp_2_.xml)


Then we are requesting remote control feature using SOAP request, which is actually POST request with XML payload containing command.

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>

So main things here are #GetInfomation command, which is main key to remote viewfinder functionality and <u:GetInfomation> tag, which represents some parameters that would be sent to the camera. Replacing this command with something else would be a way to send remote commands like "take a shot" and "change aperture". In the request response you will get all the necessary parameters that are set on camera like aperture and flash. Now your camera shows viewfinder on its screen and allows you to do the same on your platform. Camera opens hd video stream on the following url:

http://192.168.107.1:7679/livestream.avi

or its 320x240 (QVGA) version

http://192.168.107.1:7679/qvga_livestream.avi

From that point you are able to send SOAP requests to control your camera while in viewfinder.


[SOAP requests to NX camera - full table] (https://github.com/ge0rg/samsung-nx-hacks/blob/master/smp_3_.xml)