OpenRoberta / robertalab-ev3dev

roberta lab connector for ev3dev
Apache License 2.0
17 stars 14 forks source link

need to reenter a new code each time we reconnect usb #31

Closed ensonic closed 7 years ago

ensonic commented 7 years ago

When using a usb connection either to a local server one needs to enter a new code each time.

The issue is that the http-push request will fail when the usb cable is pulled. The robot would need to keep retrying to connect using the same code. Also the server would need to re-allow the connection.

First step is the check if we can determine that the network is down, then we could keep trying. This is what we're getting:

Jan 21 20:54:04 ev3dev openrobertalab[581]: DEBUG:roberta.lab:URLError: URLError(gaierror(-2, 'Name or service not known'),)
Jan 21 20:54:04 ev3dev openrobertalab[581]: ERROR:roberta.lab:URLError: https://lab.open-roberta.org: [Errno -2] Name or service not known
Jan 21 20:54:04 ev3dev openrobertalab[581]: INFO:roberta.lab:network thread stopped
Jan 21 20:54:04 ev3dev openrobertalab[581]: INFO:roberta.lab:status changed: disconnected

Next we need to verify that the server lets us reconnect.

ensonic commented 7 years ago

There are more kinds of error:

ERROR:roberta.lab:URLError: http://a.b.c.d:1999: [Errno 101] Network is unreachable
DJuego commented 7 years ago

Yes. I can confirm that this problem can be declared resolute. At least, for now. Soon, i will make intense and massive tests about this in "real" environment. Then we will see. :-)

In my humble opinion this feature, with the local openroberta server, is an important contribution.

The wireless are very cool. However USB connection is easy. It is cheap. It is stable. You can ignore a wifi router. You can ignore a dongle wifi (that drains the battery). You can ignore internet.

EV3-G (a desktop application) works very well with a USB. Plug & play.

The pairing code step was a burden for USB connection with OpenRoberta. Now this is a very important step for Openroberta lab like a viable EV3-G alternative (IMHO)

Thank you very much, ensonic! Now we must wait to the "release". Soon, please! :-|

ensonic commented 7 years ago

Thanks for testing. I'll push a release in the coming days.