makerbase-mks / MKS-TFT

MKS TFT touch screen includes TFT24/28/32/35/70, which can be connected to the motherboard for control via AUX-1. Support Simplified Chinese, Traditional Chinese, English, Russian, Spanish and more than 5 languages, and support online language switching ...
https://www.aliexpress.com/store/group/Smart-Display/1047297_502266038.html?spm=2114.12010612.pcShopHead_8325768.1_2
341 stars 192 forks source link

MKS WIFI TFT Client Set up #243

Open learn3dprintz opened 5 years ago

learn3dprintz commented 5 years ago

Hey, I recently got a MKS TFT 32 and WIFI Module. Tried setting it up and it works fine in the AP mode. I am trying to activate the client mode, so it can be used remotely, but not able to do so. It does catch the wifi network, but shows IP as 0.0.0.0 and remains disconnected.

Can anyone please share the steps for Client Set up.

marcohaddad commented 5 years ago

Hello,

I had this problem when I first set the wifi module on the MKS TFT32 too. I solved it fixing the IP address since it seamed to be some sort of DHCP incompatibility with my wifi router. So, my wifi section in the mks_config.txt file is:

############# WIFI Function ##########################################

wifi model(MKS WIFI TFT:0; MKS HLK-WIFI:1)

cfg_wifi_type:1

wifi mode(AP:1; STA:2)

cfg_wifi_mode:2

wifi name and password

cfg_wifi_ap_name:mySID cfg_wifi_key_code:myPassword

0:disable cloud service 1:enable cloud service

cfg_cloud_enable:0

cloud service adress

cfg_wifi_cloud_host:www.baizhongyun.cn

cloud service port

cfg_cloud_port:10086

Dynamic access IP

cfg_ip_dhcp_flag:1

IP/mask/gateway

cfg_ip_address:192.168.3.100 cfg_ip_mask:255.255.255.0 cfg_ip_gate:192.168.3.1

--------------------------------------------------------------------------------

As you see, even with the cfg_ip_dhcp_flag set to 1, it did not get an IP from my router, so I set an adequate address manually and never tried to use DHCP again, even after the upgrade to version 3.0.2

Best regards,

On Wed, Dec 19, 2018 at 9:40 AM learn3dprintz notifications@github.com wrote:

Hey, I recently got a MKS TFT 32 and WIFI Module. Tried setting it up and it works fine in the AP mode. I am trying to activate the client mode, so it can be used remotely, but not able to do so. It does catch the wifi network, but shows IP as 0.0.0.0 and remains disconnected.

Can anyone please share the steps for Client Set up.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/makerbase-mks/MKS-TFT/issues/243, or mute the thread https://github.com/notifications/unsubscribe-auth/AUBPBY1Tg9bIZk4ilFEe1w7SZBWYM8fyks5u6iWjgaJpZM4ZaEbf .

kpdelucia commented 5 years ago

Could you explain what #dynamic access ip flag does? 1 =enable dynamic but yet when you chose dynamic you then set the fixed adress below. I dont even have the below section in my config. they are found in the router settings right?

IP/mask/gateway

cfg_ip_address:192.168.3.100 cfg_ip_mask:255.255.255.0 cfg_ip_gate:192.168.3.1

yanard3 commented 5 years ago

I just got one and I am at a loss. If anyone finds any instructions for setting this up it would be greatly appreciated. Mine dosen't seem to change regardless of what I change in the configuration.. I can see it with my phone and connect to it but that doesn't help much. I don't see it connecting to my router even though I give it the ssid and pw. I can turn it on and off at the touch screen. Also the ip never changes its alway 192.168.4.1

marcohaddad commented 5 years ago

It sounds like if the configuration file was not renamed back to mks_config.txt in order to be loaded again...

On Fri, Mar 15, 2019 at 6:07 PM yanard3 notifications@github.com wrote:

I just got one and I am at a loss. If anyone finds any instructions for setting this up it would be greatly appreciated. Mine dosen't seem to change regardless of what I change in the configuration.. I can see it with my phone and connect to it but that doesn't help much. I don't see it connecting to my router even though I give it the ssid and pw. I can turn it on and off at the touch screen. Also the ip never changes its alway 192.168.4.1

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/makerbase-mks/MKS-TFT/issues/243#issuecomment-473441392, or mute the thread https://github.com/notifications/unsubscribe-auth/AUBPBUR_itIKAaHMl6j1gLFyMm2mg4sgks5vXAuIgaJpZM4ZaEbf .

yanard3 commented 5 years ago

It sounds like if the configuration file was not renamed back to mks_config.txt in order to be loaded again... YUP.. That was the problem, I do remember reading that now :) Thank you

