Change Wifi via Config?
-
So if i just add this to my config at the Bottom it should work right?
M98 P0:/Macros/WifiReset.g
G4 S5 ; wait 5 seconds
M98 P0:/Macros/WifiClear.g
G4 S5 ; wait 5 seconds
M98 P0:/Macros/WifiReset.g(I created the Files i call here with the Code from the Linked Post)
-
@bearer said in Can't access wifi:
That ***** me off... so I tried on a board here.
Think the second G4 is redundant, but uncomment if it still doesn't work. Confirmed working from config.g even though its baaaaaad mojo.
M552 S-1 M552 S0 ; take AP out of reset, just in case G4 S1 M588 S"*"; forget all previous access point info ;G4 S1 M587 S"---" P"---" M552 S1
replace
----
with your ssid and password will clear old and add a new network. remove/comment out M588 to prevent clearing old networks. -
Didn't work i don't know why...
tryed at the End of my config.g File:
first:
M98 P0:/Macros/WifiReset.g; WifiReset.g
; Use in case wifi module is not running. (Blue light off)
;
M291 R"Reset wifi module? Y/N" P"Caution. Will cause pause in print" S3 T10
M552 S0 ; Disable network module
G4 S5 ; wait 5 seconds
M552 S1 ; Enable network module
M291 P"Wifi module reset. Check console or DWC."second:
M98 P0:/Macros/WifiClear.g;WifiClear.g
; Clear all wifi networks
;
M291 R"Clear WIFI networks? Y/N" P"Caution. New network must be added." S3 T10
M552 S0 ; Disable network module
G4 S5 ; wait 5 seconds
M588 S"*" ; Clear all saved wifi networls
M291 R"WIFI networks forgotten." P"You must add a new WIFI network."third:
M98 P0:/Macros/WifiAdd.g; WifiAdd.g
; Add default wifi network
;
M291 R"Add default WIFI network? Y/N" P"This will add duetwifi access point." S3 T10M552 S0 ; Disable network module
G4 S5 ; wait 5 seconds
M587 S"myNetworkName" P"NetworkPassword" ; Add duetwifi SSID to remembered networks list
G4 S5 ; wait 5 seconds
M552 S1 ; reenable wifi module
M291 R"NetworkName added." P"Check console to verify IP address."What was wrong? (And yes i changed my NetworkName and NetworkPassword to my)
-
hmm, seems i didn't look too closely at the macro Phaedrux made - M291 without a display might not be a good fit, comment out and it should proceed.?
-
tried it again without the line M291 and no success
-
The down side is the error messages will be on the usb console; if you have a 3.3v usb ttl adapter you can hook up to the PanelDue port
I can only attest to the 7 lines I tried myself beyond that idk.
-
So no other way?
-
Three other ways:
- If you have a PanelDue, you can use it to enter the M587 and other commands.
- In your config.g file include M552 S0 to put the wifi module into Idle mode. Then set up a trigger on one of the endstop inputs using the M581 command, and in the trigger file execute the M587 command, followed by M552 S1.
- Recent 3.01RC firmware releases run the file sys/runonce.g after running config.g. You can put the M587 and other commands in runonce.g. The file is deleted after it has been run.
-
@dc42 The only option that i have is the 2. Way cause it runs on Version 2. something and i got no external Display.
I understand kind of what you want but don't know how to do it. -
@AS-3D-Druck said in Change Wifi via Config?:
I understand kind of what you want but don't know how to do it.
https://duet3d.dozuki.com/Wiki/Gcode#Section_M581_Configure_external_trigger
Does this help?
@bearer said in Change Wifi via Config?:
hmm, seems i didn't look too closely at the macro Phaedrux made - M291 without a display might not be a good fit, comment out and it should proceed.?
The macros from that other thread assume you have a PanelDue to be able to use them as is, or a USB terminal with some modification.
-
@AS-3D-Druck said in Change Wifi via Config?:
@dc42 The only option that i have is the 2. Way cause it runs on Version 2. something and i got no external Display.
I understand kind of what you want but don't know how to do it.if you tried
@bearer said in Can't access wifi:
Think the second G4 is redundant, but uncomment if it still doesn't work. Confirmed working from config.g even though its baaaaaad mojo.M552 S-1 M552 S0 ; take AP out of reset, just in case G4 S1 M588 S"*"; forget all previous access point info ;G4 S1 M587 S"---" P"---" M552 S1
replace
----
with your ssid and password will clear old and add a new network. remove/comment out M588 to prevent clearing old networks.i suspect there is a problem either with the duet or exteral to the duet, because it worked when i tried it on 2.02 and 2.05
are there any special characters in your ssid or key, hidden ssid, brand of router, type of encryption etc?