Wi-Fi Turntables

Wi-Fi support#

Some of our turntables are shipped with built-in Wi-Fi module (currently we are using ESP8266).

Turntable firmware will constantly try to connect to configured Wi-Fi network. When connected, it will send UDP broadcast packet on port 4242 containing string PhotomechanicsWiFiTurntable which can be used for detection.

When you detect presence of Wi-Fi turntable in your network, you can start communicating with it using usual commands by opening TCP connection on port 4242 for discovered device IP. Note that this connection is less stable than USB and has longer response delays.

If some firewall software is used in your network, make sure that it doesn't block TCP and UDP packets from/to turntable.

You can configure network settings by using ExecuteCustomEsp8266CommandAppendNewLine command when turntable is connected to USB. Correct AT commands should be sent to device.

Client mode#

Turntable will be connected to your network. Send following commands (no delay between them needed):

AT+CWMODE=1
AT+CWJAP="{SSID}\",\"{Password}\""

Host mode#

AT+CWMODE=2
AT+CWSAP="{SSID}\",\"{Password}\",{Channel},{Encryption}"

When using our API it will look like this (this is how it is done in our Photo3D Studio 2):

public enum WiFiHostEncryption
{
[LocalizedEnum("Open (no protection)")] Open = 0,
[LocalizedEnum("WPA_PSK")] WpaPsk = 2,
[LocalizedEnum("WPA2_PSK")] Wpa2Psk = 3,
[LocalizedEnum("WPA_WPA2_PSK")] WpaWpaPsk = 4
}
if (IsHost)
{
await wiFiSettingsProvider.ExecuteCustomEsp8266CommandAppendNewline("AT+CWMODE=2");
await wiFiSettingsProvider.ExecuteCustomEsp8266CommandAppendNewline(
$"AT+CWSAP=\"{SSID}\",\"{Password}\",{Channel},{(Int32) Encryption}"
);
}
else
{
await wiFiSettingsProvider.ExecuteCustomEsp8266CommandAppendNewline("AT+CWMODE=1");
await wiFiSettingsProvider.ExecuteCustomEsp8266CommandAppendNewline(
$"AT+CWJAP=\"{SSID}\",\"{Password}\""
);
}

If needed, you can execute other AT commands. Please refer to ESP8266 documentation for commands reference.