DWC 'Connection' issues
-
I have a Duet 3 mini 5+, with Rasp Pi (3B+) & display.
I am having some odd issues connecting:- When I power on, the WiFi generally remains 'unassociated'. I can leave it for an hours, and wifi doesn't connect. Then, If I plug in a cable, and open SSH, do a 'ifconfig' I see wifi is up (then all the sudden I can use wifi)
- When I connect - via cable or wifi, I will immediately see the DWC layout, then a diag saying 'Connecting...' - this almost always times out, and I get an error that http isn't working.
Mind you, this is frequent, and random, but I do occasionally connect, and have been able to commision my printer - so yes, wifi is configured correctly.
When I booted the Pi, I did an apt update / upgrade, so I should have the latest of everything.I would really like networking to be more reliable - any ideas?
-
@larrylf
If I get you right, you don't use the RasPi as SBC, but want to connect the Pi and Duetmini5 via WiFi?
If so, you might need a switch or router between them for reliability.
Or you have to boot the Pi before starting the Duet5? -
@o_lampe No, I am using the Pi as an SBC
-
Can you send M122 and share the results?
If you have a spare SD card I would suggest downloading a fresh copy of the DuetPi image and test with a fresh install to see if the behaviour improves.
How far is the Pi from the wifi router?
-
@phaedrux Wifi router is about 30' away, on a lower floor. The signal shows a strong on other devices. I have several wifi devices in the room, and none have problems connecting.
Also, the behavior I'm seeing with ssh make me thing its not a device problem, but something in the DWC SW (when wifi itself finally does show up, the dwc console shows immediately, but then fails to connect - not sure if this means connect with the duet (I never see this error on the Pi screen), or some other connection ig going on after the initial html layout,M122:
m122
=== Diagnostics ===
RepRapFirmware for Duet 3 Mini 5+ version 3.4.1 (2022-06-01 21:06:56) running on Duet 3 Mini5plus WiFi (SBC mode)
Board ID: P76RB-H396U-D65J0-40KM8-ML03Z-Z7HZZ
Used output buffers: 1 of 40 (12 max)
=== RTOS ===
Static ram: 103684
Dynamic ram: 99256 of which 0 recycled
Never used RAM 38772, free system stack 206 words
Tasks: SBC(ready,2.1%,452) HEAT(notifyWait,0.1%,358) Move(notifyWait,0.0%,363) CanReceiv(notifyWait,0.0%,942) CanSender(notifyWait,0.0%,372) CanClock(delaying,0.0%,339) TMC(notifyWait,0.7%,114) MAIN(running,95.0%,558) IDLE(ready,1.4%,29) AIN(delaying,0.8%,273), total 100.0%
Owned mutexes: HTTP(MAIN)
=== Platform ===
Last reset 00:01:42 ago, cause: power up
Last software reset at 2022-07-24 13:48, reason: User, GCodes spinning, available RAM 38696, slot 2
Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00000000 BFAR 0xe000ed38 SP 0x00000000 Task SBC Freestk 0 n/a
Error status: 0x00
MCU revision 3, ADC conversions started 102555, completed 102555, timed out 0, errs 0
Step timer max interval 1490
MCU temperature: min 21.6, current 27.1, max 27.3
Supply voltage: min 24.1, current 24.1, max 24.2, under voltage events: 0, over voltage events: 0, power good: yes
Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
Events: 1 queued, 1 completed
Driver 0: standstill, SG min 0, read errors 0, write errors 0, ifcnt 11, reads 5370, writes 11, timeouts 0, DMA errors 0, CC errors 0
Driver 1: standstill, SG min 0, read errors 0, write errors 0, ifcnt 11, reads 5370, writes 11, timeouts 0, DMA errors 0, CC errors 0
Driver 2: standstill, SG min 0, read errors 0, write errors 0, ifcnt 11, reads 5369, writes 11, timeouts 0, DMA errors 0, CC errors 0
Driver 3: standstill, SG min 0, read errors 0, write errors 0, ifcnt 11, reads 5369, writes 11, timeouts 0, DMA errors 0, CC errors 0
Driver 4: standstill, SG min 0, read errors 0, write errors 0, ifcnt 11, reads 5370, writes 11, timeouts 0, DMA errors 0, CC errors 0
Driver 5: not present
Driver 6: not present
Date/time: 2022-07-26 04:49:59
Cache data hit count 237203523
Slowest loop: 56.38ms; fastest: 0.10ms
=== Storage ===
Free file entries: 10
SD card 0 not detected, interface speed: 0.0MBytes/sec
SD card longest read time 0.0ms, write time 0.0ms, max retries 0
=== Move ===
DMs created 83, segments created 0, maxWait 0ms, bed compensation in use: none, comp offset 0.000
=== MainDDARing ===
Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== AuxDDARing ===
Scheduled moves 0, completed 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
=== Heat ===
Bed heaters 0 -1 -1 -1, chamber heaters -1 -1 -1 -1, ordering errs 0
=== GCodes ===
Segments left: 0
Movement lock held by null
HTTP* is doing "M122" in state(s) 0
Telnet is idle in state(s) 0
File is idle in state(s) 0
USB is idle in state(s) 0
Aux is idle in state(s) 0
Trigger* is idle in state(s) 0
Queue is idle in state(s) 0
LCD is idle in state(s) 0
SBC is idle in state(s) 0
Daemon is idle in state(s) 0
Aux2 is idle in state(s) 0
Autopause is idle in state(s) 0
Code queue is empty
=== CAN ===
Messages queued 829, received 0, lost 0, boc 0
Longest wait 0ms for reply type 0, peak Tx sync delay 0, free buffers 18 (min 18), ts 512/0/0
Tx timeouts 0,0,511,0,0,316 last cancelled message type 30 dest 127
=== SBC interface ===
Transfer state: 5, failed transfers: 0, checksum errors: 0
RX/TX seq numbers: 4393/4393
SPI underruns 0, overruns 0
State: 5, disconnects: 0, timeouts: 0 total, 0 by SBC, IAP RAM available 0x0f1ec
Buffer RX/TX: 0/0-0, open files: 0
=== Duet Control Server ===
Duet Control Server v3.4.1
Code buffer space: 4096
Configured SPI speed: 8000000Hz, TfrRdy pin glitches: 0
Full transfers per second: 0.03, max time between full transfers: 110.9ms, max pin wait times: 69.5ms/10.5ms
Codes per second: 0.00
Maximum length of RX/TX data transfers: 3244/804 -
You can try increasing the logging level to gather more info on what is happening and post the logs.
https://github.com/Duet3D/DuetSoftwareFramework/wiki/SBC-Setup-Guide#increasing-log-level
You can also check your browsers developer console for errors.
-
@phaedrux will do, thanks.
-
@larrylf Well, the extra logging didn't help, but after a lot of googling, and some playing around, I got it to work.
In case someone else runs into this issue, here is what I had to do:
(Connect via cable, ssh to the pi)pi@duet3:~ $ sudo wpa_passphrase
type in your ssid and password. It will generate a long string.
pi@duet3:~ $ sudo nano /etc/wpa_supplicant/wpa_supplicate.conf
You will see your password in the clear here:
network={ ssid="myssid" psk="my password" }
delete your your password, and replace with the generated string from above:
network={ ssid="myssid" psk=415e02a3e30be000b075c2ea320327300f7ba73f9fb12347247b233e52babcd5 }
(Notice it is not in quotes)
save, and exit
Now, edit /etc/network/interfaces, and add these lines:allow-hotplug wlan0 iface wlan0 inet dhcp wpa-ssid myssid wpa-psk 415e02a3e30be000b075c2ea320327300f7ba73f9fb12347247b233e52babcd5
(again - no quotes) Save, and exit.
Reboot (ok, you can probably just resart things, but rebooting works for sure).
I find that the UI on my SBC still shows an icon saying that wifi is not connected, but I can still access DWC from my browser now, over wifi.
-
-