Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wireless printing in client mode hangs while in AP mode works ok #216

Open
peteruithoven opened this issue Feb 25, 2014 · 9 comments
Open

Comments

@peteruithoven
Copy link
Member

By @randomev:
I have experienced many times failed prints when printing in wifi client mode. I use Doodle3D along with Cura to print wirelessly.

I suspect that Doodle3D disconnects from my router every once in a while.

I printed the same 4 hour print many times and it usually hangs in some way if I print it while connected to my workshop wlan in client mode.

This does not occur if I print it in AP-mode, eg. Doodle3D is creating it's own wifi-network. I have now printed 2 times that 4 hour print and both prints went just fine.

So I suspect that if Doodle3D is connected to wifi in client mode and wifi disappears / disconnects, Doodle3D will stop printing. It would be nice that printing would continue even if network connection is temporarily lost.

@peteruithoven peteruithoven added this to the 0.10.2 milestone Feb 25, 2014
@peteruithoven
Copy link
Member Author

@randomev I've had the same experience with some longer prints, but we haven't had the time to look into it. You're research might already be a step into the right direction, thanks for that.
Since the box operates independently of a connection and the connection should not influence the driver (unless of course you are still sending the print) I can't explain this right away, we'll look into it.
I have two logs of my own where it hang, but you're welcome to share the logs when you run into issue's that helps us a great deal in finding the issue.
http://doodle3d.com/help/faq#113

@peteruithoven
Copy link
Member Author

After quite a few tests this seems a complicated issue.

It happens when it loses the whole network (by turning of the router the WiFi-Box is connected to). It doesn't happen when you turn off the wifi on the box wifi down or disconnecting just the internet from the router (by turning of off 3d etc when it's connected to the AP of my mobile).
It even happens when using a USB hub. I don't even request a signin.
There are no interesting messages in logread or wifibox.log. The printer just stops communicating back. When you reconnect the printer it still won't communicate, you need to reboot the WiFi-Box.
It also happens on a non encrypted network. What I find weird is that wpa_supplicant seems to be running, even though I'm not connected to a encrypted network.

@peteruithoven peteruithoven modified the milestones: 0.10.2, 0.10.3 Mar 12, 2014
@peteruithoven
Copy link
Member Author

Even after a lot more experiments the cause of this issue remains unclear. We are trying to update OpenWRT (the operating system installed on the box).

@peteruithoven peteruithoven modified the milestones: 0.10.4, 0.10.3 Apr 9, 2014
@peteruithoven
Copy link
Member Author

There is some activity in the topic we found earlier about usb stability, maybe this can provide insights. There is talk about an issue caused by scanning for wifi networks.
https://forum.openwrt.org/viewtopic.php?pid=231350#p231350

@peteruithoven
Copy link
Member Author

Turning the usb power on and off (see below) usually works, but it doesn't last when the network is still down. Probably because wifi is still scanning.

echo 0 > /sys/devices/virtual/gpio/gpio8/value
echo 1 > /sys/devices/virtual/gpio/gpio8/value

When you also turn wifi off (wifi down), this does work.

@peteruithoven
Copy link
Member Author

From the iw documentation:

You can use iw to connect to an AP directly if and only if the AP has:
- No encryption
- Uses WEP for encryption 

It however should be noted that if you disconnect from the AP, which can happen quite frequently on a busy environment, you will need to reissue the command. If you do not want to do this you can just use wpa_supplicant which will automatically try to reconnect you when you get disconnected.

If you do choose to deal with disconnects yourself you can use iw connect as follows.
To connect to an AP that has encryption disabled, where its SSID is foo:
iw wlan0 connect foo

More: http://wireless.kernel.org/en/users/Documentation/iw#Establishing_a_basic_connection

So maybe we could find a way to use iw instead of wpa_supplicant. This probably involves more manual configuration. And the fact that it tries to reconnect to it's network is actually a nice thing.

@peteruithoven
Copy link
Member Author

@peteruithoven peteruithoven modified the milestones: 0.10.5, 0.10.4 May 28, 2014
@peteruithoven
Copy link
Member Author

I did some tests using 2 usb hubs and without:
https://forum.openwrt.org/viewtopic.php?pid=235138#p235138

Good news: using our white usb hub almost eliminates the issue.

@peteruithoven
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant