Roomba980-Python icon indicating copy to clipboard operation
Roomba980-Python copied to clipboard

Connection Error timed out for GetPassword

Open smartnakh opened this issue 5 years ago • 13 comments

waiting on port: 5678 for data supplied address 255.255.255.255 does not match discovered address 192.168.1.110, using discovered address... supplied address 255.255.255.255 does not match discovered address 192.168.1.90, using discovered address... found 1 Roomba(s) Make sure your robot (Roomba) at IP 192.168.1.90 is on the Home Base and powered on (green lights on). Then press and hold the HOME button on your robot until it plays a series of tones (about 2 seconds). Release the button and your robot will flash WIFI light. Press Enter to continue... Received: { "sku": "R960040", "nc": 0, "ip": "192.168.1.90", "hostname": "Roomba-3115801850212750", "ver": "3", "cap": { "eco": 1, "langOta": 1, "svcConf": 1, "pp": 1, "multiPass": 2, "pose": 1, "edge": 1, "maps": 1, "binFullDetect": 1, "ota": 2 }, "mac": "74:C6:3B:C6:D8:6F", "proto": "mqtt", "sw": "v2.4.6-3", "robotname": "Roomba" } Roomba (Roomba) IP address is: 192.168.1.90 Connection Error timed out Traceback (most recent call last): File "getpassword.py", line 39, in main() File "getpassword.py", line 34, in main Password(file=arg.configfile) File "/etc/scripts/Roomba980-Python/roomba/password.py", line 39, in init self.get_password() File "/etc/scripts/Roomba980-Python/roomba/password.py", line 136, in get_password wrappedSocket.send(packet) File "/usr/lib/python3.5/ssl.py", line 871, in send return socket.send(self, data, flags) socket.timeout: timed out

smartnakh avatar Nov 06 '18 12:11 smartnakh

The same here. I'm afraid it is because of new roomba version ("ver": "3"). Would be nice if someone more clever than me could take a took:)

hwmland avatar Dec 16 '18 12:12 hwmland

I don't believe this has anything to do with the Roomba version. I looked into this, and it seems to be due to having two connections at the same time. You cannot do this.

By two connections at the same time, I mean having the app on your phone connected, and trying to connect via Roomba.py (which is what is happening at that point).

You have to completely exit from the app, possibly reset the Roomba WiFi connection, turn off your phone WiFi, to make sure there is no other connection.

Then run getpassword. again.

Once you successfully have the password, and Roomba.py is running, you can connect via the the phone app again, this time the phone app recognizes that the one local connection is occupied, and will connect via the cloud connection ("world" icon in the app).

Anyway, I believe this is due to the Roomba already being connected (to something), and nothing to do with V3 firmware.

NickWaterton avatar Dec 16 '18 22:12 NickWaterton

Hi Nick, thank for your response. I try "everything" comming to my mind: -I switched off phone -I reset roomba -I disconnect my internet connection -I try holding for 2 seconds both "dot" and "home" insted of just "home"

I tried it over and over, different combinations, sequences.... and still nothing. Result is still the same. However I found my listing is a bit different, so just to be sure I put it here:

pi@raspberrypi:~/Roomba980-Python $ python roomba/getpassword.py -R 192.168.10.138 paho mqtt client not found CV or numpy module not found, falling back to PIL waiting on port: 5678 for data found 1 Roomba(s) Make sure your robot (Manicka) at IP 192.168.10.138 is on the Home Base and powered on (green lights on). Then press and hold the HOME button on your robot until it plays a series of tones (about 2 seconds). Release the button and your robot will flash WIFI light. Press Enter to continue... Received: { "robotname": "Manicka", "sku": "e515840", "nc": 0, "ver": "3", "proto": "mqtt", "ip": "192.168.10.138", "hostname": "Roomba-3167072471812650", "sw": "3.4.42", "mac": "80:C5:F2:DD:33:9A", "cap": { "eco": 1, "ota": 1, "svcConf": 1 } } Roomba (Manicka) IP address is: 192.168.10.138 Connection Error timed out Traceback (most recent call last): File "roomba/getpassword.py", line 39, in main() File "roomba/getpassword.py", line 36, in main Password(arg.roombaIP,file=arg.configfile) File "/home/pi/Roomba980-Python/roomba/password.py", line 39, in init self.get_password() File "/home/pi/Roomba980-Python/roomba/password.py", line 136, in get_password wrappedSocket.send(packet) File "/usr/lib/python2.7/ssl.py", line 719, in send v = self._sslobj.write(data) ssl.SSLError: ('The write operation timed out',)

