Show Posts
Pages: [1] 2 3 ... 7
1  Products / Arduino Yún / Re: Communication between 2 Arduino Yunv over WiFi on: July 17, 2014, 04:03:54 am
IHMO I think that the only problem is to understand the yun ip.
after that you can do it in the way you are more comfortable: raw socket, http, udp, osc, what you want. in which language do you want: c++ on arduino side, python, js with nodejs.. whatever
2  Products / Arduino Yún / Re: Wifi connection lost, do I have some logs? on: July 17, 2014, 03:53:58 am
ok there is something very strange happening..

The yun is up, I can ping it and ssh into it, because I remember its ip
BUT

In the configuration page of my router (an old to-link with openwrt on it) I can not see the ip address:


(I know that is that machine because I know the mac address and I can ping and ssh because I know the ip it had yesterday via dhcp)

So.. what can it be?
3  Products / Arduino Yún / Re: Yun NodeJS simple web server bug? on: July 16, 2014, 07:34:21 am
is it a windows problem?
4  Products / Arduino Yún / Re: Wifi connection lost, do I have some logs? on: July 16, 2014, 07:33:06 am
it seems to work.. I will see.. : )
5  Products / Arduino Yún / Re: Wifi connection lost, do I have some logs? on: July 15, 2014, 05:03:20 am
ok thank you, very helpful.

So, I'd like to replace `wifi-live-or-reset` with `wifi-live-or-log-and-reboot`

could it be something like that?:

Code:
#!/bin/sh

blink-start 200

IFACE="wlan0"
SLEEP_TIME=2
MAX_SLEEP=60

slept=0

iface_exists=""
iface_is_managed=""
iface_has_ssid=""
iface_is_access_point=""

update_vars() {
    iface_exists=`/usr/sbin/iwconfig $IFACE`
    iface_has_no_ssid=`/usr/sbin/iwconfig $IFACE | grep ESSID\:off\/any`
    iface_is_access_point=`/usr/sbin/iwconfig $IFACE | grep Mode\:Master`
}

wait_for_iface() {
    if [ $slept -gt $MAX_SLEEP ]
    then
        /bin/dmesg > /last_dmesg_with_wifi_errors.log
        /bin/sync
#        /sbin/uci set "arduino.@arduino[0].wifi_reset_step=timed_out"
#        /sbin/uci commit arduino
#        /usr/bin/wifi-reset-and-reboot
        exit 1
    fi

    sleep $SLEEP_TIME
    slept=$(($slept + $SLEEP_TIME))

    update_vars
}

update_vars

while [ true ]
do
    if [ "$iface_exists" = "" ]
    then
        wait_for_iface
#    elif [ "$iface_is_access_point" != "" ]
#    then
#        blink-stop
#        exit 0
#    elif [ "$iface_has_no_ssid" != "" ]
#    then
#        wait_for_iface
    else
        blink-stop

        # log down and reboot!
        now=$(date)
        cp /last_dmesg_with_wifi_errors.log "/www/log/last_dmesg_with_wifi_errors_$now.log"
        echo "$now : wifi down, rebooting."

        rm -f /last_dmesg_with_wifi_errors.log
        exit 0
    fi
done

is it correct?
6  Products / Arduino Yún / Wifi connection lost, do I have some logs? on: July 14, 2014, 03:17:20 am
Hi!
I have an arduino yun connected to my wifi with upgraded image and sd boot.
Everything working properly but sometimes the connection is lost and the yun resets the wifi configuration and opens the access point.

I don't know exactly why it happens: I think that during the night time the network goes in my home router and the arduino do not find the correct wifi and reset itself.

It seems to me (but my linux knowledge are very limited) that logging is disabled due to flash limitation memory (/var/log contains empty files).. isn't it?
I just found log read, but nothing helps..

Is there any log I can check?
How can I understand where the problem is?
How can disable the wifi configuration reset? Is it sane?
Can the sd-boot be the cause of the problem?
How can I enable the logs again to understand when and why the wifi connection is resetted?
Any kind of helps?

