treehouses / control

bluetooth service 🔧 for treehouses image which interacts with treehouses/remote android app
9 stars 1 forks source link

Buffer/message overflows? bluetooth common Error 110 #16

Closed LordJashin32 closed 4 years ago

LordJashin32 commented 4 years ago

Will update this box later.

LordJashin32 commented 4 years ago

Tried https://github.com/michaelgheith/actopy . And got the same error. I can't pinpoint whether this is just me getting unlucky error. Or if its a package version problem. Or a widespread problem multiple people are having.

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/root/actopy/worker.py", line 22, in run
    response = {"status": 200, "msg": "Output: %s ;" % subprocess.check_output(data, shell=True).decode('utf-8').strip()}
NameError: name 'subprocess' is not defined

^C[18/Apr/2020:04:57:30 +0000] [info] shutting down the server
root@treehouses:~/actopy# python3 server.py --name=treehouses --uuid=00001101-0000-1000-8000-00805F9B34FB
[18/Apr/2020:04:57:45 +0000] [info] listening on port 0
[18/Apr/2020:04:58:06 +0000] [info] accepted connection from 64:BC:0C:E2:7D:B7
[18/Apr/2020:04:58:06 +0000] [info] received data from device 64:BC:0C:E2:7D:B7 on Thread-1:  [treehouses remote version 2403
]
[18/Apr/2020:04:58:07 +0000] [info] accepted connection from 64:BC:0C:E2:7D:B7
[18/Apr/2020:04:58:14 +0000] [info] received data from device 64:BC:0C:E2:7D:B7 on Thread-2:  [treehouses remote commands
]
[18/Apr/2020:04:58:16 +0000] [info] accepted connection from 64:BC:0C:E2:7D:B7
[18/Apr/2020:04:59:20 +0000] [info] received data from device 64:BC:0C:E2:7D:B7 on Thread-3:  [treehouses detectrpi]
[18/Apr/2020:04:59:21 +0000] [info] accepted connection from 64:BC:0C:E2:7D:B7
[18/Apr/2020:04:59:25 +0000] [info] received data from device 64:BC:0C:E2:7D:B7 on Thread-4:  [treehouses detectrpi]
[18/Apr/2020:04:59:26 +0000] [info] accepted connection from 64:BC:0C:E2:7D:B7
[18/Apr/2020:04:59:27 +0000] [info] received data from device 64:BC:0C:E2:7D:B7 on Thread-5:  [treehouses detectrpi]
[18/Apr/2020:04:59:28 +0000] [info] accepted connection from 64:BC:0C:E2:7D:B7
[18/Apr/2020:04:59:28 +0000] [info] received data from device 64:BC:0C:E2:7D:B7 on Thread-6:  [treehouses detectrpi]
[18/Apr/2020:04:59:29 +0000] [info] accepted connection from 64:BC:0C:E2:7D:B7
[18/Apr/2020:04:59:34 +0000] [info] received data from device 64:BC:0C:E2:7D:B7 on Thread-7:  [treehouses remote allservices
]
Exception in thread Thread-7:
Traceback (most recent call last):
  File "<string>", line 3, in send
_bluetooth.error: (110, 'Connection timed out')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/actopy/worker.py", line 26, in run
    self.sock.send(json.dumps(response))
  File "<string>", line 5, in send
bluetooth.btcommon.BluetoothError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/root/actopy/worker.py", line 28, in run
    utils.log_stderror(e)
  File "/root/actopy/utils.py", line 14, in log_stderror
    sys.stderror.write(get_timestamp() + " [error] " + msg + "\n")
AttributeError: module 'sys' has no attribute 'stderror'

[18/Apr/2020:05:00:05 +0000] [info] accepted connection from 64:BC:0C:E2:7D:B7
[18/Apr/2020:05:00:09 +0000] [info] received data from device 64:BC:0C:E2:7D:B7 on Thread-8:  [treehouses networkmode info]
[18/Apr/2020:05:00:10 +0000] [info] accepted connection from 64:BC:0C:E2:7D:B7
LordJashin32 commented 4 years ago

Seems it was fixed in upstream?