Open sepp89117 opened 5 years ago
I have it done. The key is UDP
Neat, I could not figure out the comms because I don't have a remote. What needs to be sent via UDP?
Hello, you have to find out a lot ... xD
Look at my code. However, I have another big problem. After about 1.5 minutes it gets stuck. Sometimes I get an exception (29). If someone could help me, I would be happy!
Otherwise, the code works! Start AP by type "
#include <ESP8266WiFi.h>
#include <WiFiUDP.h>
//--------------------- defines ---------------------------------------------------------------------------
#define MAX_CMD_LENGTH 60
//#define DEBUG
//--------------------- set MAC for NodeMCU 1.0 (ESP-12E) with 2.5.2 core ---------------------------------
uint8_t ap_mac[] = {0x84, 0xF3, 0xEB, 0xE4, 0x23, 0xDD}; // MAC-Adsress of my Smart-Remote
extern "C" void preinit() {
#include "user_interface.h"
wifi_set_opmode(SOFTAP_MODE);
wifi_set_macaddr(SOFTAP_IF, ap_mac);
}
//--------------------- heart beat declarations -----------------------------------------------------------
uint8_t stdMsg[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00};
int rateI = 0; // durable counter 1
int rateI2 = 0; // durable counter 2
int rateI3 = 1; // durable counter 3
int wtCount = 4; // "wt is send" counter
unsigned long previousMillis = 0; // will store last time cmd was send
const long interval = 1500; // interval at which to send cmd (milliseconds)
//--------------------- other declarations ----------------------------------------------------------------
const byte DNS_PORT = 53; // !!> rigth port for DNS ? <!!
const unsigned int localPort = 8383; // Port der Fernbedienung
const unsigned int remotePort = 8484; // Port der Kamera
const unsigned int wifiChannel = 1; // Channel of my Smart-Remote = 1
const char *ssid = "HERO-RC-A1111425435131"; // SSID of my Smart-Remote "HERO-RC-A1111425435131"
boolean conn = false; // indicator if AP is on
struct station_info *stat_info;
byte packetBuffer[1024]; // buffer to hold incoming and outgoing packets
int previousClients = 0; // will store last client count
unsigned char oldNumber_client = 0; // will store last client count
unsigned long oldTime = 0; // will store last client count show time
IPAddress ip(10, 71, 79, 1); // IP of my Smart-Remote
IPAddress gateway(10, 71, 79, 1); // GW of my Smart-Remote
IPAddress subnet(255, 255, 255, 0); // SM of my Smart-Remote
//--------------------- instances -------------------------------------------------------------------------
WiFiUDP Udp;
//
//--------------------- program ---------------------------------------------------------------------------
void setup() {
WiFi.disconnect(true);
WiFi.softAPdisconnect(true);
Serial.begin(115200);
while (!Serial); // wait for serial attach
WiFi.mode(WIFI_AP); // Set WiFi in AP mode
WiFi.hostname("ESP_E423DD"); // Hostname of my Smart-Remote
//setup is done
Serial.flush();
Serial.println("");
Serial.println("Setup done.");
}
void loop() {
// Check for a command from the Serial Monitor
SubSerialMonitorCommand();
// Check client status
if (conn == true) {
#ifdef DEBUG
//reciveReq(); //to much data for serial monitor
#endif
//heart beat
unsigned long currentMillis = millis();
if (currentMillis - previousMillis >= interval) {
client_status();
// save the last time you send CMD
previousMillis = currentMillis;
stat_info = wifi_softap_get_station_info();
if (stat_info != NULL) {
//let the heart beating
heartBeat();
}
wifi_softap_free_station_info(); //inserted because Exception 29
}
}
}
void startAP() {
rateI = 0; // durable counter 1 reset
rateI2 = 0; // durable counter 2 reset
rateI3 = 1; // durable counter 3 reset
wtCount = 4; // "wt is send" counter reset
WiFi.softAPConfig(ip, gateway, subnet);
//Start AP
WiFi.softAP(ssid, "", wifiChannel);
// Start UDP
Udp.begin(localPort);
#ifdef DEBUG
Serial.print("<rcMAC>");
Serial.print(WiFi.softAPmacAddress());
Serial.println("</rcMAC>");
Serial.print("<rcSSID>");
Serial.print(ssid);
Serial.println("</rcSSID>");
Serial.print("<rcIP>");
Serial.print(WiFi.softAPIP());
Serial.println("</rcIP>");
#endif
conn = true;
Serial.print("<rcOn>");
Serial.print(conn);
Serial.println("</rcOn>");
}
void stopAP() {
Udp.stop();
WiFi.softAPdisconnect(true);
conn = false;
Serial.print("<rcOn>");
Serial.print(conn);
Serial.println("</rcOn>");
}
String IpAddress2String(const IPAddress& ipAddress){
return String(ipAddress[0]) + String(".") + \
String(ipAddress[1]) + String(".") + \
String(ipAddress[2]) + String(".") + \
String(ipAddress[3]) ;
}
void client_status() {
unsigned char number_client;
struct ip4_addr *IPaddress;
IPAddress address;
struct station_info *stat_info;
number_client = wifi_softap_get_station_num();
stat_info = wifi_softap_get_station_info();
int i=1;
while (stat_info != NULL) {
uint8_t* clientBSSID = stat_info->bssid;
Serial.print("<on_client>");
serialPrintHex(clientBSSID,6);
Serial.println("</on_client>");
stat_info = STAILQ_NEXT(stat_info, next);
i++;
}
if (oldNumber_client != number_client) {
Serial.print("<n_clients>");
Serial.print(number_client);
Serial.println("</n_clients>");
oldNumber_client = number_client;
}
wifi_softap_free_station_info(); //inserted because Exception 29
}
byte ReadSerialMonitorString(char* sString) {
// Declarations
byte nCount;
nCount = 0;
if (Serial.available() > 0)
{
Serial.setTimeout(20);
nCount = Serial.readBytes(sString, MAX_CMD_LENGTH);
}
// Terminate the string
sString[nCount] = 0;
return nCount;
}
void sendReq(uint8_t* req, int noBytes) {
struct ip4_addr *IPaddress;
IPAddress address;
stat_info = wifi_softap_get_station_info();
int i = 1;
while (stat_info != NULL) {
IPaddress = &stat_info->ip;
address = IPaddress->addr;
String strAddr = IpAddress2String(address);
#ifdef DEBUG
Serial.print("Sending cmd to " + strAddr + " : ");
serialPrintHex(req, noBytes);
Serial.println();
#endif
Udp.beginPacket(address, remotePort);
Udp.write(req, noBytes);
Udp.endPacket();
stat_info = STAILQ_NEXT(stat_info, next);
i++;
}
wifi_softap_free_station_info(); //inserted because Exception 29
}
void reciveReq() {
int noBytes = Udp.parsePacket();
String received_command = "";
if ( noBytes ) {
Serial.print(millis() / 1000);
Serial.print(":Packet of ");
Serial.print(noBytes);
Serial.print(" received from ");
Serial.print(Udp.remoteIP());
Serial.print(":");
Serial.println(Udp.remotePort());
// We've received a packet, read the data from it
Udp.read(packetBuffer,noBytes); // read the packet into the buffer
//HEX 2 String
for (int i = 1; i <= noBytes; i++) {
received_command = received_command + char(packetBuffer[i - 1]);
}
//display the packet contents in HEX
Serial.print("RX(HEX): ");
serialPrintHex(packetBuffer, noBytes);
Serial.println();
Serial.print("RX(String): ");
Serial.println(received_command); // Print command as String
Serial.println();
} else {
Serial.println("nothing recived");
}
}
void SubSerialMonitorCommand(){
// Declarations
uint8_t SH1[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xFA, 0x53, 0x48, 0x01}; // shutter 1
uint8_t SH0[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x53, 0x48, 0x00}; // shutter 0
uint8_t wt[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x77, 0x74}; // wait
uint8_t pw[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x70, 0x77}; // power on
uint8_t pw0[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x70, 0x77, 0x00}; // power off
uint8_t st[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x73, 0x74}; // status?
uint8_t CM[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x43, 0x4D}; // change mode
uint8_t cv[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x63, 0x76}; // cam version
uint8_t OO[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x4F, 0x4F}; //
uint8_t se[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x73, 0x65}; //
uint8_t lc[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x6C, 0x63}; // Display image
char sString[MAX_CMD_LENGTH + 1];
bool bError = true;
unsigned long nMsgID = 0xFFFF;
byte nMsgLen = 0;
byte nMsgBuffer[8];
// Check for command from Serial Monitor
int nLen = ReadSerialMonitorString(sString);
if (nLen > 0)
{
String str(sString);
if (str.indexOf("<rc1>") >= 0) {
//start softAP
startAP();
} else if (str.indexOf("<rc0>") >= 0) {
//stop softAP
stopAP();
} else if (str.indexOf("<sh1>") >= 0) {
//send record command
sendReq(SH1, 14);
delay(200);
sendReq(SH1, 14);
delay(200);
sendReq(SH1, 14);
delay(200);
sendReq(SH1, 14);
} else if (str.indexOf("<sh0>") >= 0) {
//send stop recording command
sendReq(SH0, 14);
delay(200);
sendReq(SH0, 14);
delay(200);
sendReq(SH0, 14);
//Serial.println("Recording stopped");
}else if (str.indexOf("<cv>") >= 0) {
sendReq(cv, 13);
delay(200);
}else if (str.indexOf("<cm>") >= 0) {
sendReq(CM, 13);
delay(200);
} else if (str.indexOf("<pw0>") >= 0) {
sendReq(pw0, 14);
delay(200);
sendReq(pw0, 14);
delay(200);
sendReq(pw0, 14);
delay(200);
sendReq(pw0, 14);
delay(200);
}else if (str.indexOf("???") >= 0) {
//send whoAmI
Serial.println("GPRC");
} else {
//undefiniert
Serial.println("unknown command");
unsigned long oldTime = 0;
}
}
}
void mac2str(const uint8_t* ptr, char* string) {
sprintf(string, "%02x:%02x:%02x:%02x:%02x:%02x", ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5]);
return;
}
void heartBeat() {
stdMsg[8] = (uint8_t)rateI3;
stdMsg[9] = (uint8_t)rateI2;
stdMsg[10] = (uint8_t)rateI;
if (rateI >= 255){
rateI2++;
rateI = 0;
}
if (rateI2 >= 255){
rateI3++;
rateI2 = 0;
}
if (rateI3 >= 255){
rateI = 0;
rateI2 = 0;
rateI3 = 1;
}
if(wtCount >= 3){
stdMsg[11] = {0x70}; // p
stdMsg[12] = {0x77}; // w
//send 4x PW without counting
#ifdef DEBUG
Serial.print("TX: ");
serialPrintHex(stdMsg, 13);
Serial.println();
#endif
sendReq(stdMsg, 13);
delay(235);
#ifdef DEBUG
Serial.print("TX: ");
serialPrintHex(stdMsg, 13);
Serial.println();
#endif
sendReq(stdMsg, 13);
delay(235);
#ifdef DEBUG
Serial.print("TX: ");
serialPrintHex(stdMsg, 13);
Serial.println();
#endif
sendReq(stdMsg, 13);
delay(235);
#ifdef DEBUG
Serial.print("TX: ");
serialPrintHex(stdMsg, 13);
Serial.println();
#endif
sendReq(stdMsg, 13);
delay(235);
wtCount = 0;
rateI++;
return;
}else{
stdMsg[11] = {0x77}; // w
stdMsg[12] = {0x74}; // t
//send WT
#ifdef DEBUG
Serial.print("TX: ");
serialPrintHex(stdMsg, 13);
Serial.println();
#endif
sendReq(stdMsg, 13);
rateI++;
wtCount++;
}
}
void serialPrintHex(uint8_t msg[], int noBytes)
{
String received_command = "";
for (int i=1;i<=noBytes;i++) {
Serial.print(msg[i-1],HEX);
received_command = received_command + char(msg[i - 1]);
if (i % 32 == 0) {
Serial.println();
} else Serial.print(" ");
}
}
I am available for any questions
My Exception:
19:24:47.990 -> Exception (29):
19:24:47.990 -> epc1=0x40217404 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000004 depc=0x00000000
19:24:47.990 ->
19:24:47.990 -> >>>stack>>>
19:24:47.990 ->
19:24:47.990 -> ctx: sys
19:24:47.990 -> sp: 3fffed30 end: 3fffffb0 offset: 01a0
19:24:47.990 -> 3fffeed0: 402179a3 3ffec5a0 3ffea0c4 4020e685
19:24:47.990 -> 3fffeee0: 00000018 00000001 00000001 3ffea0ce
19:24:47.990 -> 3fffeef0: 402279ec 00000040 3ffea0d6 3ffeefdc
19:24:47.990 -> 3fffef00: 3ffea0b8 00000000 0000002d 4022731a
19:24:47.990 -> 3fffef10: 3ffec5a0 3ffea0b8 3fffdcc0 3ffe8be0
19:24:47.990 -> 3fffef20: 3ffea0c8 3ffefa0c 00000000 3ffe8be0
19:24:48.036 -> 3fffef30: 00000000 3ffec5a0 00000002 3ffe8524
19:24:48.036 -> 3fffef40: 40226bf7 3fffdab0 00000000 402032c3
19:24:48.036 -> 3fffef50: 3ffe8be0 40000f49 3fffdab0 40000f49
19:24:48.036 -> 3fffef60: 40000e19 40001878 00000002 00000000
19:24:48.036 -> 3fffef70: 3fffff10 aa55aa55 00000092 4010420c
19:24:48.036 -> 3fffef80: 40104212 00000002 00000000 30253a78
19:24:48.036 -> 3fffef90: 4010000d 3a783230 78323025 6e6f3c00
19:24:48.036 -> 3fffefa0: 00000000 3fffef3c 00000000 3fffff38
19:24:48.036 -> 3fffefb0: 3fffffc0 00000000 00000000 feefeffe
19:24:48.036 -> 3fffefc0: feefeffe feefeffe feefeffe feefeffe
19:24:48.036 -> 3fffefd0: feefeffe feefeffe feefeffe feefeffe
19:24:48.083 -> 3fffefe0: feefeffe feefeffe feefeffe feefeffe
19:24:48.083 -> 3fffeff0: feefeffe feefeffe feefeffe feefeffe
19:24:48.083 -> 3ffff000: feefeffe feefeffe feefeffe feefeffe
19:24:48.083 -> 3ffff010: feefeffe feefeffe feefeffe feefeffe
19:24:48.083 -> 3ffff020: feefeffe feefeffe feefeffe feefeffe
19:24:48.083 -> 3ffff030: feefeffe feefeffe feefeffe feefeffe
19:24:48.083 -> 3ffff040: feefeffe feefeffe feefeffe feefeffe
19:24:48.083 -> 3ffff050: feefeffe feefeffe feefeffe feefeffe
19:24:48.083 -> 3ffff060: feefeffe feefeffe feefeffe feefeffe
19:24:48.083 -> 3ffff070: feefeffe feefeffe feefeffe feefeffe
19:24:48.130 -> 3ffff080: feefeffe feefeffe feefeffe feefeffe
19:24:48.130 -> 3ffff090: feefeffe feefeffe feefeffe feefeffe
19:24:48.130 -> 3ffff0a0: feefeffe feefeffe feefeffe feefeffe
19:24:48.130 -> 3ffff0b0: feefeffe feefeffe feefeffe feefeffe
19:24:48.130 -> 3ffff0c0: feefeffe feefeffe feefeffe feefeffe
19:24:48.130 -> 3ffff0d0: feefeffe feefeffe feefeffe feefeffe
19:24:48.130 -> 3ffff0e0: feefeffe feefeffe feefeffe feefeffe
19:24:48.130 -> 3ffff0f0: feefeffe feefeffe feefeffe feefeffe
19:24:48.130 -> 3ffff100: feefeffe feefeffe feefeffe feefeffe
19:24:48.130 -> 3ffff110: feefeffe feefeffe feefeffe feefeffe
19:24:48.130 -> 3ffff120: feefeffe feefeffe feefeffe feefeffe
19:24:48.177 -> 3ffff130: feefeffe feefeffe feefeffe feefeffe
19:24:48.177 -> 3ffff140: feefeffe feefeffe feefeffe feefeffe
19:24:48.177 -> 3ffff150: feefeffe feefeffe feefeffe feefeffe
19:24:48.177 -> 3ffff160: feefeffe feefeffe feefeffe feefeffe
19:24:48.177 -> 3ffff170: feefeffe feefeffe feefeffe feefeffe
19:24:48.177 -> 3ffff180: feefeffe feefeffe feefeffe feefeffe
19:24:48.177 -> 3ffff190: feefeffe feefeffe feefeffe feefeffe
19:24:48.177 -> 3ffff1a0: feefeffe feefeffe feefeffe feefeffe
19:24:48.177 -> 3ffff1b0: feefeffe feefeffe feefeffe feefeffe
19:24:48.224 -> 3ffff1c0: feefeffe feefeffe feefeffe feefeffe
19:24:48.224 -> 3ffff1d0: feefeffe feefeffe feefeffe feefeffe
19:24:48.224 -> 3ffff1e0: feefeffe feefeffe feefeffe feefeffe
19:24:48.224 -> 3ffff1f0: feefeffe feefeffe feefeffe feefeffe
19:24:48.224 -> 3ffff200: feefeffe feefeffe feefeffe feefeffe
19:24:48.224 -> 3ffff210: feefeffe feefeffe feefeffe feefeffe
19:24:48.224 -> 3ffff220: feefeffe feefeffe feefeffe feefeffe
19:24:48.224 -> 3ffff230: feefeffe feefeffe feefeffe feefeffe
19:24:48.224 -> 3ffff240: feefeffe feefeffe feefeffe feefeffe
19:24:48.224 -> 3ffff250: feefeffe feefeffe feefeffe feefeffe
19:24:48.224 -> 3ffff260: feefeffe feefeffe feefeffe feefeffe
19:24:48.224 -> 3ffff270: feefeffe feefeffe feefeffe feefeffe
19:24:48.271 -> 3ffff280: feefeffe feefeffe feefeffe feefeffe
19:24:48.271 -> 3ffff290: feefeffe feefeffe feefeffe feefeffe
19:24:48.271 -> 3ffff2a0: feefeffe feefeffe feefeffe feefeffe
19:24:48.271 -> 3ffff2b0: feefeffe feefeffe feefeffe feefeffe
19:24:48.271 -> 3ffff2c0: feefeffe feefeffe feefeffe feefeffe
19:24:48.271 -> 3ffff2d0: feefeffe feefeffe feefeffe feefeffe
19:24:48.271 -> 3ffff2e0: feefeffe feefeffe feefeffe feefeffe
19:24:48.271 -> 3ffff2f0: feefeffe feefeffe feefeffe feefeffe
19:24:48.271 -> 3ffff300: feefeffe feefeffe feefeffe feefeffe
19:24:48.318 -> 3ffff310: feefeffe feefeffe feefeffe feefeffe
19:24:48.318 -> 3ffff320: feefeffe feefeffe feefeffe feefeffe
19:24:48.318 -> 3ffff330: feefeffe feefeffe feefeffe feefeffe
19:24:48.318 -> 3ffff340: feefeffe feefeffe feefeffe feefeffe
19:24:48.318 -> 3ffff350: feefeffe feefeffe feefeffe feefeffe
19:24:48.318 -> 3ffff360: feefeffe feefeffe feefeffe feefeffe
19:24:48.318 -> 3ffff370: feefeffe feefeffe feefeffe feefeffe
19:24:48.318 -> 3ffff380: feefeffe feefeffe feefeffe feefeffe
19:24:48.318 -> 3ffff390: feefeffe feefeffe feefeffe feefeffe
19:24:48.318 -> 3ffff3a0: feefeffe feefeffe feefeffe feefeffe
19:24:48.318 -> 3ffff3b0: feefeffe feefeffe feefeffe feefeffe
19:24:48.364 -> 3ffff3c0: feefeffe feefeffe feefeffe feefeffe
19:24:48.364 -> 3ffff3d0: feefeffe feefeffe feefeffe feefeffe
19:24:48.364 -> 3ffff3e0: feefeffe feefeffe feefeffe feefeffe
19:24:48.364 -> 3ffff3f0: feefeffe feefeffe feefeffe feefeffe
19:24:48.364 -> 3ffff400: feefeffe feefeffe feefeffe feefeffe
19:24:48.364 -> 3ffff410: feefeffe feefeffe feefeffe feefeffe
19:24:48.364 -> 3ffff420: feefeffe feefeffe feefeffe feefeffe
19:24:48.364 -> 3ffff430: feefeffe feefeffe feefeffe feefeffe
19:24:48.364 -> 3ffff440: feefeffe feefeffe feefeffe feefeffe
19:24:48.364 -> 3ffff450: feefeffe feefeffe feefeffe feefeffe
19:24:48.411 -> 3ffff460: feefeffe feefeffe feefeffe feefeffe
19:24:48.411 -> 3ffff470: feefeffe feefeffe feefeffe feefeffe
19:24:48.411 -> 3ffff480: feefeffe feefeffe feefeffe feefeffe
19:24:48.411 -> 3ffff490: feefeffe feefeffe feefeffe feefeffe
19:24:48.411 -> 3ffff4a0: feefeffe feefeffe feefeffe feefeffe
19:24:48.411 -> 3ffff4b0: feefeffe feefeffe feefeffe feefeffe
19:24:48.411 -> 3ffff4c0: feefeffe feefeffe feefeffe feefeffe
19:24:48.411 -> 3ffff4d0: feefeffe feefeffe feefeffe feefeffe
19:24:48.411 -> 3ffff4e0: feefeffe feefeffe feefeffe feefeffe
19:24:48.411 -> 3ffff4f0: feefeffe feefeffe feefeffe feefeffe
19:24:48.458 -> 3ffff500: feefeffe feefeffe feefeffe feefeffe
19:24:48.458 -> 3ffff510: feefeffe feefeffe feefeffe feefeffe
19:24:48.458 -> 3ffff520: feefeffe feefeffe feefeffe feefeffe
19:24:48.458 -> 3ffff530: feefeffe feefeffe feefeffe feefeffe
19:24:48.458 -> 3ffff540: feefeffe feefeffe feefeffe feefeffe
19:24:48.458 -> 3ffff550: feefeffe feefeffe feefeffe feefeffe
19:24:48.458 -> 3ffff560: feefeffe feefeffe feefeffe feefeffe
19:24:48.458 -> 3ffff570: feefeffe feefeffe feefeffe feefeffe
19:24:48.458 -> 3ffff580: feefeffe feefeffe feefeffe feefeffe
19:24:48.458 -> 3ffff590: feefeffe feefeffe feefeffe feefeffe
19:24:48.505 -> 3ffff5a0: feefeffe feefeffe feefeffe feefeffe
19:24:48.505 -> 3ffff5b0: feefeffe feefeffe feefeffe feefeffe
19:24:48.505 -> 3ffff5c0: feefeffe feefeffe feefeffe feefeffe
19:24:48.505 -> 3ffff5d0: feefeffe feefeffe feefeffe feefeffe
19:24:48.505 -> 3ffff5e0: feefeffe feefeffe feefeffe feefeffe
19:24:48.505 -> 3ffff5f0: feefeffe feefeffe feefeffe feefeffe
19:24:48.505 -> 3ffff600: feefeffe feefeffe feefeffe feefeffe
19:24:48.505 -> 3ffff610: feefeffe feefeffe feefeffe feefeffe
19:24:48.505 -> 3ffff620: feefeffe feefeffe feefeffe feefeffe
19:24:48.505 -> 3ffff630: feefeffe feefeffe feefeffe feefeffe
19:24:48.505 -> 3ffff640: feefeffe feefeffe feefeffe feefeffe
19:24:48.552 -> 3ffff650: feefeffe feefeffe feefeffe feefeffe
19:24:48.552 -> 3ffff660: feefeffe feefeffe feefeffe feefeffe
19:24:48.552 -> 3ffff670: feefeffe feefeffe feefeffe feefeffe
19:24:48.552 -> 3ffff680: feefeffe feefeffe feefeffe feefeffe
19:24:48.552 -> 3ffff690: feefeffe feefeffe feefeffe feefeffe
19:24:48.552 -> 3ffff6a0: feefeffe feefeffe feefeffe feefeffe
19:24:48.552 -> 3ffff6b0: feefeffe feefeffe feefeffe feefeffe
19:24:48.552 -> 3ffff6c0: feefeffe feefeffe feefeffe feefeffe
19:24:48.552 -> 3ffff6d0: feefeffe feefeffe feefeffe feefeffe
19:24:48.552 -> 3ffff6e0: feefeffe feefeffe feefeffe feefeffe
19:24:48.599 -> 3ffff6f0: feefeffe feefeffe feefeffe feefeffe
19:24:48.599 -> 3ffff700: feefeffe feefeffe feefeffe feefeffe
19:24:48.599 -> 3ffff710: feefeffe feefeffe feefeffe feefeffe
19:24:48.599 -> 3ffff720: feefeffe feefeffe feefeffe feefeffe
19:24:48.599 -> 3ffff730: feefeffe feefeffe feefeffe feefeffe
19:24:48.599 -> 3ffff740: feefeffe feefeffe feefeffe feefeffe
19:24:48.599 -> 3ffff750: feefeffe feefeffe feefeffe feefeffe
19:24:48.599 -> 3ffff760: feefeffe feefeffe feefeffe feefeffe
19:24:48.599 -> 3ffff770: feefeffe feefeffe feefeffe feefeffe
19:24:48.599 -> 3ffff780: feefeffe feefeffe feefeffe feefeffe
19:24:48.646 -> 3ffff790: feefeffe feefeffe feefeffe feefeffe
19:24:48.646 -> 3ffff7a0: feefeffe feefeffe feefeffe feefeffe
19:24:48.646 -> 3ffff7b0: feefeffe feefeffe feefeffe feefeffe
19:24:48.646 -> 3ffff7c0: feefeffe feefeffe feefeffe feefeffe
19:24:48.646 -> 3ffff7d0: feefeffe feefeffe feefeffe feefeffe
19:24:48.646 -> 3ffff7e0: feefeffe feefeffe feefeffe feefeffe
19:24:48.646 -> 3ffff7f0: feefeffe feefeffe feefeffe feefeffe
19:24:48.646 -> 3ffff800: feefeffe feefeffe feefeffe feefeffe
19:24:48.646 -> 3ffff810: feefeffe feefeffe feefeffe feefeffe
19:24:48.646 -> 3ffff820: feefeffe feefeffe feefeffe feefeffe
19:24:48.646 -> 3ffff830: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff840: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff850: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff860: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff870: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff880: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff890: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff8a0: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff8b0: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff8c0: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff8d0: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff8e0: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff8f0: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff900: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff910: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff920: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff930: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff940: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff950: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff960: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff970: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff980: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff990: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff9a0: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff9b0: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff9c0: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff9d0: feefeffe feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffff9e0: feefeffe feefeffe 40227d53 00000001
19:24:48.927 -> 3ffff9f0: ffffffff 00000000 3ffe8cb1 00000008
19:24:48.927 -> 3ffffa00: 40227da2 3ffec2f8 3ffeebcc 00000000
19:24:48.927 -> 3ffffa10: 3ffef108 00000000 40100e4f 3ffec2f8
19:24:48.927 -> 3ffffa20: 000000c0 4021a0ca 00000008 3ffef270
19:24:48.927 -> 3ffffa30: 40226e14 3ffec2f8 3ffeca70 3ffef108
19:24:48.927 -> 3ffffa40: 00000000 4021a233 3ffeee74 feefeffe
19:24:48.927 -> 3ffffa50: 00000000 00000002 00000001 3ffec2f8
19:24:48.927 -> 3ffffa60: 3ffef282 4010478b 3ffef108 3ffeefdc
19:24:48.927 -> 3ffffa70: 3ffef24c feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffffa80: feefeffe 4020cb2d 3ffee5a4 3ffeefdc
19:24:48.927 -> 3ffffa90: 3ffef282 0000002a 00000060 40204a18
19:24:48.927 -> 3ffffaa0: feefeffe 0000001c 3ffee9c8 00000006
19:24:48.927 -> 3ffffab0: 3ffeea00 3ffee9c8 3ffef24c 4020cdaf
19:24:48.927 -> 3ffffac0: feefeffe 3ffee9c8 3ffef24c 4020d1a0
19:24:48.927 -> 3ffffad0: 3ffe87f7 feefeffe feefeffe feefeffe
19:24:48.927 -> 3ffffae0: feefeffe feefeffe feefeffe 3ffee9cc
19:24:48.927 -> 3ffffaf0: 3ffef24c 00000006 3ffef290 40213f74
19:24:48.927 -> 3ffffb00: 3ffee9c8 3ffeea00 3ffe87f7 3ffeea00
19:24:48.927 -> 3ffffb10: 3ffe87f1 3ffee9cc feefeffe feefeffe
19:24:48.927 -> 3ffffb20: feefeffe feefeffe feefeffe 3ffffbc0
19:24:48.927 -> 3ffffb30: 3ffffbc8 3ffffb90 3ffee9c8 4021416a
19:24:48.927 -> 3ffffb40: 3ffee9cc 00000001 feefeffe feefeffe
19:24:48.927 -> 3ffffb50: feefeffe feefeffe 3ffee9c8 4021041e
19:24:48.927 -> 3ffffb60: feefeffe 3ffffb90 3ffee9c8 40210466
19:24:48.927 -> 3ffffb70: 014f470a 00000000 0000001f 401049e5
19:24:48.927 -> 3ffffb80: 3ffffbc4 3ffffbc8 3ffee9c8 402104c4
19:24:48.927 -> 3ffffb90: 00000000 00000001 00000008 00000002
19:24:48.927 -> 3ffffba0: 402309a0 00000008 3ffee9c8 4020cf8c
19:24:48.927 -> 3ffffbb0: 014f470a 00000008 00000001 4020d060
19:24:48.927 -> 3ffffbc0: 014f470a 00ffffff 014f470a 3ffef914
19:24:48.927 -> 3ffffbd0: 3ffffc14 3ffffc18 3ffee9c8 402104c4
19:24:48.927 -> 3ffffbe0: 402205cf 00000001 00000008 00000002
19:24:48.927 -> 3ffffbf0: 00000003 00000001 4022065f 3ffef3c1
19:24:48.927 -> 3ffffc00: 0000000d 00000000 00000010 00000000
19:24:48.927 -> 3ffffc10: 0000000d 00000000 00000010 00000000
19:24:48.927 -> 3ffffc20: 4021a304 00000017 60000200 402295ad
19:24:48.927 -> 3ffffc30: 00000000 80000000 00000000 0000001b
19:24:48.989 -> 3ffffc40: 00006800 dfffffff 00006800 00000000
19:24:48.989 -> 3ffffc50: 3ffffdb0 00000000 40227d53 00000001
19:24:48.989 -> 3ffffc60: 00000005 00000000 00000020 40100d06
19:24:48.989 -> 3ffffc70: 3ffe8b65 40104103 3ffec5a0 00000000
19:24:48.989 -> 3ffffc80: 40101a21 3ffec5a0 40100e4f 3ffec280
19:24:48.989 -> 3ffffc90: 0000001f 043391ce 3ffecfc0 40101bf6
19:24:48.989 -> 3ffffca0: 3ffe9404 00000000 40227d53 00000001
19:24:48.989 -> 3ffffcb0: ffffffff 00000000 3ffe8cb1 00000008
19:24:48.989 -> 3ffffcc0: 4021a86b 3ffec1e0 3ffeebcc 00020021
19:24:48.989 -> 3ffffcd0: 5f694104 f3863972 dd23e4eb 3ffe0008
19:24:48.989 -> 3ffffce0: 3ffeefdc 4021a0ca 3ffef4c4 3fffbf8c
19:24:48.989 -> 3ffffcf0: 3ffeebcc 3ffef098 00000000 3ffef098
19:24:48.989 -> 3ffffd00: 00000005 00000000 00000020 40100d06
19:24:48.989 -> 3ffffd10: 00000000 00000000 00000020 40100d06
19:24:49.021 -> 3ffffd20: 3ffe8b60 401040e8 3ffef30c 3ffeefdc
19:24:49.021 -> 3ffffd30: 00000001 4010330b 3ffecce0 40101bf6
19:24:49.021 -> 3ffffd40: 00000005 00000000 00000020 40100d06
19:24:49.021 -> 3ffffd50: 3ffe8b65 40104103 3ffec5a0 00000100
19:24:49.021 -> 3ffffd60: 40101a21 3ffec5a0 7fffffff 00000000
19:24:49.067 -> 3ffffd70: 00000026 0589aba2 3ffecfc0 40101bf6
19:24:49.067 -> 3ffffd80: 3ffe93ec 00000000 00000000 00000000
19:24:49.067 -> 3ffffd90: 00000026 0589aba2 40102036 00000100
19:24:49.067 -> 3ffffda0: 7fffffff 3ffe93ec 3ffe93ec 00000001
19:24:49.067 -> 3ffffdb0: 00000001 00000148 00000018 ffffffff
19:24:49.067 -> 3ffffdc0: 00000005 00000000 00000020 40100d06
19:24:49.067 -> 3ffffdd0: 3ffe8b65 40104103 3ffec5a0 00000022
19:24:49.067 -> 3ffffde0: 40101a21 3ffec5a0 00000020 40100d06
19:24:49.067 -> 3ffffdf0: 00007fff 0589b38a 3ffecfc0 40101bf6
19:24:49.067 -> 3ffffe00: 3ffe93f8 00000000 00000000 00000000
19:24:49.067 -> 3ffffe10: 00007fff 0589b38a 40102036 00000100
19:24:49.114 -> 3ffffe20: 7fffffff 3ffe93f8 3ffe93f8 00000001
19:24:49.114 -> 3ffffe30: 00000001 00000108 7fffffff 00000000
19:24:49.114 -> 3ffffe40: 0000007f 0589b38a 00000000 4000050c
19:24:49.114 -> 3ffffe50: 3fffc278 40101dd0 3fffc200 00000022
19:24:49.114 -> 3ffffe60: 3ffe9404 05881e0e 00000000 4000050c
19:24:49.114 -> 3ffffe70: 40100119 00000030 00000018 ffffffff
19:24:49.114 -> 3ffffe80: 40000650 0589b3a7 00000000 4bc6a7f0
19:24:49.114 -> 3ffffe90: 00000000 ffffffff 00000020 01000000
19:24:49.114 -> 3ffffea0: 000000b0 3fffc6fc 00000003 4bc6a7f0
19:24:49.114 -> 3ffffeb0: 00000000 0589b3a7 00000000 00000030
19:24:49.114 -> 3ffffec0: 00000000 3ffffef0 00000000 40202899
19:24:49.161 -> 3ffffed0: 00000000 3fffdad0 3ffee480 402011b8
19:24:49.161 -> 3ffffee0: 00000000 00000000 3ffee4b8 402015cc
19:24:49.161 -> 3ffffef0: ffffff00 3fffc6fc 00000001 3ffe8524
19:24:49.161 -> 3fffff00: 00000000 3fffdad0 3ffee4e8 00000030
19:24:49.161 -> 3fffff10: 402014ba 3ffe84e8 3ffe84e8 0000000d
19:24:49.161 -> 3fffff20: 40201539 3ffe84e8 3ffe84e8 0000000d
19:24:49.161 -> 3fffff30: 00000000 4bc6a7f0 80c49ba5 00000000
19:24:49.161 -> 3fffff40: 00000000 00000000 4bc6a7f0 00000000
19:24:49.161 -> 3fffff50: fa000100 00014853 4010014c 00016aee
19:24:49.161 -> 3fffff60: 00000000 00000000 00000000 43010100
19:24:49.208 -> 3fffff70: 01a3a3c4 00000000 00000004 40231126
19:24:49.208 -> 3fffff80: 40201993 3ffee444 0001683b 3ffee4e8
19:24:49.208 -> 3fffff90: 00000000 00000000 00000001 40203329
19:24:49.208 -> 3fffffa0: 3fffdad0 00000000 3ffee4b8 402033be
19:24:49.208 -> <<<stack<<<
19:24:49.208 ->
19:24:49.208 -> last failed alloc call: 401001D4(20)
19:24:49.208 ->
19:24:49.208 -> ets Jan 8 2013,rst cause:2, boot mode:(3,6)
19:24:49.208 ->
19:24:49.208 -> load 0x4010f000, len 1384, room 16
19:24:49.208 -> tail 8
19:24:49.208 -> chksum 0x2d
19:24:49.208 -> csum 0x2d
19:24:49.208 -> v8b899c12
19:24:49.208 -> ~ld
I could identify and eradicate the problem. More memory leaks have been fixed. The code is now stable. I will post it at: https://github.com/sepp89117/GoPro-Multiple-Smart-Remote-ESP8266 Thx for help
Great! Though the newer cameras were using the newer API even over Remote connection. Any instructions on how to use? I changed the MAC addresses in the code to my camera's mac addresses (2x HERO4 Black, 1 HERO5, 1 HERO7), deployed the code on my NodeMCU, put the cameras in pairing mode but they didn't bind to the remote.
Thx, the code is written for using with a vb.net windows forms app. Open
Serialmonitor an type
I will write a tutorial soon. Look at readme for first instructions.
Oh you mean M1BSSID and so on with Mac address. Yes, you can change that, but you do not have to. This only serves to forward the status messages of the cameras with the associated MAC. Because of the IP you can not identify the cameras yes.
Did it work with the cameras? I would like to list the models as tested.
Works with HERO5 Black, HERO7 Black.
Hi KonradIT, did you keep experimenting with it? I came across the project again and want to find out how I can get various information from the cameras. I need the battery level and the available space. I will deal with it occasionally in the near future. Greetings
Hi, BTW I now get all the information I need from the GoPros. I will optimize the code and then publish it soon
Great!! I'll gladly try it on my cameras.
Any ideas on how to keep the camera's WiFi AP mode alive? Preferably with UDP while the cameras are connected to my RC. The cameras stay connected to my RC, but after 10 minutes they turn off AP mode and I can no longer view the videos ... RC of course still works. I have tested all the RC commands I know. AP mode remains off. Thank you
Hello, I'm trying to connect my Hero 5 to the NodeMCU. The camera connects to the AP. But she can not be controlled. She gets the IP 10.71.79.6, which I use for commands. Like "http://10.71.79.6/gp/gpControl/status". However, I always get the httpcode -1.
The goal is to control four cameras simultaneously.
Is there information about what the remote usually sends when a camera is connected? The camera normally displays "Smart Remote Connected". When connecting to the NodeMCU not.
Here is my current code (very messy):
PS: I use the NodeMCU in conjunction with a Windows application. This sends via serial commands such as and .
Please help me! And excuse my bad English, I'm from Germany. ;)