I have an OpenWRT router so I can also write something in the router to see if something goes wrong.. but.. what? (sorry I'm a beginner in the openwrt-network linux side)

It is a very strange situation.. The yun works properly with both processors for days but sometimes the dark side of the stars throw this black spell over my yun and nothing works, I have to connect to the ArduinoYun, set again the wireless password, and reboot it. Kind of annoying.
7  Products / Arduino Yún / Run OpenWRTYun on other hardware on: June 17, 2014, 06:04:06 am
Hi!
I am very pleased to use the OpenWRTYun with this vibrant community.
I have an old drink router with an openwrt on it.

Is it possible to install OpenWRTYun on it?
The CPU is a MIPS 24KEc V4.12, where on the Yun is MIPS 24Kc V7.4..

Code:
cat /proc/cpuinfo
system type : Ralink RT3350 id:1 rev:2
machine : D-Link DIR-300 B1
processor : 0
cpu model : MIPS 24KEc V4.12
BogoMIPS : 212.58
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0000, 0x0000, 0x0230, 0x0000]
ASEs implemented : mips16 dsp
shadow register sets : 1
kscratch registers : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available

HAve you ever tried it?
8  Products / Arduino Yún / Re: Arduino Yun: permanently set static ip address on: June 16, 2014, 12:07:46 pm
Hi!
Ok, sorry I'm really not experienced in the network stuffs and a little bit confused..

Federico, do you mean that in the wifi networks there is no possibility to have a static ip address?
Do you mean, in all wifi networks? Or only with the arduino yun hardware?

So, to understand a little bit better the config file from sonnyyu:
loopback interface: for localhost, 127.0.0.1, i don't touch it
lan interface: ip 192.168.0.42 for ethernet cable, let's say that if I don't use the ethernet cable is not used
wan interface: ip 192.168.0.43 for the WiFi module built on board? why the option ifname 'eth1'?

Sorry but I'm still trying to understand what all those configurations mean and http://wiki.openwrt.org/doc/uci/network is not so clear to me..
9  Products / Arduino Yún / Re: Getting started with Arduino Yun and Internet of Things on: June 16, 2014, 09:47:25 am
not related to the yun but I think they are good references:

Making things talk:
http://shop.oreilly.com/product/9780596510510.do

Programming Your Home: Automate with Arduino, Android, and Your Computer:
http://www.amazon.com/Programming-Your-Home-Pragmatic-Programmers/dp/1934356905
10  Products / Arduino Yún / Re: Basic mqtt publisher exmaple using YunClient on: June 15, 2014, 06:41:04 pm
I'm interested too in MQTT with arduino Yun.

I have read (here I think: http://blog.mongohq.com/building-mongodb-into-your-internet-of-things-a-tutorial/ ) that the matt library for arduino is not complete and this let me thought: ohu but I have an arduino yun that is much more!

Why do not implement the mqtt publisher inside the linux part? like with mosca ( https://github.com/mcollina/mosca ) for node.js or mosquitto (http://mosquitto.org/documentation/python/ ) with python..
it should be easier (at list I think) also include some security layer (that as far as I got matt per-se does not provide)..

so.. why mqtt in the arduino side? to develop some kind of code usable also for an arduino uno plus ethernet shield?
11  Products / Arduino Yún / Re: Arduino Yun: permanently set static ip address on: June 10, 2014, 09:29:27 am
sorry?
12  Products / Arduino Yún / Arduino Yun: permanently set static ip address on: June 10, 2014, 08:06:45 am
Hi!
First of all, sorry but I'm not super confident with linux and openwrt network configuration.

I'd like to have an aruino yun as a server that accepts requests in my home network.
Due to the fact that it has to be a server I think the best option is to configure it  with a static ip address.
To do that I've configured my router to start the dhcp from 192.168.3.100 and higher. Lower then 100 are static ip address.

Even if I read some posts already in this forum I'm not sure I'm doing it in the right way because sometimes when I reset the board or the router (switching off and on the power) the openwrt machine in the yun loses the network configuration I have done.

It's not very clear if the problem is caused by the reset of the yun,  the reset of the router, or both the things in some weird combination.

I'd like my yun to be always with the same ip address, even if the router is down for a while, even if I restart the yun and the wifi net is up, event if I restart the yun and the wifi net is down.

I've tried some different things from various post (*) but I think the best is from http://forum.arduino.cc/index.php/topic,217733.0.html

Code:
root@Arduino:~# cat /etc/config/network

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 'dhcp'
option 'proto' 'static'
        option 'ipaddr' '192.168.3.42'      # the status ip address I want
        option 'netmask' '255.255.255.0'
        option 'gateway' '192.168.0.1'
        option 'dns'     '192.168.0.1'

config interface 'wan'
option ifname 'eth1'
option proto 'dhcp'
option metric '10'

Sometimes it loses the net configuration: if I restart the yun It has a dhcp address (like 192.168.3.104) OR it open the access point setting (I haven't understand what causes what). Once it also happened that the white led that notify me the openwrt is ok (I have the new openwrt image) was not on (and this scared me a little).

Due to the fact that sometimes it loses the net configuration I have commented out the line
Code:
wifi-live-or-reset
in the file /etc/rc.local

So that:
Code:
root@Arduino:~# cat /etc/rc.local
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

#wifi-live-or-reset
boot-complete-notify

# Log down the server output
now=$(date +"%Y.%m.%d.%S")
logfilename="server.$now.log"
cd /root/node; node server.js > $logfilename 2>&1

exit 0

But I'm not sure it is enough to stay permanently with a static ip address and wait for the wifi net go up again.
Please post anything that could help me, some other posts, or man pages, because it is really annoying to set configuration every time!
Hope not to be too openwrt illiterate : )


-------------------------
(*)
http://forum.arduino.cc/index.php?topic=227693.msg1650457#msg1650457
http://www.remoteaccesscontrol.it/index.php/overview1/2-non-categorizzato/13-arduinoyun
http://forum.arduino.cc/index.php?topic=239095.0
13  Products / Arduino Yún / Re: webcam, mjpg-streamer, ps-eye3 on: June 02, 2014, 12:19:57 pm
uao, super cool!

so I'm testing some old webcams I have somewhere to take a single picture with both those two commands:

Code:
fswebcam test.png
ffmpeg -f video4linux2 -i /dev/video0 -vframes 1 test.jpeg

ps3eye is working (but sometimes fswebcam take a green picture, ffmpeg work perfectly) ,
logitec camera is working with both fswebcam and ffmpeg,

but with an old trust webcam.. I have a problem.
Now both fswebcam and ffmpeg are telling me
Quote
Cannot open video device /dev/video0 : No such file or directory
Note that before updating I managed to take picture with the trust camera with ffmpeg, but not with fswebcam because it told be something like
Quote
Corrupt JPEG data: 1 extraneous bytes before marker 0xd4
but now.. no way..

so, what to do?
here is some infos:
Code:
root@Arduino2:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 001 Device 003: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 001 Device 015: ID 093a:2468 Pixart Imaging, Inc. SoC PC-Camera
root@Arduino2:~# lsmod | grep uvc
uvcvideo               57752  0
videobuf2_vmalloc       1585  2 uvcvideo,pwc
videobuf2_core         16456  2 uvcvideo,pwc
videodev               70150  4 gspca_main,uvcvideo,pwc,v4l2_common
root@Arduino2:~#
it seems to see the camera with lsusb.. what can it be?
14  Products / Arduino Yún / webcam, mjpg-streamer, ps-eye3 on: June 02, 2014, 11:03:05 am
Sorry for more then one issues on the same post.

[SOLVED] 1) I did the trial of using a logitech webcam with the gun and everything was working OK. I was using the binary from
http://www.custommobileapps.com.au/downloads/mjpg-streamer.ipk
that I found in this forum post:
http://forum.arduino.cc/index.php?topic=188690.0


Downloading the packages from this other post: http://neuroballs.com/2014/01/how-to-build-a-arduino-yun-powered-cat-camera/
mjpg_streamer is installing with no problems!

2) Is there a way to have the ps-eye3 working?
As far as I understood it is not a UVC driver.. how to do?
15  Products / Arduino Yún / Re: Node.js for the YUN on: May 26, 2014, 09:08:26 am
I'm using express (with body-parser sub-module) for rest request,
ejs as renderer,
sqlite3 as db and dblite ( https://github.com/WebReflection/dblite ) as node module for controlling it
then my setup is like your: bootstrap and jquery used in the front end for layout, glyph icons and ajax.
Pages: [1] 2 3 ... 7