Go Down

Topic: [Solved] Yun WiFi Problem (Read 3284 times) previous topic - next topic

mrmueller

Jul 12, 2014, 01:57 pm Last Edit: Jul 28, 2014, 02:19 pm by mrmueller Reason: 1
Hello
I have the following problem:
Using Arduino 1.5.7 and Yun with OpenWrt 1.2 I can upload my sketch via USB and see my sketch working via serial monitor. However when I disconnect the USB connection then I cannot connect the serial monitor anymore (error: Unable to connect: is the sketch using the bridge?" and my sketch (Adding Data to Google Spreadsheet viaTemboo) is not working.
What am I doing wrong (I'm quite new to the Yun)? I can connect to the Yun Configuration Page - so the Wifi part must be working.
I tried a example sketch (Bridge/Temboo/SendAnEmail) same result. I also tried a sketch (Bridge/SerialTerminal) same result. The sketch is only working when the Port is set to the USB connection dev/cu/usbmodem1411 (Arduino Yun) but it is not working when the Port is set to "Arduino at 192......" .
LEDs "USB" & "ON" are on.

Thanks

federicofissore

http://playground.arduino.cc/Hardware/Yun#console_cant_connect

mrmueller

Thanks Federico, I saw and read that before but that is not my problem. Maybe I missed something, but isn't the YUN supposed to work independently (without a connection to a computer)? Because my sketch is only working when connected to a computer/mac via USB Port. I don't necessarily have to monitor it via serial monitor but I can see that the sketch is not executed when it doesn't send mails or adding Data to a Google Spreadsheet or whatever the sketch is supposed to do.

Thanks for your patience with a novice

PCWorxLA


Thanks Federico, I saw and read that before but that is not my problem. Maybe I missed something, but isn't the YUN supposed to work independently (without a connection to a computer)?
Yes it is and yes, it does. Unless...
Quote
Because my sketch is only working when connected to a computer/mac via USB Port. I don't necessarily have to monitor it via serial monitor but I can see that the sketch is not executed when it doesn't send mails or adding Data to a Google Spreadsheet or whatever the sketch is supposed to do.

Thanks for your patience with a novice
I think what Frederico was try to point you at is that with a Yun not connected to a PC, you need to monitor any debugging output via the console (connected over whatever Ethernet connection you have to your Yun, wireless or wired).
And the fact that you say that the sketch is working when connected via serial (USB) connection and seems not to work when this connection doesn't exist, this points to the possibility that you have some code in either the setup() or (start of) the loop() function that waits for a serial connection, as it is common for Arduino sample scripts, something like
Code: [Select]
while(!Serial.available());
which of course will wait forever (and subsequently not execute your sketch as expected) if there isn't a serial/USB connection to your Yun...

Ralf

federicofissore

Indeed.
When having this kind of issues, it's always good to try one of the examples. They work, they have been used and ran by many, it's easy to get support about them, they are a good starting point for making your own sketches.

mrmueller

@Ralf
Thanks, this was exactly where I got wrong.


PCWorxLA


@Ralf
Thanks, this was exactly where I got wrong.


Glad to be of service...  8)

Ralf  ;)

Leone_Euglena

Quote

Quote from: mrmueller on July 16, 2014, 12:11:28 pm
@Ralf
Thanks, this was exactly where I got wrong.


Glad to be of service...  smiley-cool

Ralf  smiley-wink


+1

this post is gold :) thank you guys :)

Go Up