probonopd / WirelessPrinting

Print wirelessly from Cura, PrusaSlicer or Slic3r to your 3D printer connected to an ESP8266 or ESP32 module
352 stars 65 forks source link

Upload firmware over the web interface, alternative to #68 #96

Closed probonopd closed 5 years ago

probonopd commented 5 years ago

Why does this not compile? I have not even edited anything regarding "Temperature"...

probonopd commented 5 years ago

Also, when the user has configured the sketch to password protect the update functionality, then we should require a HTTP Basic Auth here.

probonopd commented 5 years ago

Thank you @GMagician :+1:

probonopd commented 5 years ago

Getting

<ok T:21.8 /0.0 T0:21.8 /0.0 @:0 B@:0#ok#
<echo:Unknown command: "UploadStart: old.bin"#wait more#
<ok#ok#
<echo:Unknown command: "sleep disable"#wait more#
<ok#ok#
>M105
<ok T:21.8 /0.0 T0:21.8 /0.0 @:0 B@:0#ok#
>M105

Why does the sketch think these strings are coming from the printer?

probonopd commented 5 years ago

The firmware does not get updated... we must be doing something wrong. Any clues?

GMagician commented 5 years ago

I'm not sure but avr mega needs to receive serial commands on boot to program firmware...

chepo92 commented 5 years ago

I have one working example similar to this, it's not implemented exactly the same way but follows the same example

chepo92 commented 5 years ago

Why does the sketch think these strings are coming from the printer?

Not the sketch, but the printer is replying you are doing a Sprintf (sending a command to the printer that doesn't understand)

probonopd commented 5 years ago

Indeed @chepo92, we need to replace the Serial.printf() and Update.printError(Serial) by something that "prints" to telnet.

chepo92 commented 5 years ago

Actually this code is working for me, hint: if you have updated the esp firm through usb restart it before uploading through the web otherwise it will throw a "incorrect boostrap state error"

probonopd commented 5 years ago

@chepo92 how is #104 different from this?

chepo92 commented 5 years ago

With #104 i'm pushing to probonopd:upload-fw, so if you had merged that this PR would have been modified too (so you wouldn't have to do 32d98fc ). If there is a smarter way to do it pls tell me.

probonopd commented 5 years ago

I did 32d98fc to get your changes into this PR rather than having it in some other places, so that we can eventually merge this PR. Is this PR in the state that you intended?

I am not a Git wizard myself but generally I just use the GitHub web interface.

chepo92 commented 5 years ago

Also I like the idea of #103, that you have another different page to upload firmware. I feel like trying to upload gcode using firmware upload and viceversa

chepo92 commented 5 years ago

I did 32d98fc to get your changes into this PR rather than having it in some other places, so that we can eventually merge this PR.

With #104 that would have been automatically done (changes on probonopd:upload-fw would be reflected in this PR while it's open. But never mind :)

Is this PR in the state that you intended?

I think yes

I am not a Git wizard myself but generally I just use the GitHub web interface.

The problem is that in GH web I can't compile, check and upload in my local hardware, Also I could make errors copy pasting things (and more key pressing involved)