Wifi module keeps disconnecting
-
Upgrades performed. First check is the wifi modem.
Bizarrely not only is the host name wrong in the modem but also the Mac Address? (Yet the IP is that of the Duet and I can connect to webcontrol.)
How can this be?config.g reads:
M550 PBigBoxPro
M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xED ; MAC Addresswifi router says:
mac address: 5C:CF:7F:2B:EE:BB
IP: 192.168.0.128
host name: *M122 reveals the following mac address:
5c:cf:7f:2b:ee:bb
Which matches what the Router is saying yet is different from config.g.
So config.g is not being taken into account? How so?
Here it is:[c]; Configuration file for BigBox 3D printer
; Communication and general
M111 S0 ; Debug off
M550 PBigBoxPro ; Machine name and Netbios name (can be anything you like)
M551 Preprap ; Machine password (used for FTP)
;*** If you have more than one Duet on your network, they must all have different MAC addresses, so change the last digits
M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xED ; MAC Address
;*** Wifi Networking
M552 S1 ; Enable WiFiM555 P2 ; Set output to look like Marlin
M575 P1 B57600 S1 ; Comms parameters for PanelDue
; Movement section
M569 P0 S1 ; Drive 0 goes forwards (change to S0 to reverse it)
M569 P1 S1 ; Drive 1 goes forwards
M569 P2 S0 ; Drive 2 goes forwards - Z axis
M569 P3 S1 ; Drive 3 goes forwards
M569 P4 S1 ; Drive 4 goes forwards
M574 X1 Y1 Z1.2 S1 ; set endstop configuration (X and Y endstops only, at low end, active high)
M906 X800 Y600 Z800 E1000 ; Set motor currents (mA)
M201 X800 Y800 Z15 E1000 ; Accelerations (mm/s^2)
M203 X8000 Y8000 Z360 E1000 ; Maximum speeds (mm/min)
M566 X600 Y600 Z30 E20 ; Minimum speeds mm/minute
M208 X300 Y240 Z270 ; set axis maxima (adjust to suit your machine)
M208 X0 Y0 Z-0.2 S1 ; set axis minimum (adjust to make X=0 and Y=0 the edge of the bed)
M92 X160 Y360 Z1600 ; Set axis steps/mm
M92 E304:354 ; Set extruder steps per mm
G21 ; Work in millimetres
G90 ; Send absolute coordinates…
M83 ; ...but relative extruder moves
M350 X16 Y16 E16 I1 ; Set 256x microstepping with interpolation; Z probe section
M558 P1 X0 Y0 Z1 H3 F200 T5000 ; Smart IR Z probe, used for homing Z axis, dive height 3mm, probe speed 200mm/min, travel speed 5000mm/min
G31 X-5 Y35 Z1.90 P500 ; Set the probe height and threshold (put your own values here)
G29 S1 ; load height map from mesh levelling; Heater and thermistor section
M305 P1 X200 ; specify channel PT400 board
;*** If you have a Duet board with 1K thermistor series resistors, change R4700 to R1000 to the following M305 commands: set to R400 if using PT100 daughter board
M305 P0 T100000 B4388 R4700 H30 L0 ; Put your own H and/or L values here to set the heated bed thermistor ADC correction
M305 P1 T100000 B4388 R400 H30 L0 ; Put your own H and/or L values here to set the first nozzle PT100
;M305 P2 R400 H0 L0 ; Put your own H and/or L values here to set the second nozzle thermistor ADC correction
M301 H1 P10 I0.10 D100 T0.50 S1.0 ; default PID settings for extruder 0 (over-ruled by below FOPD settings from calibration)
M301 H2 P10 I0.10 D100 T0.50 S1.0 ; default PID settings for extruder 1M307 H1 A384.2 C170.8 D9.5 B0 ;FOPD nozzle calibration system overrides above M301
M307 H0 A225.5 C555.7 D4.3 B0 ;FOPD bed calibration system overrides above M301M570 S120 ; Increase to allow extra heating time if needed
M106 F10 ; Fix for Bigbox Blower - Drop Blower Fan PWM from 250 to 10 Hz per Tim Elmore
M106 P1 F22500 S0.4 T40 H1 ; Trigger hotend 1 (left) fan at 40 C, PWM 40% @ 22500Hz; Tool definition section
M563 P0 D0 H1 ; Define tool 0 to use extruder drive 0 and heater 1
G10 P0 S0 R0 ; Set tool 0 operating and standby temperatures
;*** If you have a dual-nozzle build, un-comment the following 2 lines
;M563 P1 D1 H2 ; Define tool 1
;G10 P1 S0 R0 ; Set tool 1 operating and standby temperatures; Bed probe section (not needed if you use a bed.g file)
;*** Adjust the XY coordinates in the following M557 commands to suit your build and the position of your Z probe
M557 P0 X60 Y0 ; Four...
M557 P1 X60 Y165 ; ...probe points...
M557 P2 X200 Y165 ; ...for bed...
M557 P3 X200 Y0 ; ...levelling
;M557 P4 X141 Y82.5 ; 5th probe point for levelling (un-comment this to get a 5th point at the centre of the bed); Epilogue
;*** If you are using axis compensation, put the figures in the following command
M556 S78 X0 Y0 Z0 ; Axis compensation here
T0[/c] -
See under M540 in the GCore wiki page at https://duet3d.dozuki.com/.
-
Thanks for the heads up on M540.
Still have the permanently–not-responding-over-wifi problem.
When it's in that state this is what M122 looks like now under 1.21RC3:
[c]SENT: m122
READ: === Diagnostics ===
READ: Used output buffers: 5 of 32 (14 max)
READ: === Platform ===
READ: RepRapFirmware for Duet 2 WiFi/Ethernet version 1.21RC3 running on Duet WiFi 1.0 or 1.01
READ: Board ID: 08D6M-91AST-L23S4-7JTDL-3SD6N-96X5K
READ: Static ram used: 16144
READ: Dynamic ram used: 100448
READ: Recycled dynamic ram: 2192
READ: Stack ram used: 3568 current, 4648 maximum
READ: Never used ram: 7640
READ: Last reset 00:57:47 ago, cause: software
READ: Last software reset at 2018-03-11 13:17, reason: User, spinning module GCodes, available RAM 3752 bytes (slot 1)
READ: Software reset code 0x0003 HFSR 0x00000000, CFSR 0x00000000, ICSR 0x0041f000, BFAR 0xe000ed38, SP 0xffffffff
READ: Error status: 0
READ: Free file entries: 10
READ: SD card 0 detected, interface speed: 12.0MBytes/sec
READ: SD card longest block write time: 0.0ms
READ: MCU temperature: min 30.6, current 30.8, max 31.1
READ: Supply voltage: min 24.5, current 24.6, max 24.6, under voltage events: 0, over voltage events: 0
READ: Driver 0: standstill, SG min/max not available
READ: Driver 1: standstill, SG min/max not available
READ: Driver 2: standstill, SG min/max not available
READ: Driver 3: standstill, SG min/max not available
READ: Driver 4: standstill, SG min/max not available
READ: Date/time: 2018-03-11 14:14:53
READ: Slowest main loop (seconds): 0.156608; fastest: 0.000047
READ: === Move ===
READ: MaxReps: 0, StepErrors: 0, LaErrors: 0, FreeDm: 240, MinFreeDm 240, MaxWait: 0ms, Underruns: 0, 0
READ: Scheduled moves: 0, completed moves: 0
READ: Bed compensation in use: mesh
READ: Bed probe heights: 0.000 0.000 0.000 0.000 0.000
READ: === Heat ===
READ: Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1
READ: Heater 1 is on, I-accum = 0.0
READ: === GCodes ===
READ: Segments left: 0
READ: Stack records: 1 allocated, 0 in use
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: serial is ready with "m122" in state(s) 0
READ: aux is idle in state(s) 0
READ: daemon is idle in state(s) 0
READ: queue is idle in state(s) 0
READ: autopause is idle in state(s) 0
READ: Code queue is empty.
READ: === Network ===
READ: Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0)
READ: HTTP sessions: 1 of 8
READ: - WiFi -
READ: Network state is running
READ: WiFi module is idle
READ: Failed messages: pending 0, notready 0, noresp 0
READ: WiFi firmware version 1.21RC3(28b1)
READ: WiFi MAC address 5c:cf:7f:2b:ee:bb
READ: WiFi Vcc 3.42, reset reason Turned on by main processor
READ: WiFi flash size 4194304, free heap 18200
READ: Socket states: 0 0 0 0 0 0 0 0
READ: === Expansion ===
READ: ok[/c] -
The report says "WiFi module is idle" meaning that either it was never connected to the AP, or it was but something caused it to disconnect.
-
It was connected to the access point. And working fine.
I think it continued to be connected to the access point. Because if I try to connect, the web browser gives the message:
"unable to open the page because the server unexpectedly dropped the connection….. This sometimes happens when the server is busy..."
Whereas if I invent an IP on the same network the browser gives a message:
"unable to open the page.... because the server where the page is located isn't responding"
Also the Duet continues to show on the wifi router admin page.
So... something weird going on in the wifi stack?
-
I had erroneously loaded 1.21RC3 WifiServer….. Have now tested 1.21RC4 for a good hour and it seems to have cracked the problem.
Well done!
On the wifi router still see a "*" instead of the name of the printer, but who cares?
Really this embedded wifi has caused such grief over the years.... Yet also on home network have another ESP device - https://luftdaten.info/en/construction-manual/ - and it just seems to tick over without causing any trouble.
-
Thanks. It looks like the new SDK from Expressiv that fixed the KRACK WPA vulnerability introduced a new issue, but they seem to have resolved it in the more recent version that we use in RC4. Your other device is probably using the SDK that predates the KRACK fix.
-
ps don't forget the two links (from the documentation to the Betas on github) are broken: https://duet3d.dozuki.com/Wiki/Firmware_Overview#Section_Betas
-
ps don't forget the two links (from the documentation to the Betas on github) are broken: https://duet3d.dozuki.com/Wiki/Firmware_Overview#Section_Betas
Thanks, I've corrected that link.
-
I've gone through the Troubleshooting AJAX errors and my last signal strength says 50dbm. I can't stay connected for more than a minute before I get a request timeout. I'm using firmware, server & web control 1.21. Where should I go from here?
-
@kirk001, have you tried changing your router WiFi channel between 1, 6 and 11 ?
-
@dc42 Yes, sir. All 3 and same result.
-
I think we need to change your Duet in case the WiFi module is faulty. Please contact your supplier. If you purchased it directly from Duet3D, see https://duet3d.com/warranty.
-
Thank you.
-
I just received my warranty replacement board and installed it. I'm getting fewer disconnect errors, but I'm still getting them. My M122 shows "WiFi signal strength -50dBm, reconnections 0, sleep mode modem."
I don't think I've configured anything incorrectly, but a second defective board would be quite unlucky. What are my options for getting this to work consistently?
-
kirk001 - the solution I used was to create a Wireless Hosted Network on my Win10 workstation that I use to access the Duet. This has the added bonus of keeping the Duet offline. If your computer is closer to the printer than your router it could be worth a shot. There's similar functions in Linux.
-
Both my computer and the printer are 6 feet away from the router. I have a raspberry pi 10 feet away that can has no problem staying connected.
I can't believe I spent almost $200 on this and still can't print 4 months later.
-
@kirk001 said in Wifi module keeps disconnecting:
I just received my warranty replacement board and installed it. I'm getting fewer disconnect errors, but I'm still getting them. My M122 shows "WiFi signal strength -50dBm, reconnections 0, sleep mode modem."
I don't think I've configured anything incorrectly, but a second defective board would be quite unlucky. What are my options for getting this to work consistently?
I'm sorry to hear that you are still getting problems. I would expect a signal strength a little better than -50dBm if the Duet is only 6ft from your router, but -50dBm should be enough for a reliable connection.
A few questions:
- Do the disconnections occur when the Duet is idle, or only when printing?
- Have you increased the maximum number of Ajax retries in the settings/general page of DWC?
- Do you have a password set, other than the default "reprap"?
-
Signal strength ranges from -40-50dBm, but -50dBM is the worst it gets. The board is sitting at the bottom of my Hypercube--I don't know if that is what's making the signal strength worse at 6ft.
Disconnections occur when idle. I haven't been able to print. I can't stay connected more than 10 seconds. I've tried channels 1,6, and 11. I'm using a Netgear Nighthawk and I had 4 other devices on the 2.4G working fine. I removed the other 4 devices in case they might interfere with the Duet.
AJAX retries are at 5.
And have no password at the moment (it was really tedious to have to enter a password 5 times in one minute because it kept disconnecting every 10 seconds.) -
@kirk001 said in Wifi module keeps disconnecting:
Disconnections occur when idle. I haven't been able to print. I can't stay connected more than 10 seconds.
That's worse than I've ever heard happen before. Please can you connect a PC running e.g. YAT or Pronterface to the Duet, and send M111 S1 P13 (if using YAT, set the end-of-line sequence to "LF only"). This will enable WiFi debugging. When DWC connects, you will see a few lines of debug. When you get a disconnection, there may be some more debug messages - please post them here.
And have no password at the moment (it was really tedious to have to enter a password 5 times in one minute because it kept disconnecting every 10 seconds.)
The latest DWC (1.21.1) remembers the password when it reconnects.