I have a python script in rc.local that uses the Bridge. This works fine, but just this evening after plugging in my Arduino, I saw my script crashed (I put the script output to a file) with following exception:
File "/mnt/sda1/arduino/Yafa/BridgeComm.py", line 45, in send
bc.put('key_get',msg)
File "/usr/lib/python2.7/bridge/bridgeclient.py", line 60, in put
json = TCPJSONClient('127.0.0.1', 5700)
File "/usr/lib/python2.7/bridge/tcp.py", line 65, in __init__
TCPClient.__init__(self, address, port)
File "/usr/lib/python2.7/bridge/tcp.py", line 38, in __init__
client.connect((address, port))
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 146] Connection refused
I tried to regeneratle this by powering off/on my Yun, but I have not been able to get this error again. (now works ok)
Any idea what might be going on? The only thing I can suspect is that I ssh'd immediately to the Yun after its linux boot. Could this cause such an error?