-
-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST]MKS WIFI support #523
Comments
after reading code, it seems it does not actually need custom code from reprap as it does not use SPI access I do not have any hardware to test / verify more but it is pretty simple About MKS protocole to send IP and others informations, I did not digged a lot but seems well documented in excel file so should not be a problem to integrate it |
Ok MKS Robin nano V2 received I can check in parallele with MKS TFT + MKS WIFI |
If I can help in some way, please tell me. I don't really know very well all this things, I'm writing a customized version of marlin+mks and just replaced mkswifi with esp3d and learning right now how this things work (I have a Nano Robin v1.1, v1.2 and v2. |
@SimoneCarnio thank you - I wil start to work on it this week - I need first to understant the protocole and isolate the code from the fw code |
Reading at code MKS use actually 2 pins to control the transfer |
@luc-github ,Hello, UDP server using port 8989 is for wifi module discovery in LAN, so the PC or phone can scan the wifi modules in LAN, no need to input the IP manually, just like SSDP. UDP port: 8989
The wifi modulereturns:
The $printer_unique_ID is a string of 20 bytes, such as:
|
@makerbase-mks thank you for the clarification - so it is kind of discovery protocol for MKS App |
According https://youtu.be/0GKT0hw_K-4?t=296 the cloud service generate a qrcode in UI - because Cloud is not available in public FW I wanted to use it to help user to connect to his printer by scanning it and get the IP/port but seems lv_lib_qrcode is not part of Marlin code so I guess also part of private MKS code - so cannot display any QRCODE in Marlin version I do not have bandwidth to work on Marlin for this - if anyone want to do it - just poke me and I will adjust ESP3D data accordingly - today I keep original cloud values Host/Port and module ID is set to 12345 as not used Another nice to have in Marlin, would be to display the WIFI FW version, but same a above - so feel free to implement it in Marlin extUI - in ESP3D the version is Any suggestion let me know |
All "mks" stuffs is practically in the bugfix branch, on my version of the marlin+mks firmare I removed the cloud features. don't know if that lib can be used in classic marlin, but it can on the mks (lvgl) version. From the mks interface you can scan and connect to Wi-Fi, maybe this could be more interesting than showing the qrcode. So If I understand how esp3d work, can code something on my firmware and then make a pull request on the marlin repo. |
@SimoneCarnio I have checked Marlin github 2.0.7.2 and bugfix and cannot see where is the qrcode generation part - also |
There is the qrcode generation, not the code for cloud, but there are the "pages" to see the qrcode. It is in the bugfix branch not stable. I Am out of Office now and driving, cannot check right now  |
Take a look at this repo: https://github.com/Sergey1560/Marlin_FB4S |
@filimonic but this part is Marlin part it looks enhanced version of Marlin but not uising LVGL UI part but doing same and repo has also marlin part https://github.com/Sergey1560/Marlin_FB4S/tree/FB4S_WIFI/Marlin/src/lcd/extui/lib/mks_ui so I am not sure what to look at @SimoneCarnio take your time - it is not hurry - let me know when you have time where is the qrcode code part - it does not pop up to my eyes where ever it is 😵 |
@filimonic that one is a version of marlin optimized for the Flying Bear Ghost and with the mks ui merge (probably always from the bugfix branch) @luc-github I'm sorry, too many repos checked this week, the "cloud" part is only on the mks repo. (https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/blob/master/Marlin/src/lcd/extui/lib/mks_ui/draw_cloud_bind.cpp). Anyway, if I understand how to do it (how to communicate with esp3d), I can make an esp3d integration and when esp3d is connected to Marlin show a qrcode with a "wifi qrcode" like this one and help the user join esp3d in it is in AP mode |
@SimoneCarnio yes too many repositories - it weird this is not merged in Marlin repository
and it should work I will add the esp3d web server ip address and port in communication frame - so it should update UI accordingly |
Ok, sorry if I understand something, I didn't check that things yet, I'm still working on other functionalities |
I have already done the modifications in ESP3D to put ESP3D IP in cloud_host and web server port in cloud port I will push the changes tonight - I still have one message to handle to push the code |
Protocol is implemented but upload |
Got delay due to a bug in latest esp8266 core about upload ( which is now fixed), and I have to dig more in Marlin code and mks wifi original code to check the weird usage of content-lenghT as File lenght, which even can fit for text fileS, is totally innacurate , and finally found that the file lenght info is actually ... not used orz... So now everything is clarified now (I hope) - I can finalize the transfert part Also I will use this Marlin version for reference for my Robin Nano 2: https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware as it seems the most up to date - I will recompile it to verify and test code with it |
Fast upload is implemented ~110KB/S using curl
I may need to cleanup the code but it is working Next step is upload using web-UI |
So ESP3D 3.0 Next Step is MKS TFT + MKS WIFI 1.0
|
Communication is ok - the TFT is not connected to any board for the moment WiFi status is ok too Upload is working on SD - the speed difference with MKS Robin Nano is due to SD card quality - on TFT it is a brand new High speed SD I did not checked USB yet So far so good for the moment About discussion on QR Code: But none of my QR code app can read it - may be due to blue dots ? I have also uncommented I won't investigate on this part I think - so anyone - feel free |
@luc-github .Actually, you can generate the ID : HJNLM000+MAC string of module |
@makerbase-mks ok I will add this then thank you |
So what left is USB content listing: Not sure where the issue come from as sending commands from WebUI or telnet is same behavior - only SD |
Ok looking better at MSK FW code (TFT and MKS Wifi) :
Doing So I will implement the mecanism in web UI now everything is clear 😸 |
also need to add support of MKS specific commands output
Note:
then M20 give right output on WiFi Also the QRCode commented -https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/blob/master/Marlin/src/lcd/extui/lib/mks_ui/draw_cloud_bind.cpp#L164 |
@luc-github Have an MKS Robin Lite v1.1 there the Wifi Module is direct on the Mainboard... I intended to use your firmware ESP3D 3.0 on the Wifi Module to have all features, the Mainboard have both WIFI_IO1_PIN + WIFI_IO2_PIN... So can you somehow do so your firmware also support Fast Upload Support if flashed on a WiFi Module who support it... Or is it already implemented? |
should work , fw is same across modules |
@luc-github So now your firmware support for all boards as long the pin is presented? |
yes MKS Wifi modules are all using same pins still need to update webui as mentioned above |
@luc-github Just wasen't sure on I had to use MKS Firmware to use that feature, but it sounds like your firmware could also be used :-) |
Just found a glich : I need to adjust FW as currently the MKS upload was limited to root because I thought it was a limitation - but it seems more a bug on robin as tft is ok Which bring another question : how to specify path when using CURL - as it only use filename not path something like: |
Note: to specify path need to put path definition before filename as post file is processed as soon as received, so rpath variable must be received before file
I also need to remove device target and handle a pre But not TFT does not support |
I think I am done for this part |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
MKS released the source code of wifi device : https://github.com/makerbase-mks/MKS-WIFI
After quick look the SD transfer code seems based on reprap one using SPI but the marlin part seems using specific pin WIFI_IO1_PIN to strigger the pins usage (Marlin/src/lcd/extui/lib/mks_ui/wifi_module.cpp) so need to check deeper
the transfert is supposed to be 100KB which is far better than the slow M28/M29 protocol
So far current implementation is limited to MKS boards (Robin (s) and TFT) so do not rush and expect a miracle in ESP3D for other boards yet
Currently compilation for ESP module failed on my side because I suspect it use DC42 esp core sources - not generic ones
I know LPC team ported DC42 sources to esp core 2.4.2 so it may be the case also for MKS - I did not checked
Even current sources are availables, there is a current lack of documentation on usage - available chinese doc is supposed to be translated to english soon but it may just be a reference. Use google translate is working FYI.
This post is for raising, I do not have any MKS Robin board to test, conclusion: no ETA for esp3d implememtation yet - a lot of things to do already and no supported hardware - but if someone want to help to add it (not just test it) - contribution is welcome
The text was updated successfully, but these errors were encountered: