Show Posts
Pages: 1 ... 30 31 [32] 33 34 ... 136
466  Community / Website and Forum / Re: Sorry SurferTim, you are banned from using this forum! on: January 28, 2014, 07:53:17 am
I still get Error 403 now and then when trying to get to this forum, like this morning. It is annoying. The only way I can get into the forum is to go to the reference or playground and login there.

I guess it is better than being banned tho.  smiley-roll

Maybe your computer is hacked and your ip is blocked because the hacker sends to much spam to this forum from your computer......
.... hum given the response times for block requests it doesn't seem likely  smiley-twist
Best regards
Jantje
467  Using Arduino / Programming Questions / Re: Problem with snprintf and signed and unsigned long on: January 28, 2014, 07:49:34 am
yes it is the real code.
Seems it works on the yun with minicom without the serial.begin();.
Anyway you are using lu and li instead of ul and li  smiley-grin. Using those it works great  smiley-grin
So thank you very much
Best regards
Jantje
468  Using Arduino / Programming Questions / [SOLVED] Problem with snprintf and signed and unsigned long on: January 27, 2014, 03:44:16 pm
Hi
I want to use signed long and unsigned long with snprintf. after some reading up I think I should use the ul and il tag.
However that does not give me the wanted result.
For instance:
Code:
void setup() {
  // put your setup code here, to run once:
  delay(1000);

}

void loop() {
  // put your main code here, to run repeatedly:
  static unsigned long smallUnsigned =1;
  static unsigned long bigUnsigned =100000;
  static unsigned long smallSigned =-100000;
  static unsigned long bigSigned =100000;
  char printBuffer[100];
  snprintf(printBuffer,sizeof(printBuffer),"smallUnsigned =%ul",smallUnsigned++);
  Serial.println(printBuffer);
  snprintf(printBuffer,sizeof(printBuffer),"bigUnsigned =%ul",bigUnsigned++);
  Serial.println(printBuffer);
  snprintf(printBuffer,sizeof(printBuffer),"smallSigned =%il",smallSigned++);
  Serial.println(printBuffer);
  snprintf(printBuffer,sizeof(printBuffer),"bigSigned =%il\n",bigSigned++);
  Serial.println(printBuffer);
  delay (1000);

}
creates following output (that is from the start)
Quote
smallUnsigned =1l
bigUnsigned =34464l
smallSigned =31072l
bigSigned =-31072l

smallUnsigned =2l
bigUnsigned =34465l
smallSigned =31073l
bigSigned =-31071l

smallUnsigned =3l
bigUnsigned =34466l
smallSigned =31074l
bigSigned =-31070l

smallUnsigned =4l
bigUnsigned =34467l
smallSigned =31075l
bigSigned =-31069l

smallUnsigned =5l
bigUnsigned =34468l
smallSigned =31076l
bigSigned =-31068l
The last character is always a l which indicates it is not interpreted. As such all the longs are interpreted as ints and return wrong values as soon as the MSB is used.
Do I use the wrong tag or is this a bug?

