Show Posts
Pages: [1] 2
1  Products / Arduino Yún / Re: Linino Locks up after ~12-24 hours Running php Script every minute on: April 18, 2014, 02:09:59 am
Forcing stdin, stdout and stderr to be unbuffered and binary

https://github.com/arduino/linino/commit/a877a08caf1c0db2479c294c818e067cd777219a

Code:
python -u bridge.py

Thanks.
I'll try soon. smiley

2  Products / Arduino Yún / Re: Linino Locks up after ~12-24 hours Running php Script every minute on: April 13, 2014, 02:30:04 am
After modify uhttp or web file:

Code:
/etc/init.d/uhttpd  restart
clear browser cache! restart browser.


Test Yun in network:

At computer:
Code:
ping arduino.local

Test Yun in internet:

At Yun console:
Code:
ping sun.com

All done.... but...
I try more days to be sure to had all the things in the correct way, but still *freeze*.

This is my SET:
- dedicated router, disconnected from internet (192.168.1.1)
- 3 yun with fixed ip (101, 102, 103), connected via eth
- disabled wifi ( edited /etc/config/wireless to disabled, and add comment on /etc/rc.local)

The problem:
--> at start, perfect answer on single website (one for each yun, on SD), and quickly answer to REST command
--> after 12 hours:
1) no answer form REST command
2) websites still alive (php)
3) config panel yun still alive
(try also to restart webserver /etc/init.d/uhttpd restart)
(hung up "python bridge.py" from advanced-panel/processes get message from REST "Could not connect to YunServer 146 Connection refused")


3  Products / Arduino Yún / Re: Linino Locks up after ~12-24 hours Running php Script every minute on: April 08, 2014, 05:24:00 am
Hi, I'm here again (see answer only now, forgot 'Notify me of replies.' option), then...

You need to tell us either network drop out or php website (uhttpd) time out.
In network drop out case either Yun drop out from network completed or Yun drop out internet connection only?
In php website ( uhttpd) time out case either maximum number of concurrent requests is over or script_timeout  is over?
Did you test with ethernet?

Network drop out. I can't connect to YUN (website on SD nor to /cgi-bin/luci/webpanel/homepage)
I use the myArduinoName.local to connect.

Not fully tested on ETH (I'm doing this now)

Find also the "option max_requests 2"  on /etc/config/uhttpd .... can I change? how many?
(the interface could be used by more concurrent users... to be safe I think 4)

Changing to ETH I find also something strange:
--> wifi connect to my router (with static IP)
--> eht connect to my router (with obviously different static IP)
--> change the redirect (meta refresh on index html inside www pointing to sd)
Result:
1) if I point to IP (wifi/eth) it redirects to /cgi-bin/luci/webpanel/homepage
2) if I point to myNameArduino.local it redirects (correctly) to sd

for static ip I change only /etc/config/network in this way

Code:
config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option proto 'static'       
        option ipaddr '192.168.1.203'                 
        option netmask '255.255.255.0'                       
        option gateway '192.168.1.1'                               
        option dns '192.168.1.1' 

config interface 'wan'
        option ifname 'eth1'
        option proto 'static'       
        option ipaddr '192.168.1.103'                 
        option netmask '255.255.255.0'                       
        option gateway '192.168.1.1'                               
        option dns '192.168.1.1' 

4  Products / Arduino Yún / Re: Linino Locks up after ~12-24 hours Running php Script every minute on: April 06, 2014, 08:39:03 am
I have a similar problem with wifi  (no eth) that hangup after a while, there is a way to solve it with wifi?
(php website on yun, after a while, dosen't answer at all or sometimes after 10/15 seconds.)

The issue appears to be solved. I now have 4 Yuns set up and not losing eth1 after router DHCP lease time expires.
My solution was to use the DHCP fix linked to by Sonnyyu earlier in this thread. I prefer to not set up static from the Yun side because the ethernet devices I will connect to may vary in their IP ranges.
5  Products / Arduino Yún / Re: -- yun without bootloader on atmega is possible? [SOLVED] on: March 12, 2014, 03:34:08 pm
Mmmmm... nice hint.
I found this, could be usueful?

--> http://playground.arduino.cc/Main/CorruptArrayVariablesAndMemory#.UyDE71HFlMg
--> http://playground.arduino.cc/Code/AvailableMemory#.UyDE-VHFlMg

Tomorrow I test it and I'll report.
6  Products / Arduino Yún / Re: -- yun without bootloader on atmega is possible? [SOLVED] on: March 12, 2014, 01:25:24 pm
Really don't know.

I'm still testing, there is something not clear.... I mean... near 30k start make something different, and bridge doesn't answer as expected.

Still try to understand if something on code.

7  Products / Arduino Yún / Re: -- yun without bootloader on atmega is possible? on: March 11, 2014, 10:12:46 am
[SOLVED]
...still in testing but here my 50 cents:

1) edit the boards.txt
(on mac is here ---> /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr   my ide is 1.5.5)

I add a copy of yun board change only the upload maxium size.

Code:
##############################################################

yunB.name=Arduino Yún - full
yunB.upload.via_ssh=true

yunB.vid.0=0x2341
yunB.pid.0=0x0041
yunB.vid.1=0x2341
yunB.pid.1=0x8041
yunB.upload.tool=avrdude
yunB.upload.protocol=avr109
yunB.upload.maximum_size=32768
yunB.upload.maximum_data_size=2560
yunB.upload.speed=57600
yunB.upload.disable_flushing=true
yunB.upload.use_1200bps_touch=true
yunB.upload.wait_for_upload_port=true

yunB.bootloader.tool=avrdude
yunB.bootloader.low_fuses=0xff
yunB.bootloader.high_fuses=0xd8
yunB.bootloader.extended_fuses=0xfb
yunB.bootloader.file=caterina/Caterina-Yun.hex
yunB.bootloader.unlock_bits=0x3F
yunB.bootloader.lock_bits=0x2F

yunB.build.mcu=atmega32u4
yunB.build.f_cpu=16000000L
yunB.build.vid=0x2341
yunB.build.pid=0x8041
yunB.build.usb_product="Arduino Yun"
yunB.build.board=AVR_YUN
yunB.build.core=arduino
yunB.build.variant=yun
yunB.build.extra_flags={build.usb_flags}


2) restart the Arduino Ide
3) from list of boards ---> Arduino Yún - full
4) compile the code, not upload (remember to check in the preferences option to see the compile process)
5) wait until compile is ended and copy the path where is the hex
6) copy the hex file to SD yun
7) connect via ssh to yun (ssh root@your_yun_name.local)
8) cd /mnt/sda1
9) run-avrdude your_compiled_file.hex

obviously no more bootloader in atmega (so you can't upload as usual via usb from ide), but.... is simply to restore:

1) compile a simple sketch as blink (use Standard Yun as board type)
2) in the same way find the hex and upload it to SD
3) cd /mnt/sda1
4) merge-sketch-with-bootloader.lua Blink.cpp.hex
5) run-avrdude Blink.cpp.hex

...in this way you have again the standard bootloader on atmega and the blink sketch.
After this you can upload again from ide, as usual.



PLEASE READ THIS
I have 2 Yun , 1 is to test.
Seems all ok, but I can't say that you could be brick... so... pay attention.

8  Products / Arduino Yún / -- yun without bootloader on atmega is possible? [SOLVED] on: March 11, 2014, 05:59:33 am
Hi,
Is it possible to upload sketch without bootloader?

Could be a solution add a new "YUN-without-bootloader" on boards.txt configuration to have more space, compile from ide, copy  to sd  the hex and then burn via ssh without merge the bootloader?

...I mean... I've read so many forum/tutorial that I'm little confused. smiley

I'd like:
- have about 4k more
- compile from arduino ide
- find a way to upload to atmega

thanks.

9  Products / Arduino Yún / Re: Upload a sketch to Arduino directly from Linino on: February 27, 2014, 02:56:31 pm
Thanks a lot for pointing me to correct post. smiley-wink

k.
10  Products / Arduino Yún / Re: Upload a sketch to Arduino directly from Linino on: February 27, 2014, 01:07:04 pm
The good news is that you can make everything manually
Compile your sketch with the IDE, locate the .hex file and scp it to the yun as /tmp/sketch.hex. SSH into the yun, then run
Code:
merge-sketch-with-bootloader.lua /tmp/sketch.hex
run-avrdude /tmp/sketch.hex

A simple question, after uploading hex to tmp folder on YUN, is it correct to upload it without the bootloader in this way?
Code:
run-avrdude /tmp/sketch.hex

