@dc42 i guess, at the end of this year is realistic
best regards
@dc42 i guess, at the end of this year is realistic
best regards
hello dc42,
iam working in a 3d printer manufactory in germany.
we want to use the duet 2 wifi board in the next gen of our printers.
we already asked you a while ago:
is it possible to get a new feature in the firmware ?
we want to connect the duet board in the home network of the customer. after that, the board should send his status information to our webserver. the websever manages the customer accounts and provides the respective printer status. so the customer can check the print status from "outside" via a website.
we are willing to pay for this funcionality.
best regards
@dc42 said in Cant build DuetWifiServer:
I did an interim 1.22 release to fix a bug. I checked the Expressive SDK at the same time, but unfortunately they haven't yet released a version of the 3.0 SDK that looks easy to integrate int DuetWiFiServer. So I may add the outbound connection support to the existing version.
this would be great
@dc42 is there any news about the release of this feature?
Hello dc42,
Can you say about how long it will take unti the release of an updated version?
@dc42
Are so far any progress being made in term of the outbound connection?
can you please inform me when you're done?
@dc42
*I defined a message code connCreate in file MessageFormats.h for the Duet to send the WiFi module a command to open a TCP connection with a remote host, however file SocketServer.cpp has this:
case NetworkCommand::connCreate: // create a connection
// Not implemented yet
So it would need to be implemented, then the Duet will be able to open remote connections.*
can you show me the message code, that you defined ?
multiDuetWebmonitor is nice, but it's also cannot connect to the printer over the internet. he can reach the ip , if the PC is in the same network.
the links show tips to connect with VPN. i dont wont to use this way.
i know that the WifiModul on the Duet board is in general able to connect to server outside of the local network. but something in the DuetWifiSocketServer Firmware is blocking this way. i know that, because dc42 told me in a thread, that he does that.
he implemented a TCP socket in the SocketServer.cpp, but i dont know how..
this is the best way to connect the printer with the server, because every user can use this without to prepare there router and so on ..
thanks for your ideas
@danal @JoergS5
my goal is to send the current printer status to my nodejs server. the server runs on a cloud server.
the server app should deliver a website with the printer status and some buttons to control the printer.
the website on the server should have the same functionality's as the DWC from chrishamm.
to use the DWC i need to connect my "Duet Wifi" with my router and after that , every PC in the local network can reach the website. but the nodejs server cant reach the local IP of the duet board, after the printer succcenfully connects to the router. i'am searching for a general solution to control numerous duet printer. and my plan is, that the printer sends the request, to open a socket to the server.
the server should manage multiple tcp sockets to different duet wifi printer.
use case:
the user can control the printer over the internet, for example "start print" or "stop print".
use case:
the user can check the current status of the printer over the internet.
@JoergS5
i can't Serial.println my steps, because the ESP8266-modul is connected to the duet board. i didn't get any response because the firmware dont any message trough..
the only idea i had, was to buy an esp8266 modul and write there the code. after i tested the code at this seperate modul , i was sure that the code is correct and copied it in the right place of the SocketServer.cpp
thanks for your help.
i've tried to implement a get request on an ESP8266 modul (NodeMCU LUA Amica V2) with arduino.
This code works:
#include <ESP8266WiFi.h>
const char* ssid = "xxx";
const char* password = "xxx";
const char* host = "mynodejsServer";
void setup()
{
Serial.begin(115200);
Serial.println();
Serial.printf("Connecting to %s ", ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println(" connected");
}
void loop()
{
WiFiClient client;
Serial.printf("\n[Connecting to %s ... ", host);
if (client.connect(host, 80
))
{
Serial.println("connected]");
Serial.println("[Sending a request]");
client.print(String("GET ") +"/test" + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"Connection: close\r\n" +
"\r\n"
);
Serial.println("[Response:]");
while (client.connected())
{
if (client.available())
{
String line = client.readStringUntil('\n');
Serial.println(line);
}
}
client.stop();
Serial.println("\n[Disconnected]");
}
else
{
Serial.println("connection failed!]");
client.stop();
}
delay(5000);
}
i took the important part of this code and copied it into the SocketServer.cpp, like this:
void getRequest(){
const char* host = "mynodejsServer";
WiFiClient client;
if (client.connect(host, 80
))
{
// Serial.println("connected]");
Serial.println("[Sending a request]");
client.print(String("GET ") +"/test" + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"Connection: close\r\n" +
"\r\n"
);
Serial.println("[Response:]");
while (client.connected())
{
if (client.available())
{
String line = client.readStringUntil('\n');
// Serial.println(line);
}
}
client.stop();
Serial.println("\n[Disconnected]");
}
}
i called this method in case NetworkCommand::connCreate:
the esp8266 on the duetBoard dont send the get request with the same code.
does the duetBoard hold back the request ?
but the network protocol is enabled...:
M586
HTTP is enabled on port 80
FTP is disabled
TELNET is enabled on port 23
how to implement a TCP socket in serverSocket.cpp ?
i'm try to use the WiFiClient client to connect to a host. but it can't get connected
ok thanks,
i followed this tut (http://richmondsystems.net/2017/06/18/using-arduino-library-in-eclipse/ )
step by step but at the and i'am getting a bunch of errors:
as you can see, i used here the ESP8266RestClient- library, because i can't found the ESP8266HTTPClient - lib under Eclipse -> Preferences -> Arduino -> Libraries.
you find more information with the name ESP8266HTTPClient.
its in the arduino libraries.
i have already imported the two other project, and i think you are right, maybe i found code that gives the same functionality, but i generall want to know how to include and use ardunio libraries in the DuetSocketServer project.
i wanted to try your links in the post above, but now its deleted... ca you please post them again ? ;D
i'am new to c/c++ , but i want to use the ESPHTTPClient library from arduino.
my goal is, to send a post request with the wifi modul of the duet board.
this is the example code i want to use in the serverSocket.cpp:
HTTPClient http;
http.begin("myServer/test");
http.addHeader("Content-Type", "application/x-www-form-urlencoded");
http.POST("message=test");
http.writeToStream(&Serial);
http.end();
but i'am getting always this error:
C:\workspace\wifisocketserver\DuetWiFiSocketServer\Release/../src/SocketServer.cpp:1053: undefined reference to HTTPClient::HTTPClient()' C:\workspace\wifisocketserver\DuetWiFiSocketServer\Release/../src/SocketServer.cpp:1053: undefined reference to
HTTPClient::begin(String)'
C:\workspace\wifisocketserver\DuetWiFiSocketServer\Release/../src/SocketServer.cpp:1053: undefined reference to HTTPClient::addHeader(String const&, String const&, bool, bool)' C:\workspace\wifisocketserver\DuetWiFiSocketServer\Release/../src/SocketServer.cpp:1053: undefined reference to
HTTPClient::POST(String)'
C:\workspace\wifisocketserver\DuetWiFiSocketServer\Release/../src/SocketServer.cpp:1053: undefined reference to HTTPClient::writeToStream(Stream*)' C:\workspace\wifisocketserver\DuetWiFiSocketServer\Release/../src/SocketServer.cpp:1053: undefined reference to
HTTPClient::end()'
C:\workspace\wifisocketserver\DuetWiFiSocketServer\Release/../src/SocketServer.cpp:1053: undefined reference to `HTTPClient::~HTTPClient()'
i tried a couple of tutorials , how to include libraries, but no one removed the error or shows a solution
Thank you, but i meant how i can log from the Socketserver.cpp?
i want to send a http post with the ESP8266 wifi module.
which function in socketServer.cpp is the best place to send a http post to a server ?
how can i log a message in the console of the duet3d ?
you are using version 0.4.12.
i updated to this version and im getting now a perfect .bin-File
this is my version:
esptool v0.4.3 - (c) 2014 Ch. Klippel ck@atelier-klippel.de