So, this is pretty stupid (well, sort of, it was also sort of a design choice) but I've put my arduino yun in a box, and now I want to move somewhere else with a different wireless connection.
I CAN take the box apart and hit the little "wifi reset" button if needed, luckily it's a few bolts (as apposed to screws), but it's a big of a pain as it requires feeding a bunch of wires through holes (etc).
Long story shortish, I'm wondering if anybody is aware of anyway to reset the Arduino wifi connection (or set it up) via USB? Or does USB (as I'm suspecting) act as it does on a "normal" Arduino and only provide a programing interface/power?
Turns out that after waiting for a while, it seems that the Arduino Yun automatically opens itself up as an access point - AWESOME!
BUT, now I have a new problem, that seems a bit stranger and less "on purpose".
For some reason, even though the linino side of things seems to be working correctly, for some reason the bridge connection isn't working..
Here is the Python stack trace:
Traceback (most recent call last):
File "arduino_get.py", line 38, in <module>
get_messages()
File "arduino_get.py", line 31, in get_messages
bridge_setter.put("play1" + `playIndex`, raw_message[0:BRIDGE_CHARACTER_LIMIT])
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)
Note that this worked 100% perfectly at my house, the only thing that changed is that I changed my wireless network connection info via the Arduino interface.
I'm able to ssh into the yun just fine wirelessly.
yeah, the yun turns into an AP after 60 seconds trying to connect to the configured wifi. if your reboot it without reconfiguring, it will retry to connect to your configured wifi
regarding your script, it looks like the yun is missing the localhost network interface. can it it be? have you shut it down? does the error keep on happening after a reboot?
I had the exact same errors when tried to use the bridge.client in a python script on the YUN.
It did work immediately back as soon as I uploaded a sketch using the bridge inside the YUN.
I guess if you don't begin the Bridge with Bridge.begin() in the Arduino sketch it just doesn't start and you don't have the localhost...