Skip to content

bad websocket behavior on Windows #20

@touretzkyds

Description

@touretzkyds

The attached program HasBarrelTest.py (same as in issue #19) runs fine on Linux, but not on Windows, due to websocket issues.

On Linux, it runs without issue for as long as desired; I've gone out to 100,000 ms without errors. When I type control-\ to kill Python, the program stops and the robot immediately beeps, drops the smiley face, and shows the normal control panel. If I run the program again, it reconnects to the robot with no problem.

On Windows the story is very different. I can run the program for around 25,000 ms, but some time after that, I get the following:

   lost a status packet, counter: 1
   ws_status reconnecting
   ws_status reconnecting
   ws_status reconnecting
   ws_status reconnecting

This goes on forever; it never reconnects successfully. Moreover, if I type control-C to quit Python, I get Received signal SIGINT (2) and Python exits, but the robot never beeps and disconnects. It still shows the smiley face. If I press the power button then the smiley face goes away and I see the control panel. But if I run the program again, it has trouble reconnecting. I have to do something like disconnect the WiFi and then reconnect to the robot in order to be able to talk to it again.

I did these experiments on a Dell Pro 14 Plus Windows 11 laptop using the built-in WiFi. The Linux experiments were done using Ubuntu 24.04 with a USB WiFi dongle. Both machines were running Python 3.12.

Adding a print statement to WSStatusThread.run() shows that the reconnection attempts are failing with a TimeoutError.

HasBarrelTest.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions