Not able to upload files
-
Disclosure: This is happening on a Chinese cloned Duet Wifi
Hello,
I'm not able to upload files anymore.This happened after a long print. Nothing special, maybe more vibrations than usual.
When I upload gcode or system files to the duet it always shows me "network error". Printing files uploaded by the PC works without problems, also reading config files.
What I've tried:
I've checked the sdcards using the procedure from https://www.walduk.at/2016/06/23/verifying-sdcards/ which does an md5sum over the whole space and they are good.
The one I'm using right now is a 4GB card. Formatted with dos partition, one primary over the while size. Filesystem was created withsudo mkfs.vfat -F 16 -s 128 -S 512 /dev/mmcblk0p1
I've tried various firmware versions for the ARM und ESP8266 and discovered no differences regarding this problem. I went up and down the DWC releases. This is the output of M122:
=== Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 2.03beta3 running on Duet WiFi 1.02 or later Board ID: 08DGM-9T6BU-FG3S4-6J9FD-3S86R-KBRZF Used output buffers: 1 of 20 (15 max) === RTOS === Static ram: 25632 Dynamic ram: 93524 of which 132 recycled Exception stack ram used: 272 Never used ram: 11512 Tasks: NETWORK(ready,412) HEAT(blocked,916) MAIN(running,3840) IDLE(ready,196) Owned mutexes: === Platform === Last reset 00:13:22 ago, cause: software Last software reset at 2019-04-16 22:41, reason: User, spinning module GCodes, available RAM 6736 bytes (slot 0) Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x04433000 BFAR 0xe000ed38 SP 0xffffffff Task 0x4e49414d Error status: 0 Free file entries: 10 SD card 0 detected, interface speed: 12.0MBytes/sec SD card longest block write time: 6.5ms, max retries 0 MCU temperature: min 30.1, current 31.4, max 31.4 Supply voltage: min 1.6, current 1.7, max 1.7, under voltage events: 0, over voltage events: 0, power good: no Driver 0: ok, SG min/max not available Driver 1: ok, SG min/max not available Driver 2: ok, SG min/max not available Driver 3: ok, SG min/max not available Driver 4: ok, SG min/max not available Date/time: 2019-04-19 12:26:09 Cache data hit count 2987855252 Slowest loop: 8.17ms; fastest: 0.07ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0 === Move === Hiccups: 0, FreeDm: 169, MinFreeDm: 169, MaxWait: 0ms Bed compensation in use: none Bed probe heights: 0.000 0.000 0.000 0.000 0.000 === MainDDARing === Scheduled moves: 0, completed moves: 0, StepErrors: 0, LaErrors: 0, Underruns: 0, 0 === AuxDDARing === Scheduled moves: 0, completed moves: 0, StepErrors: 0, LaErrors: 0, Underruns: 0, 0 === Heat === Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 Heater 1 is on, I-accum = 0.0 === GCodes === Segments left: 0, aux move: no Stack records: 1 allocated, 0 in use Movement lock held by null http is idle in state(s) 0 telnet is idle in state(s) 0 file is idle in state(s) 0 serial is ready with "M122" in state(s) 0 aux is idle in state(s) 0 daemon is idle in state(s) 0 queue is idle in state(s) 0 autopause is idle in state(s) 0 Code queue is empty. === Network === Slowest loop: 202.11ms; fastest: 0.08ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0) HTTP sessions: 1 of 8 - WiFi - Network state is running WiFi module is connected to access point Failed messages: pending 0, notready 0, noresp 1 WiFi firmware version 1.23 WiFi MAC address b4:e6:2d:60:af:ab WiFi Vcc 3.28, reset reason Turned on by main processor WiFi flash size 4194304, free heap 23768 WiFi IP address 192.168.178.35 WiFi signal strength -55dBm, reconnections 0, sleep mode modem Socket states: 0 0 0 0 0 0 0 0 ok The configuration is default except for ; Communication and general M111 S1 M550 PDuetTest ; Machine name and Netbios name (can be anything you like) M551 Preprap ; Machine password (used for FTP) ; Network M550 P"Anycubic Kossel" ; Set machine name M552 S1 ; Enable network M587 S"asdf" P"asdf" ; Configure access point. You can delete this line once connected M586 P0 S1 ; Enable HTTP
So what's interesting is the whole sd card stuff with M111 S1 P10 enabled:
M20 Read 0 1 2688 Read 0 1 3200 Begin file list something.gcode empty.gcode End file list ok
M22 SD card 0 may now be removed ok M21 Read 0 1 0 Read 0 1 2048 SDHC card mounted in slot 0, capacity 3.97Gb ok
M39 SD card 0 may now be removed ok Read 0 1 0 Read 0 1 2048 SDHC card mounted in slot 0, capacity 3.97Gb ok
I've checked the hardware. I know that you pay up to 30% of the product's value in China and I ordered the cheapest. So I was hoping that it's just a bad solder joint which is still working with capacitive coupling, but I discovered nothing. Here are pictures of the clone.
This is the sdcard slot. All pins seem good.
Right now I'm really disappointed. The board cost me 94 USD and 6 weeks of waiting. The Duet is roughly 50% more or 50 USD. I've invested 16 hours of my work time into debugging this shit and it's still not working. If I had bought the original, I would have at least my piece of mind by sending it in and not worrying about it. Warranty is difficult in China, even with Aliexpress.
-
I've tried various sd card related commands
M39 Read 0 1 2176 Read 0 1 2177 Read 0 1 2178 Read 0 1 2179 Read 0 1 2180 Read 0 1 2181 Read 0 1 2182 Read 0 1 2183 Read 0 1 2184 Read 0 1 2185 Read 0 1 2186 Read 0 1 2187 Read 0 1 2188 Read 0 1 2189 Read 0 1 2190 Read 0 1 2191 Read 0 1 2192 Read 0 1 2193 Read 0 1 2194 Read 0 1 2195 Read 0 1 2196 Read 0 1 2197 Read 0 1 2198 Read 0 1 2199 Read 0 1 2200 Read 0 1 2201 Read 0 1 2202 Read 0 1 2203 Read 0 1 2204 Read 0 1 2205 Read 0 1 2206 Read 0 1 2207 Read 0 1 2208 Read 0 1 2209 Read 0 1 2210 Read 0 1 2211 Read 0 1 2212 Read 0 1 2213 Read 0 1 2214 Read 0 1 2215 Read 0 1 2216 Read 0 1 2217 Read 0 1 2218 Read 0 1 2219 Read 0 1 2220 Read 0 1 2221 Read 0 1 2222 Read 0 1 2223 Read 0 1 2224 Read 0 1 2225 Read 0 1 2226 Read 0 1 2227 Read 0 1 2228 Read 0 1 2229 Read 0 1 2230 Read 0 1 2231 Read 0 1 2232 Read 0 1 2233 Read 0 1 2234 Read 0 1 2235 Read 0 1 2236 Read 0 1 2237 Read 0 1 2238 Read 0 1 2239 Read 0 1 2240 Read 0 1 2241 Read 0 1 2242 Read 0 1 2243 Read 0 1 2244 Read 0 1 2245 Read 0 1 2246 Read 0 1 2247 Read 0 1 2248 Read 0 1 2249 Read 0 1 2250 Read 0 1 2251 Read 0 1 2252 Read 0 1 2253 Read 0 1 2254 Read 0 1 2255 Read 0 1 2256 Read 0 1 2257 Read 0 1 2258 Read 0 1 2259 Read 0 1 2260 Read 0 1 2261 Read 0 1 2262 Read 0 1 2263 Read 0 1 2264 Read 0 1 2265 Read 0 1 2266 Read 0 1 2267 Read 0 1 2268 Read 0 1 2269 Read 0 1 2270 Read 0 1 2271 Read 0 1 2272 Read 0 1 2273 Read 0 1 2274 Read 0 1 2275 Read 0 1 2276 Read 0 1 2277 Read 0 1 2278 Read 0 1 2279 Read 0 1 2280 Read 0 1 2281 Read 0 1 2282 Read 0 1 2283 Read 0 1 2284 Read 0 1 2285 Read 0 1 2286 Read 0 1 2287 Read 0 1 2288 Read 0 1 2289 Read 0 1 2290 Read 0 1 2291 Read 0 1 2292 Read 0 1 2293 Read 0 1 2294 Read 0 1 2295 Read 0 1 2296 Read 0 1 2297 Read 0 1 2298 Read 0 1 2299 Read 0 1 2300 Read 0 1 2301 Read 0 1 2302 Read 0 1 2303 Read 0 1 2304 Read 0 1 2305 Read 0 1 2306 Read 0 1 2307 Read 0 1 2308 Read 0 1 2309 Read 0 1 2310 Read 0 1 2311 Read 0 1 2312 Read 0 1 2313 Read 0 1 2314 Read 0 1 2315 Read 0 1 2316 Read 0 1 2317 Read 0 1 2318 Read 0 1 2319 Read 0 1 2320 Read 0 1 2321 Read 0 1 2322 Read 0 1 2323 Read 0 1 2324 Read 0 1 2325 Read 0 1 2326 Read 0 1 2327 Read 0 1 2328 Read 0 1 2329 Read 0 1 2330 Read 0 1 2331 Read 0 1 2332 Read 0 1 2333 Read 0 1 2334 Read 0 1 2335 Read 0 1 2336 Read 0 1 2337 Read 0 1 2338 Read 0 1 2339 Read 0 1 2340 Read 0 1 2341 Read 0 1 2342 Read 0 1 2343 Read 0 1 2344 Read 0 1 2345 Read 0 1 2346 Read 0 1 2347 Read 0 1 2348 Read 0 1 2349 Read 0 1 2350 Read 0 1 2351 Read 0 1 2352 Read 0 1 2353 Read 0 1 2354 Read 0 1 2355 Read 0 1 2356 Read 0 1 2357 Read 0 1 2358 Read 0 1 2359 Read 0 1 2360 Read 0 1 2361 Read 0 1 2362 Read 0 1 2363 Read 0 1 2364 Read 0 1 2365 Read 0 1 2366 Read 0 1 2367 Read 0 1 2368 Read 0 1 2369 Read 0 1 2370 Read 0 1 2371 Read 0 1 2372 Read 0 1 2373 Read 0 1 2374 Read 0 1 2375 Read 0 1 2376 Read 0 1 2377 Read 0 1 2378 Read 0 1 2379 Read 0 1 2380 Read 0 1 2381 Read 0 1 2382 Read 0 1 2383 Read 0 1 2384 Read 0 1 2385 Read 0 1 2386 Read 0 1 2387 Read 0 1 2388 Read 0 1 2389 Read 0 1 2390 Read 0 1 2391 Read 0 1 2392 Read 0 1 2393 Read 0 1 2394 Read 0 1 2395 Read 0 1 2396 Read 0 1 2397 Read 0 1 2398 Read 0 1 2399 Read 0 1 2400 Read 0 1 2401 Read 0 1 2402 Read 0 1 2403 Read 0 1 2404 Read 0 1 2405 Read 0 1 2406 Read 0 1 2407 Read 0 1 2408 Read 0 1 2409 Read 0 1 2410 Read 0 1 2411 Read 0 1 2412 SD card in slot 0: capacity 3.97Gb, free space 3.96Gb, speed 12.00MBytes/sec, cluster size 64kb ok
So I've tried uploading stuff. This is the output of an empty gcode file:
Read 0 1 2688 Read 0 1 3200 Read 0 1 2688 Read 0 1 3200 Write 0 1 3200 Read 0 1 2688 Read 0 1 3200 Write 0 1 3200 Read 0 1 2688 Read 0 1 3200 Write 0 1 3200 Read 0 1 2688 Read 0 1 3200
No problems here. The same with a 2.8kb big file containing valid gcode:
Read 0 1 2688 Read 0 1 3200 Write 0 1 3200 Read 0 1 2176 Preallocating 2834 bytes returned 0 Write 0 5 3328 Write 0 1 2176 Write 0 1 2432 Read 0 1 3333 Write 0 1 3333 Read 0 1 3200 Write 0 1 3200 Read 0 1 2688 Read 0 1 3200 Write 0 1 3200 Read 0 1 2688 Read 0 1 3200 Read 0 1 2688 Read 0 1 3200 Read 0 1 2688 Read 0 1 3200 Read 0 1 2688 Read 0 1 3200 Read 0 4 3328 Read 0 1 3332 Read 0 1 3333 Read 0 4 3328
But if I continue the same file to 5,1kb it doesn't work anymore with this output:
Read 0 1 2688 Read 0 1 3200 Write 0 1 3200 Read 0 1 2176 Preallocating 5185 bytes returned 0 Write 0 5 3328 Write 0 1 2176 Write 0 1 2432 Read 0 1 3333 Write 0 1 3333 Read 0 1 3200 Write 0 1 3200 Read 0 1 2688 Read 0 1 3200 Read 0 1 2688 Read 0 1 3200 Write 0 1 3200 Read 0 1 2176 Write 0 1 2176 Write 0 1 2432
I've attached the 5,1kb file.0_1555670429300_much.gcode
-
You can use M122 P104 to test writing to the SD card without involving the network. You can optionally specify the file size in Mbytes using the S parameter, default 10Mb.
-
@dc42 Thanks a lot for your help! Do you have patreon / paypal?
M122 P104 S3500 ok Testing SD card write speed... SD write speed for 3500.0Mbyte file was 1.44Mbytes/sec
So it seems I'm on the wrong track
I uploaded the much.gcode file with networking debugging enabled:
New conn on socket 0 for local port 80 Found responder Received 549 bytes Received 1460 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes Received 1460 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes Received 1460 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes Received 911 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes New conn on socket 1 for local port 80 Found responder Received 359 bytes
And with Webserver Debugging enabled:
HTTP req, command words { POST /rr_upload HTTP/1.1 }, parameters { name=0:/gcodes/much.gcode time=2019-4-19T12:57:53 } Start uploading file 0:/gcodes/much.gcode length 15521 HTTP connection accepted HTTP req, command words { GET /rr_status HTTP/1.1 }, parameters { type=1 } Sending JSON reply, length 636 HTTP connection accepted HTTP req, command words { GET /rr_status HTTP/1.1 }, parameters { type=1 } Sending JSON reply, length 636 HTTP connection accepted HTTP req, command words { GET /rr_status HTTP/1.1 }, parameters { type=1 } Sending JSON reply, length 636 HTTP connection accepted HTTP req, command words { GET /rr_status HTTP/1.1 }, parameters { type=1 } Sending JSON reply, length 636 HTTP connection accepted HTTP req, command words { GET /rr_status HTTP/1.1 }, parameters { type=1 } Sending JSON reply, length 636 HTTP connection accepted HTTP req, command words { GET /rr_status HTTP/1.1 }, parameters { type=1 } Sending JSON reply, length 636 HTTP connection accepted HTTP req, command words { GET /rr_status HTTP/1.1 }, parameters { type=2 } Sending JSON reply, length 1370 HTTP connection accepted HTTP req, command words { GET /rr_status HTTP/1.1 }, parameters { type=1 } Sending JSON reply, length 636 HTTP connection accepted HTTP req, command words { GET /rr_status HTTP/1.1 }, parameters { type=1 } Sending JSON reply, length 636 HTTP connection accepted HTTP req, command words { GET /rr_status HTTP/1.1 }, parameters { type=1 } Sending JSON reply, length 636 HTTP connection accepted HTTP req, command words { GET /rr_status HTTP/1.1 }, parameters { type=1 } Sending JSON reply, length 636 HTTP connection accepted HTTP req, command words { GET /rr_status HTTP/1.1 }, parameters { type=1 } Sending JSON reply, length 636
Wifi Debugging gives me zero output
-
This is what chrome and firefox say with F12:
I've attached the pretty long lines as text files:
1_1555696698947_line19.txt 0_1555696698947_line34.txt -
Success! Thanks a lot dc42, I wouldn't have dared to suspect the Wifi network without your help. I've change the access point I'm connecting to and right now it's uploading at 500kb/s.
I really appreciate the software you've created here. If you give me some paypal link I'll send you some money. And, for what it's worth, my 3rd printer will get a original duet.
Now I will investigate why my fritz box's network doesn't work with the cloned duet.
EDIT: WPA2 (CCMP) does't work. WPA (TKIP) works.
-
So what was the resolution to this issue? I have the same problem, my machine keeps getting assigned different Web addreses and the last two have given me trouble with uploads.
-
@avion23 How do you change the access point? I have my access point as the router. FIOS-TWHNX
-
@novaprint I came home today and was able to upload the print that I could not upload earlier today. This does not solve the problem, it doe describes it.
-
@NOVAprint I've changed the encryption cipher for the Wifi in my router. WPA2 (CCMP) does't work. WPA (TKIP) works.
In my fritz box there is also a button to always assign the same ip to some device. Maybe your's too? Try changing down from WPA2 to WPA and post a screenshot if it still doesn't work.