Roomba is E5 model I run program on raspberry-pi v3 (I somehow don't want to touch Python on my work notebook (Win).

Should there be something more I can try, please let me know. I'm IT guy, but unfortunatelly C# and Windows word, very limited knowledge about Python and Linux.

Thanks in advance, Marek

hwmland avatar Dec 17 '18 09:12 hwmland

PS: sorry for this bold text, it was unintended

hwmland avatar Dec 17 '18 09:12 hwmland

OK, that's different. The socket connects, but times out when sending the mqtt password request.

I do notice

paho mqtt client not found

Which shouldn't matter, but means you don't have paho-mqtt installed. You can install it with pip install paho-mqtt. Don't know if that would help though.

I don't have E5, V3 sw, and haven't tried it with RPi. This is sending a simple mqtt request packet though, so there is no real reason why it wouldn't work, unless as you say, something has changed in V3 software.

I'll let you know if I come up with anything.

NickWaterton avatar Dec 17 '18 13:12 NickWaterton

Hi, I installed paho-mqtt but this change nothing. Bad luck:( Best regards, Marek

On Mon, Dec 17, 2018 at 2:23 PM Nick Waterton [email protected] wrote:

OK, that's different. The socket connects, but times out when sending the mqtt password request.

I do notice

paho mqtt client not found

Which shouldn't matter, but means you don't have paho-mqtt installed. You can install it with pip install paho-mqtt. Don't know if that would help though.

I don't have E5, V3 sw, and haven't tried it with RPi. This is sending a simple mqtt request packet though, so there is no real reason why it wouldn't work, unless as you say, something has changed in V3 software.

I'll let you know if I come up with anything.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NickWaterton/Roomba980-Python/issues/42#issuecomment-447843741, or mute the thread https://github.com/notifications/unsubscribe-auth/AL1Sf3rqEDXhnaS3GPjteg1lGmFhQ_0Uks5u55q1gaJpZM4YQWBu .

hwmland avatar Dec 17 '18 14:12 hwmland

I encountered the timeout and the SSL timeout errors. It was all user error. I solved the issue by doing the following:

  • Going in the app (in android) and force stopping the irobot app.
  • Holding the HOME button, not the big clean button. 🤦‍♂️

vangorra avatar Jan 01 '19 17:01 vangorra

I am experiencing this same issue. At the end of this post is the log from my latest attempt. Let me know if there is anything else I can do to help, or good places to look on my end.

  • I'm using the all-in-one pip installation in a python 3.7.1 virtual environment
  • Roomba model 960, firmware version 2.4.6-3
  • Roomba has a static IP
  • I've turned off the only devices with a local connection to the Roomba (my phone, and unplugged Alexa just in case)
[I 2019-01-04 18:13:54,417] *******************
[I 2019-01-04 18:13:54,418] * Program Started *
[I 2019-01-04 18:13:54,419] *******************
[I 2019-01-04 18:13:54,419] Roomba.py Version: 1.2.4
[I 2019-01-04 18:13:54,419] Python Version: 3.7.1 (default, Nov 28 2018, 11:51:54) [Clang 10.0.0 (clang-1000.11.45.5)]
[I 2019-01-04 18:13:54,420] Paho MQTT Version: 1.4.0
[I 2019-01-04 18:13:54,420] CV Version: 3.4.5
[I 2019-01-04 18:13:54,420] PIL Version: 5.4.0
[I 2019-01-04 18:13:54,420] <CNTRL C> to Exit
[I 2019-01-04 18:13:54,421] Roomba 980 MQTT data Interface
[I 2019-01-04 18:13:54,421] reading info from config file ./config.ini
[W 2019-01-04 18:13:54,422] No roomba or config file defined, I will attempt to discover Roombas, please put the Roomba on the dock and follow the instructions:
[I 2019-01-04 18:13:54,422] Using Password version 1.2.4
waiting on port: 5678 for data
[W 2019-01-04 18:13:54,423] supplied address 255.255.255.255 does not match discovered address 192.168.1.202, using discovered address...
[W 2019-01-04 18:13:54,439] supplied address 255.255.255.255 does not match discovered address 192.168.1.206, using discovered address...
found 1 Roomba(s)
Make sure your robot (Codsworth) at IP 192.168.1.206 is on the Home Base and powered on (green lights on). Then press and hold the HOME button on your robot until it plays a series of tones (about 2 seconds). Release the button and your robot will flash WIFI light.
Press Enter to continue...
Received: {
  "ver": "3",
  "hostname": "Roomba-3172891401819890",
  "robotname": "Codsworth",
  "ip": "192.168.1.206",
  "mac": "D0:C5:D3:9E:91:45",
  "sw": "v2.4.6-3",
  "sku": "R96----",
  "nc": 0,
  "proto": "mqtt",
  "cap": {
    "pose": 1,
    "ota": 2,
    "multiPass": 2,
    "pp": 1,
    "binFullDetect": 1,
    "langOta": 1,
    "maps": 1,
    "edge": 1,
    "eco": 1,
    "svcConf": 1
  }
}
Roomba (Codsworth) IP address is: 192.168.1.206
Connection Error timed out
Traceback (most recent call last):
  File "/Users/grantslape/code/roomba/roomba-env/bin/roomba", line 11, in <module>
    load_entry_point('Roomba980-Python==1.2.3', 'console_scripts', 'roomba')()
  File "/Users/grantslape/code/roomba/roomba-env/lib/python3.7/site-packages/roomba/__main__.py", line 485, in main
    Password(file=arg.configfile)
  File "/Users/grantslape/code/roomba/roomba-env/lib/python3.7/site-packages/roomba/password.py", line 39, in __init__
    self.get_password()
  File "/Users/grantslape/code/roomba/roomba-env/lib/python3.7/site-packages/roomba/password.py", line 136, in get_password
    wrappedSocket.send(packet)
  File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 986, in send
    return super().send(data, flags)
socket.timeout: timed out

grantslape avatar Jan 05 '19 00:01 grantslape

This is such a potential break-through for me, as I haven’t been able to figure any of the other instructions so far to get the BLID and password for my Roomba.

Sadly, my attempt has also failed with the same error. I have stopped my iRobot iPhone app, but this didn't fix the error.

I have a Roomba 980, and have downloaded the Python Windows Executable for Python 3.7.2 (Python-3.7.2-amd64.exe). I have also installed the latest Roomba980-Python-master.zip file from https://github.com/NickWaterton/Roomba980-Python.

The installations of Python appears ok, and I have been careful to install it in the C:\Python directory and check “Add Python to envionment variables” option.

When I run “pip install six”, it appears to work ok, and states “Successfully installed six-1.12.0”. However, it does give the following warning message.

“You are using pip version 18.1, however version 19.0.1 is available. You should consider upgrading via the ‘python -m pip install --upgrade pip’ command.”

When I run “python .\roomba\getpassword.py”, I get the following response (I have masked the Mac address of my Roomba):

C:\Python>python .\roomba\getpassword.py paho mqtt client not found CV or numpy module not found, falling back to PIL PIL module not found, maps are disabled waiting on port: 5678 for data supplied address 255.255.255.255 does not match discovered address 192.168.1.32, using discovered address… supplied address 255.255.255.255 does not match discovered address 192.168.1.231, using discovered address… found 1 Roomba(s) Make sure your robot (Roomba 980) at IP 192.168.1.231 is on the Home Base and powered on (green lights on). Then press and hold the HOME button on your robot until it plays a series of tones (about 2 seconds). Release the button and your robot will flash WIFI light. Press Enter to continue… Received: { “ver”: “3”, “hostname”: “Roomba-3145C60802039800”, “robotname”: “Roomba 980”, “ip”: “192.168.1.231”, “mac”: “XX:XX:XX:XX:XX:XX”, “sw”: “v2.4.6-3”, “sku”: “R980000”, “nc”: 0, “proto”: “mqtt”, “cap”: { “pose”: 1, “ota”: 2, “multiPass”: 2, “carpetBoost”: 1, “pp”: 1, “binFullDetect”: 1, “langOta”: 1, “maps”: 1, “edge”: 1, “eco”: 1, “svcConf”: 1 } } Roomba (Roomba 980) IP address is: 192.168.1.231 Connection Error timed out Traceback (most recent call last): File “.\roomba\getpassword.py”, line 39, in main() File “.\roomba\getpassword.py”, line 34, in main Password(file=arg.configfile) File “C:\Python\roomba\password.py”, line 39, in init self.get_password() File “C:\Python\roomba\password.py”, line 136, in get_password wrappedSocket.send(packet) File “C:\Python\lib\ssl.py”, line 986, in send return super().send(data, flags) socket.timeout: timed out

I have tried the routine several times, and correctly pressed the Home key getting the tones and the flashing wifi light.

Is there any advice on what isn’t correct? Any advice would be greatly appreciated.

tortoise127 avatar Jan 29 '19 19:01 tortoise127

I'm not sure, I haven't tried python 3.7 or Windows. It all looks to me like either a certificate error (and the certificate isn't used, there just has to be one), or the socket is already occupied.

The default locations for certificates are set for linux systems, and I believe I supply a dummy certificate with the Roomba program - but it may not be being picked up.

However, if the socket is occupied, none of this will help as Roomba only allows one connection. I don't know what else you might have connected to Roomba, any other apps on any other phones?

You can also try resetting the Roomba, sometimes you have to do that (press and hold the "Clean" button).

It's hard to tell, I have one Roomba 980, and it works perfectly, but with so many variations on OS, libraries, python versions it's hard to tell why it isn't working.

NickWaterton avatar Jan 29 '19 23:01 NickWaterton

One other thing to note, the program is a Python 2.7 program. It was never designed to be run on Python 3.x. Some other people patched it to run on 3.4 and 3.5, but it's never been tested on 3.7. With Python, later version numbers do not mean "better" they mean "incompatible with previous versions".

It is quite possible to install multiple versions of Python for this reason, so I would really suggest you try installing Python 2.7 and try with that. Having said that, where the error is shouldn't be a big deal, but there are many subtle incompatibilities in different Python versions, so who knows?

NickWaterton avatar Jan 29 '19 23:01 NickWaterton

@NickWaterton Thanks for the information, this is helpful. I'll try this out with a Python 2.7 virtual environment and see what I find. I'm pretty confident that there is nothing else occupying that one local connection but I'll run through everything I can think of again.

Will update this comment with my findings.

grantslape avatar Jan 31 '19 16:01 grantslape

Firstly, thanks very much Nick for your suggestions. I've now got it working, and I think that multiple connections were probably the problem. I deleted the iRobot app from all of my devices, reset the Roomba (by pressing and holding the Clean button), and it all worked. For info, I got it working using Python 3.7.2, so this version is fine. Thanks heaps Nick!

tortoise127 avatar Feb 02 '19 00:02 tortoise127