yanard3 commented 5 years ago

Well I fixed the connecting problem but now I have a loading problem. It is losing connection as the file is being uploaded halfway thru. I am using pronterface to send a gcode file over the wireless network and it appears to be sending ok but then I get disconnected. The printer starts to heat the bed and extruder and random things happen at the printer and pronterface freezes kinda it looks like it ran out of storage as the file was uploading I am not sure where the file is being stored SD card or mks gen l or mks tft28 memory. Debug shows the commands being sent and acknowledged. the file loads fast and then starts to slow then err's out then locks up. "cant write to printer" "socket error 10054" Does anyone use this and have had success?

kpdelucia commented 5 years ago

How did you fix the connection problem. I am an engineer but not a network engineer. Can you give me a push in the right direction? I was using the cura plug-in but it never connects

yanard3 commented 5 years ago

I renamed the config file to mks_config after changing the wifi setting in it to

wifi model(MKS WIFI TFT:0; MKS HLK-WIFI:1)

cfg_wifi_type:0

wifi mode(AP:1; STA:2)

cfg_wifi_mode:2

wifi name and password

cfg_wifi_ap_name:mySID enter your router ssid here cfg_wifi_key_code:myPassword enter the router password here

0:disable cloud service 1:enable cloud service

cfg_cloud_enable:0

cloud service adress

cfg_wifi_cloud_host:www.baizhongyun.cn

cloud service port

cfg_cloud_port:10086

Dynamic access IP

cfg_ip_dhcp_flag:1

IP/mask/gateway

cfg_ip_address:192.168.3.100 cfg_ip_mask:255.255.255.0 cfg_ip_gate:192.168.3.1

the rest doesn't seem to make any difference. pronterface is the program I am using but I am stuck trying to upload files to the printer connect by typing the ip address ie 192.168.1.123:8080 at the port box hope that helps let me know if you get it working

yanard3 commented 5 years ago

you can also check to see if you can connect by typing the ip address in your browser it will bring up a setup window from the wifi card

kpdelucia commented 5 years ago

@yanard3 I have a TFT35 and my config file was a little different see below . I got as far as you now i think. .. seems to be missing some items or maybe the TFT35 doesn't need them?

ip/mask/gateway. am i supposed to look these up on my router settings page? or is AP mode making a wifi hotspot to connect to so i choose those. I am trying to print from my desktop PC on the same network so i used STA.

I think i had corrupted the config file . i don't see any changes taking place when it boots up. I read something about notepad changing the encoding of the file if you don't use "save as ansi" and I have tried with and without the .TXT extension UPDATE: I downloaded a fresh config file from git hub and it worked when i saved it with .txt extension

############# WIFI Function #########

wifi mode(AP:1; STA:0) ap=printer is host? sta= Station =printer is client on your network different than tft32

cfg_wifi_mode:0

wifi name and password

cfg_wifi_ap_name: (mywifiname) CASE SENSITIVE!! found that out the hard way cfg_wifi_key_code: (my wifi password)

0:disable cloud service 1:enable cloud service 0: disable

cfg_cloud_enable:0

cloud service adress

>cfg_wifi_cloud_host:www.baizhongyun.cn

cloud service port

>cfg_cloud_port:10086

Dynamic access IP

cfg_ip_dhcp_flag:1

not in my config file

IP/mask/gateway only needed for making your printer AP (host) to a phone APP i think

cfg_ip_address:192.168.3.100
cfg_ip_mask:255.255.255.0 cfg_ip_gate:192.168.3.1

i was able to connect to the ip gate or address and get a gui to change to sta and create wifi name and password. But it did me no good when i rebooted the TFT35 with SD card installed

i got Ultimaker CURA to connect but keep getting an upload error on the screen and nothing prints. Update: rebooted this evening connected to ultimaker cura and tried to send a print and it worked. I even get a little picture of the part on the touch screen while it prints. next i have to figure out why pausing adds about 5mm to the Z position and resume doesnt go back down 5mm

kpdelucia commented 5 years ago

@yanard3 I found a video of a guy showing that you choose pronterface in Cura. There is a plug in for wireless connection in Cura i found on the mks github page (the video has no audio) https://youtu.be/DRbsuUqgL9I

File menu > Preferences

  1. "Print window" section > "Printing window type" > Select "Pronterface UI"
  2. Click Ok
  3. File menu > Print (or Ctrl + P)
  4. Wait for Cura to connect to printer
  5. Enter G-code commands

Another Video This guy gets real deep into the ESP WIFI board you might learn something you can use. https://youtu.be/pJGBRriNc9I