Best regards
Jantje
469  Products / Arduino Yún / Re: Yun running for days, no longer able to telnet or web-login, sketch still workin on: January 27, 2014, 02:44:44 pm
great :-)
Thanks for the feedback.
I have been thinking about replacing mine as well but I need a 100mwatt outdoor router and as I had little luck with the cheap one (same price as the WRT-54GL  smiley-eek) I'm not looking forward to buying a new one.
Best regards
Jantje
470  Products / Arduino Yún / Question: Why would I use Process.run when I can use Process.runShellCommand on: January 27, 2014, 02:41:00 pm
Hi
I was playing around with the File Write Script example from the bridge. http://arduino.cc/en/Tutorial/FileWriteScript
I changed the line
Code:
void runScript() {
  // Run the script and show results on the Serial
  Process myscript;
  myscript.begin("/tmp/wlan-stats.sh");
  myscript.run();
to
Code:
void runScript() {
  // Run the script and show results on the Serial
  Process myscript;
  myscript.begin("ls /tmp");
  myscript.run();
And that didn't work.
After reading up I learned about runShellCommand so I tried
Code:
void runScript() {
  // Run the script and show results on the Serial
  Process myscript;
  //myscript.begin("/tmp/wlan-stats.sh");
  myscript.runShellCommand("/tmp/wlan-stats.sh");
  //myscript.run();
Which also works with ls /tmp  smiley-grin.

The documentation of run nor runShellCommand explains me this behaviour.
Can someone explain this behaviour and tell me why I would want to use plain run?

Best regards
Jantje

471  Products / Arduino Yún / Re: What is the meaning of the return value of Process.run on: January 27, 2014, 02:08:09 pm
I found why I didn't get any feedback anymore.
As I stated wifi stopped working.
so when I run the command the return goes to stderr which seems not to be captured by the bridge.
Code:
root@chargeStation:~# /tmp/wlan-stats.sh
ifconfig: wlan0: error fetching interface information: Device not found

Best regards
Jantje
472  Products / Arduino Yún / What is the meaning of the return value of Process.run on: January 27, 2014, 01:41:11 pm
Hi
As to the documentation Process.run does not return anything.  http://arduino.cc/en/Reference/YunProcessRun
However the declaration states:
Code:
unsigned int Process::run()
As I have a problem (code doesn't work anymore but so does the wifi  smiley-confuse ) and the return value is 1 I'm wondering....
What does 1 mean?
Best regards.
Jantje
473  Products / Arduino Yún / Re: [SOLVED] Fail to mount cif drive on: January 27, 2014, 08:08:20 am
done
474  Products / Arduino Yún / Re: Connect yun mini usb with yun USB A does not work. on: January 22, 2014, 06:43:20 pm
Seems the problem was located with me.
Works great now :-)
Best regards
Jantje
475  Products / Arduino Yún / Re: how to conect multiple yun? on: January 22, 2014, 12:37:20 pm
For example:
When master receive signal from the two slave(button or some thing else) then led on master turned on.
Funny: When the master turns on a led based on  a signal from the slave the master is the slave and the slave is the master.
In other words: Master is the one who gives the orders; slave is the one that executes the orders.

How to do that?

With the yun there are so many ways. Most of those ways can also be done with other Arduino's. The real yun way is using HTTP.
In other words the MASTER does a HTTP call  to the slave who turns on a led based on the HTTP call.
The biggest advantage is that you do not need any additional hardware.

Best regards
Jantje
476  Products / Arduino Yún / Re: yun behaviour with wifi-live-or-reset disabled. on: January 22, 2014, 08:27:50 am
Interesting, that would help me too, because my private Wifi is disabled during sleeping times and when I turn on my Yun in this period of time, it goes to AP mode. And it will not connect to my Wifi until I turn it off and on again :-(
Have you also disabled the wifi-live-or-reset?
Best regards
Jantje
477  Products / Arduino Yún / Re: Connect yun mini usb with yun USB A does not work. on: January 21, 2014, 04:19:45 pm
well I only checked dmesg after I failed to connect with the tty with minicom.
So this may not be the root cause but there sure is a problem somewhere (even if it is only in my head  smiley-eek-blue )
Best regards
Jantje
478  Products / Arduino Yún / yun behaviour with wifi-live-or-reset disabled. on: January 21, 2014, 04:18:09 pm
Hi
I have a problem with the yun behaviour when the wifi network is not available.
In the thread http://forum.arduino.cc/index.php?topic=188637.msg1395870#msg1395870
I asked the question
Quote
This means that if my wifi is not available for 60 seconds I get into a deadlock situation.
In other words If the wifi is unavailable for 60 seconds when my robot is rebooting my robot will never start again.
Can I configure yun not to do so?
on which Federico replied
Quote
Of course you can. Since you need to edit a file on the yun, I suggest you to connect to the yun with an SSH client or with some serial terminal software like cutecom or putty
Once you are in, edit /etc/rc.local and put a hash at the beginning of line "wifi-live-or-reset" so that it looks like
#wifi-live-or-reset

At next reboot, yun won't bother if wifi is up or down
I was really happy with that untill the first time the network was actually not available.
I noticed that my yun actually went to accespoint mode on IP 192.168.240.1.
After I rebooted it behaved the same (still no network).
After I rebooted closer to the wifi ap he started and connected and worked fine.

So I reread and I noticed the phrase: "At next reboot, yun won't bother if wifi is up or down"
That is not what I want. I want yun (when not connected to wifi) to try to connect to my wifi untill it is connected.
This is how my openwrt +arduino mega works.
Can that be done?
Best regards
Jantje
479  Products / Arduino Yún / [SOLVED] Connect yun mini usb with yun USB A does not work. on: January 21, 2014, 03:10:07 pm
Hi
As I have a sketch that uses the serial communication that I want to run on the yun. My original idea was to port the code so it uses the bridge.
Then I got the smart(?) idea to simply connect the usb of the leonardo with the usb of linino. This way I could continue using the serial communication via the usb ttyacm0 and have the bridge do the more advanced web stuf.
Connecting the 2 usbs did not give any sparks. but the dmesg doesn't look good:
Quote
[ 2637.840000] usb 1-1.1: new full-speed USB device number 4 using ehci-platform
[ 2637.970000] usb 1-1.1: New USB device found, idVendor=2341, idProduct=8041
[ 2637.970000] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2637.970000] usb 1-1.1: Product: Arduino Yun
[ 2637.980000] usb 1-1.1: Manufacturer: Arduino LLC
[ 2637.980000] cdc_acm 1-1.1:1.0: This device cannot do calls on its own. It is not a modem.
[ 2637.980000] cdc_acm 1-1.1:1.0: ttyACM0: USB ACM device
This device cannot do calls on its own? I guess there is some configuration error somewhere.
Any input on how I could fix this or why I should not do this is appreciated.
Best regards
Jantje
480  Products / Arduino Yún / Re: Yun running for days, no longer able to telnet or web-login, sketch still workin on: January 21, 2014, 05:35:12 am
As the sendmail works fine you can safely conclude both parts of the yun are up and running and communicating. So you are probably experiencing a local network problem and not a yun problem.
I have the same problem quite regularly due to a cheap(?) wifi router. The way for me to solve it is to reboot the wifi router.
Best regards
Jantje
Pages: 1 ... 30 31 [32] 33 34 ... 136