(btw....still trying to compile for Atmel/YUN without bootloader to get more K for code)
11  Products / Arduino Yún / Re: Save file on the sd card from html client on: February 26, 2014, 05:24:26 am
YESS! Resolved updating the firmware. smiley

Thanks.


@hilsah

I'm happy to say we have solved this. Details here

Until we release an updated package, here is what you need to do.
  • Using SSH or YunSerialTerminal, connect to the linux side of the yun.
  • Edit file /usr/bin/run-bridge, changing "python bridge.py" with "python -u bridge.py" (ie: add a "-u" to the command line)
  • Edit file /usr/bin/kill-bridge, again changing "python bridge.py" with "python -u bridge.py" (ie: add a "-u" to the command line)
  • Type kill-bridge and re-run your sketch
12  Products / Arduino Yún / Re: Save file on the sd card from html client on: February 25, 2014, 10:15:41 am
I try to copy your code, but.... nothing happen.
(change also the position of logger.sh to root of SD)

really don't know .... now I try with a friend's YUN the same code.

k.
13  Products / Arduino Yún / Re: Save file on the sd card from html client on: February 24, 2014, 02:56:05 pm
Here the code
I deleted almost everything, keeping only the code (and libraries) for write on SD.
 Also this version doesn't write on SD.

could be something about the access permissions to file?
-rwxr-xr-x    1 root     root            58 Feb 24 18:01 logger.sh

the code
Code:
#include <SoftwareSerial.h>
#include <Bridge.h>
#include <YunServer.h>
#include <YunClient.h>
#include <Process.h>

SoftwareSerial mySerial(10, 11); // RX, TX
YunServer server;

int BTN = 12;
int LED = 13;
int ENB = 8;
int MAX_LEN = 14; //  CMD
int SYNCIN = 7;
int SYNCOUT = 6;


int logcounter = 0;

void setup() {
  Serial.begin(38400);
  mySerial.begin(38400);
  Bridge.begin();



  server.listenOnLocalhost();
  server.begin();

  pinMode(BTN, INPUT);
  pinMode(LED, OUTPUT);
  pinMode(ENB, OUTPUT);
  pinMode(SYNCIN, INPUT);
  pinMode(SYNCOUT, OUTPUT);

  digitalWrite(ENB, LOW);
  digitalWrite(LED, LOW);
  digitalWrite(SYNCIN, LOW);
  digitalWrite(SYNCOUT, LOW);

  // attachInterrupt(4, changeleds, RISING);

  for (int i = 0; i < 7; i++) {
    // I'm alive
    digitalWrite(LED, HIGH);
    delay(150);
    digitalWrite(LED, LOW);
    delay(150);
  }

  delay(100);


}

void loop() {
  YunClient client = server.accept();
  if (logcounter < 3) {
    writeLog();
    logcounter ++;
  }

  delay(50);
}



String writeLog() {

  Process pLog;
  pLog.runShellCommand("/mnt/sda1/arduino/www/logger.sh TEST_ARDUINO");
  
  // DEBUG flash
  digitalWrite(LED, HIGH);
  delay(500);
  digitalWrite(LED, LOW);
  
}

14  Products / Arduino Yún / Re: Save file on the sd card from html client on: February 24, 2014, 12:18:32 pm
Hi,
I have a similar problem, I try to resolve in this way.... but arduino doesn't write anything...
(via ssh on terminal the logger.sh seems to be correct: it writes to file)


Function
Code:
String writeLog() {
  String result = " LOG_TEST";
  
  Process pLog;
  pLog.begin("/mnt/sda1/arduino/www/logger.sh");
  pLog.addParameter(result);
  pLog.runAsynchronously();
  
}


Shell code
Code:
#!/bin/sh

echo $(date +%Y.%m.%d_%T)$1 >> datalog.txt

### UPDATE
Try also with

Code:
String writeLog() {
  Process pLog;
  pLog.runShellCommand("/mnt/sda1/arduino/www/logger.sh TEST_ARDUINO");
}


...without results.
15  Community / Bar Sport / Re: -- new arduino on kickstarter? it is a fake? on: November 27, 2012, 11:54:39 am
no prob, just to know something.

I discover the storm only now. smiley

(not 'online' for a while, come back and found)
Pages: [1] 2