Cannot connect to wifi
-
Thanks for your reply!
I'm using Simplify3D over USB.Here are the responses to the following commands (I changed mentions of my SSID to "SSID"):
M552:
READ: WiFi module is idle
M552 S-1:
READ: WiFi module stopped
M552 S0:
Usually says: READ: WiFi module is idle
Right after M552 S-1 it says: READ: WiFi module started
M552 S1
READ: Error: WiFi module reported: Failed while trying to connect to SSID
M587
READ: Remembered networks:
READ: SSID IP=0.0.0.0 GW=0.0.0.0 NM=0.0.0.0
READ: ok
READ: Error: WiFi module reported: Failed while trying to connect to SSID
READ: WiFi module is idleAnd here is the response to M122:
READ: === Diagnostics ===
READ: RepRapFirmware for Duet 2 WiFi/Ethernet version 3.4.6 (2023-07-21 14:08:28) running on Duet WiFi 1.02 or later + DueX5v0.11
READ: Board ID: 0JD2M-9F8TA-GJ4TJ-6JTD0-3SN6T-K6SL4
READ: Used output buffers: 1 of 26 (3 max)
READ: === RTOS ===
READ: Static ram: 23896
READ: Dynamic ram: 78004 of which 0 recycled
READ: Never used RAM 10180, free system stack 193 words
READ: Tasks: NETWORK(ready,7.7%,325) HEAT(notifyWait,0.0%,333) Move(notifyWait,0.0%,363) DUEX(notifyWait,0.0%,24) MAIN(running,92.1%,461) IDLE(ready,0.2%,30), total 100.0%
READ: Owned mutexes: USB(MAIN)
READ: === Platform ===
READ: Last reset 00:07:50 ago, cause: power up
READ: Last software reset details not available
READ: Error status: 0x00
READ: Aux0 errors 0,0,0
READ: Step timer max interval 0
READ: MCU temperature: min 13.6, current 21.6, max 21.8
READ: Supply voltage: min 0.0, current 0.6, max 0.9, under voltage events: 0, over voltage events: 0, power good: no
READ: Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
READ: Events: 0 queued, 0 completed
READ: Driver 0: ok, SG min n/a
READ: Driver 1: ok, SG min n/a
READ: Driver 2: ok, SG min n/a
READ: Driver 3: ok, SG min n/a
READ: Driver 4: ok, SG min n/a
READ: Driver 5: ok, SG min n/a
READ: Driver 6: ok, SG min n/a
READ: Driver 7: ok, SG min n/a
READ: Driver 8: ok, SG min n/a
READ: Driver 9: ok, SG min n/a
READ: Driver 10:
READ: Driver 11:
READ: Date/time: 1970-01-01 00:00:00
READ: Cache data hit count 4294967295
READ: Slowest loop: 99.78ms; fastest: 0.13ms
READ: I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
READ: === Storage ===
READ: Free file entries: 10
READ: SD card 0 detected, interface speed: 20.0MBytes/sec
READ: SD card longest read time 3.1ms, write time 0.0ms, max retries 0
READ: === Move ===
READ: DMs created 83, segments created 0, maxWait 0ms, bed compensation in use: none, comp offset 0.000
READ: === MainDDARing ===
READ: Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
READ: === AuxDDARing ===
READ: Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
READ: === Heat ===
READ: Bed heaters 0 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0
READ: === GCodes ===
READ: Segments left: 0
READ: Movement lock held by null
READ: HTTP is idle in state(s) 0
READ: Telnet is idle in state(s) 0
READ: File is idle in state(s) 0
READ: USB is ready with "m122" in state(s) 0
READ: Aux is idle in state(s) 0
READ: Trigger is idle in state(s) 0
READ: Queue is idle in state(s) 0
READ: LCD is idle in state(s) 0
READ: Daemon is idle in state(s) 0
READ: Autopause is idle in state(s) 0
READ: Code queue is empty
READ: === DueX ===
READ: Read count 1, 0.13 reads/min
READ: === Network ===
READ: Slowest loop: 1.35ms; fastest: 0.00ms
READ: Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0)
READ: HTTP sessions: 0 of 8
READ: = WiFi =
READ: Interface state: changingMode
READ: Module is trying to connect
READ: Failed messages: pending 0, notready 0, noresp 0
READ: WiFi firmware version 1.27
READ: WiFi MAC address 4c:75:25:1c:0d:5e
READ: WiFi Vcc 3.37, reset reason Power up
READ: WiFi flash size 2097152, free heap 29240
READ: Clock register 00002002
READ: Socket states: 0 0 0 0 0 0 0 0 -
@z_big said in Cannot connect to wifi:
I'm using Simplify3D over USB.
Most likely, if you're using Simplify3D to send commands over USB (I didn't know it has this functionality), it is converting lower case letters to upper case, and may be ignoring any special characters, so your WiFi SSID and password is not being sent correctly when you send the M587 command. This is why we recommend using YAT. It looks like you did send an M587 command, but the SSID was blank, and that's what has been saved.
To try again, send the following (don't include the parts after the semicolon, they are just explaining what the command is doing):
M552 S-1 ; turn off wifi M552 S0 ; turn on wifi in idle mode M588 S"*" ; if necessary, delete all existing saved SSIDs M587 S"your-network-ssid" P"your-network-password" ; add new SSID M552 S1 ; enable networking
Change "your-network-ssid" and "your-network-password" to those of your network.
If you don't want to download YAT, an alternative is to create a text file in a text editor, name it 'runonce.g' and copy it to the /sys folder on the SD card. It should contain:
M552 S-1 ; turn off wifi G4 S2 ; wait for wifi state to change M552 S0 ; turn on wifi in idle mode G4 S2 ; wait for wifi state to change M588 S"*" ; if necessary, delete all existing saved SSIDs G4 S2 ; wait for wifi state to change M587 S"your-network-ssid" P"your-network-password" ; add new SSID G4 S2 ; wait for wifi state to change M552 S1 ; enable networking
If file runonce.g is present at startup, it is run after running config.g and activating the network, and then deleted. This should set up your network.
Ian
-
Thanks for this! Yep, Simplify3D has it! I use it with an identical printer at work and it seems to do great. Just in case though, I created the runonce.g file as you said and put it in the /sys folder. Unfortunately, I am still getting the following:
READ: Error: WiFi module reported: no known networks found
READ: WiFi module is idle -
@z_big can you post your runonce file? I suspect something is wrong with the M587 command. Can you send M587 again, to see if there are any remembered networks?
Also make sure your WiFi works on 2.4GHz, the Duet can’t connect to 5GHz WiFi.
Ian
-
Hi! Yep, here it is (I have my actual SSID and password in place of "SSID" and "password"):
M552 S-1 ; turn off wifi
G4 S2 ; wait for wifi state to change
M552 S0 ; turn on wifi in idle mode
G4 S2 ; wait for wifi state to change
M588 S"*" ; if necessary, delete all existing saved SSIDs
G4 S2 ; wait for wifi state to change
M587 S"SSID" P"password" ; add new SSID
G4 S2 ; wait for wifi state to change
M552 S1 ; enable networkingI ran M587 again and it is saying
READ: LAB IP=0.0.0.0 GW=0.0.0.0 NM=0.0.0.0Also it is now saying this:
READ: Error: WiFi module reported: Didn't find access point while trying to connect to LABI created the SSID called LAB specifically to only run on 2.4 GHz, so I'm sure it's not trying to connect to 5 GHz
-
Can you follow this guide to setting up the Duet wifi module in access point mode? This will eliminate your wireless network from the equation entirely so we can verify the duet wifi hardware is working.
https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m589-configure-access-point-parameters
This will create a network on the Duet that you will connect your wifi device (phone or computer) to and access the web interface that way. If this works, we know that the wifi module is in fact working.
-
@Phaedrux It worked! I was able to control the printer using DWC. Does that indicate that the issue could be my wifi? Is there anything else you know of that I could check?
-
Well it shows that the Duet hardware is good, so that's a start.
I think we should take the error message you're getting at face value.
READ: Error: WiFi module reported: Didn't find access point while trying to connect to LAB
So either the details of the SSID were incorrectly entered, or the SSID isn't actually 2.4ghz.
-
Not helpful for your case - and while it was RepRapFirmware, it wasn't Duet hardware (was a Troodon 2 for work), I could not for the life of me get the printer to connect to a WiFi network. Would have to check the specific router/switch, but it was a newer dual band Netgear device. I set the printer up in access point mode, and haven't had an issue since.
I tried everything I could think of on the Netgear switch - simple access point name and password, disabled all security, disabled the 5ghz band, yet still no luck. Would be interesting to give it another shot at some point.
-
READ: WiFi firmware version 1.27
From your last M122, you're using a version of the WiFi firmware that should work, and is shipped with RRF 3.4.6, but we have updated it to use the latest SDK (software development kit) from Expressif. This may be more compatible with more modern routers. If you would like to try it, upload the "DuetWiFiServer.bin" (NOT any of the ones with '_32' in their name) from https://github.com/Duet3D/WiFiSocketServerRTOS/releases/tag/2.1beta7 to your Duet in DWC. When it flashes the firmware, you will lose connection, and you will need to connect via USB and setup your WiFi again with M587, or in access point mode with M589.
Ian
-
Thanks so much for this! I'm definitely getting fewer error messages now. It still won't connect to my wifi though; I am now getting this message:
READ: Error: WiFi module reported: Authentication failed
-
@z_big How is the WiFi setup on your router? As a standard WPA2-PSK? It sounds like it may be set up for WiFi Enterprise Authentication, if you are getting an 'Authorisation failed' message. This version of the Duet WiFi Server added support for that, see the extra X, E, A, U, P and Q parameters for M587: https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m587-add-wifi-host-network-to-remembered-list-or-list-remembered-networks
Ian
-
Thanks for all your continued help! I really appreciate it. Yep, it is set to the standard WPA2-PSK; I triple-checked it. Could encryption type have anything to do with it? I see options for either TKIP or AES. I don't really know what they mean, but at this point I'm just trying anything that might work haha.
@Phaedrux
That's what it seemed like to me too; that's why I created a special guest network that only runs on 2.4 GHz and has a simple password that is impossible to mess up -
@z_big WPA2-PSK is the default for Duet, so that should work. AES is the more normal encryption, and again, that should work. A couple of things... what version is your Duet 2 WiFi? Does it have an external antenna, or is the antenna part of the board? How far is the router from the Duet?
For Duet 2 WiFi with built in antennas, using Channel 1 can be a problem. If possible, use a higher channel on the router, usually 6 or 11. This is mentioned on this page, which may have some other tips: https://docs.duet3d.com/en/User_manual/Troubleshooting/WiFi_troubleshooting
Cordless phones and microwave ovens can cause big problems for WiFi too.Ian
-
@droftarts The duet has its antenna as part of the board. The router is probably 15 feet away, but on the floor above (so diagonally from the printer).
I tried switching it to both channel 6 and channel 11, but I am still getting the "Authentication failed" error.
My cordless phone is pretty close, so I tried unplugging it, but still nothing.
I also tried adjusting the antennae on my router; it improved my RSSI from -56 dBm to -51 dBm. That didn't seem to help either. But maybe that is still not strong enough? -
@droftarts Is there anything else I should try?
-
@z_big I would try changing the router password to something really simple, at least to test connection. Something with no special characters, just upper case and numbers. Are you still using the serial terminal in Simplify3D still to send the commands? Can you also screen shot the Router setup (obfuscate the SSID and password as necessary), maybe there's something in there?
Please also send M122 to the Duet and post the response, if possible.
Ian
-
This post is deleted! -
This post is deleted!