Show Posts
Pages: 1 [2] 3 4 ... 120
16  Products / Arduino Yún / Re: Rest api : YunServer 146 Connection refused on: August 15, 2014, 11:35:42 pm
http://forum.arduino.cc/index.php?topic=221431.msg1609750#msg1609750


1. Yun configuration page, make sure REST API access  set  Open.
17  Products / Arduino Yún / Re: Linux and Root User on Arduino on: August 15, 2014, 11:34:40 pm
Create a non-privileged user in OpenWRT

http://wiki.openwrt.org/doc/howto/secure.access#create.a.non-privileged.user.in.openwrt
18  Products / Arduino Yún / Re: How to Render the sketch file/content running in arduino to a file in Linino? on: August 13, 2014, 01:27:37 am
A little challenge  if Arduino fuse is set (above method will be failed):

For example, the employer may want to keep all the code in the final product/project private (closed).

Technically they will fail. The Atmel chipset use in Arduino is not secure based,  to read firmware/code all is needed semi-invasive attacks.
start with the removal of the chip package, put chip’s die under suitable microscope with a little time and skill, the firmware/code will be out.

This much like people put lock on door, It will stop owner if he forget carry key, but not do much if Pro want in

The Atmel chipset use in Arduino is not secure based.

19  Products / Arduino Yún / Re: How to Render the sketch file/content running in arduino to a file in Linino? on: August 13, 2014, 01:23:41 am
Backup Arduino Flash image:

Code:
cp /usr/bin/run-avrdude /usr/bin/backup-arduino
nano  /usr/bin/backup-arduino

Code:
#!/bin/sh

echo 1 > /sys/class/gpio/gpio21/value
avrdude  -q -q -c linuxgpio -C /etc/avrdude.conf -p m32u4 -U efuse:r:/tmp/efuse:d; read efuse</tmp/efuse; rm /tmp/efuse
if [ $efuse -eq 203 ] # 203 = 0xCB
then
    avrdude -c linuxgpio -C /etc/avrdude.conf -p m32u4 -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xCB:m -Uflash:r:$1:r $2
else
    avrdude -c linuxgpio -C /etc/avrdude.conf -p m32u4 -U lfuse:w:0xFF:m -U hfuse:w:0xD8:m -U efuse:w:0xFB:m -Uflash:r:$1:r $2
fi
echo 0 > /sys/class/gpio/gpio21/value


Code:
root@Arduino:~#backup-arduino arduino.bin

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9587
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0xD8"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xD8:
avrdude: load data hfuse data from input file 0xD8:
avrdude: input file 0xD8 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xCB"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xCB:
avrdude: load data efuse data from input file 0xCB:
avrdude: input file 0xCB contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.00s

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading flash memory:

Reading | ################################################## | 100% 16.27s

avrdude: writing output file "arduino.bin"

avrdude: safemode: Fuses OK

avrdude done.  Thank you.
20  Products / Arduino Yún / Re: Serial & WiFi on: August 13, 2014, 12:35:55 am
Plan B:

connect USB RFID reader via Yun USB port, by pass Arduino complete.
21  Products / Arduino Yún / Re: YunServer with Http request(From iPhone) on: August 13, 2014, 12:30:50 am
If your  machine  works with code, then comment  out all the "Serial."  command .
22  Products / Arduino Yún / Re: Send Yun sensor data to MySQL on external server on: August 13, 2014, 12:26:12 am
Code:
nano /mnt/sda1/db.php

#!/usr/bin/php-cli
<?php

...

chmod 755 /mnt/sda1/db.php

will make db.php run without php-cli .

Code:
#include <Process.h>
#include <Bridge.h>

<Bridge.h> is duplicate, the code should work without it.

23  Products / Arduino Yún / Re: Perl Install problem on: August 12, 2014, 11:54:14 pm
Code:
opkg update
opkg list | grep perl


Code:
opkg install perl
opkg install perlbase-base


Code:
opkg files perlbase-base

Code:
Package perlbase-base (5.10.0-7) is installed on root and has the following files:
/usr/lib/perl5/5.10/base.pm
24  Products / Arduino Yún / Re: how to listen the packets coming out from the yun on: August 12, 2014, 11:49:39 pm
Code:
opkg list |grep tcpdump
opkg install tcpdump

Code:
tcpdump -XX -i eth1 port 80


Code:
        0x01f0:  6774 683a 2034 3733 0d0a 0d0a 7067 705f  gth:.473....pgp_
        0x0200:  6d65 7373 6167 653d 2d2d 2d2d 2d42 4547  message=-----BEG
        0x0210:  494e 2b50 4750 2b4d 4553 5341 4745 2d2d  IN+PGP+MESSAGE--
        0x0220:  2d2d 2d25 3044 2530 4156 6572 7369 6f6e  ---%0D%0AVersion
        0x0230:  2533 412b 6861 6e65 5749 4e2b 4a61 7661  %3A+haneWIN+Java
        0x0240:  7363 7269 7074 5047 2b76 322e 3025 3044  scriptPG+v2.0%0D
        0x0250:  2530 4125 3044 2530 4168 4977 4454 506c  %0A%0D%0AhIwDTPl
        0x0260:  7477 4b56 4e79 4d41 4241 2532 4639 6b6c  twKVNyMABA%2F9kl
        0x0270:  5478 7753 6e39 5936 5372 4e68 5554 3734  TxwSn9Y6SrNhUT74
        0x0280:  696e 6732 5654 5152 424d 756a 4f35 5035  ing2VTQRBMujO5P5
        0x0290:  6834 4671 346c 4925 3044 2530 4167 4c34  h4Fq4lI%0D%0AgL4
        0x02a0:  4959 4271 456c 6141 3979 646d 3967 334e  IYBqElaA9ydm9g3N
        0x02b0:  3325 3246 7774 4f65 6d6b 614e 3238 4370  3%2FwtOemkaN28Cp
        0x02c0:  4d70 3177 3137 7232 6659 3857 5163 7771  Mp1w17r2fY8WQcwq
        0x02d0:  7232 5045 3567 7978 7754 7325 3044 2530  r2PE5gyxwTs%0D%0
        0x02e0:  4156 5153 4774 6f48 6773 5667 3855 6c71  AVQSGtoHgsVg8Ulq
        0x02f0:  4945 7065 7777 5947 716b 4d71 5939 4b57  IEpewwYGqkMqY9KW
        0x0300:  584d 5a36 536e 666c 4e51 4e73 6c36 656d  XMZ6SnflNQNsl6em
        0x0310:  4f58 7568 3072 3237 6d5a 4f61 4225 3044  OXuh0r27mZOaB%0D
        0x0320:  2530 4146 4425 3246 526c 4a4d 645a 6152  %0AFD%2FRlJMdZaR
        0x0330:  4749 7a52 354a 7766 644a 4c49 3330 4278  GIzR5JwfdJLI30Bx
        0x0340:  3379 2532 4271 4153 6149 3455 316a 6574  3y%2BqASaI4U1jet
        0x0350:  6c67 7355 4d58 4e41 7059 694e 6f31 5374  lgsUMXNApYiNo1St
        0x0360:  5257 3925 3044 2530 414c 3159 476d 5972  RW9%0D%0AL1YGmYr
        0x0370:  4c37 5978 516f 5778 7632 6a74 6c59 7737  L7YxQoWxv2jtlYw7
        0x0380:  2532 4250 6f5a 7832 526a 4c69 2532 4647  %2BPoZx2RjLi%2FG
        0x0390:  6445 744b 4425 3242 6661 5167 5125 3344  dEtKD%2BfaQgQ%3D
        0x03a0:  2533 4425 3044 2530 4125 3344 6353 3834  %3D%0D%0A%3DcS84
        0x03b0:  2530 4425 3041 2d2d 2d2d 2d45 4e44 2b50  %0D%0A-----END+P
        0x03c0:  4750 2b4d 4553 5341 4745 2d2d 2d2d 2d25  GP+MESSAGE-----%

for wifi port:

Code:
tcpdump -XX -i wlan0 port 80
25  Products / Arduino Yún / Re: YUN SD writing and ftp on: July 30, 2014, 10:26:33 am
Install sofware:

Code:
opkg update
opkg install fdisk
opkg install mkdosfs
opkg install e2fsprogs
opkg install nano

Partition microSD:

http://www.howtogeek.com/106873/how-to-use-fdisk-to-manage-partitions-on-linux/

Code:
fdisk -l

Format  microSD( base on the format you need only run one of them):

Code:
mkdosfs -F 32 /dev/sda1
mke2fs -t ext2 /dev/sda1
mke2fs -t ext3 /dev/sda1
mke2fs -t ext4 /dev/sda1

Mount microSD:

Code:
mkdir -p /mnt/sda1
mount  /dev/sda1 /mnt/sda1


26  Products / Arduino Yún / Re: Yun - bootloader sketches > 87% of program memory lock up Yun RESOLVED on: July 27, 2014, 09:38:36 pm
Yun= AR9331+ Arduino Leonardo

Arduino Leonardo

Flash Memory   32 KB (ATmega32u4) of which 4 KB used by bootloader

Arduino Mega 2560

Flash Memory   256 KB of which 8 KB used by bootloader


Arduino Due

Flash Memory       512 KB all available for the user applications

Running off  program memory of Yun.

Upgrade it to

AR9331 + Arduino Mega 2560

http://forum.arduino.cc/index.php?topic=241259.msg1733572#msg1733572

AR9331 + Arduino Due

http://forum.arduino.cc/index.php?topic=241259.msg1731074#msg1731074



27  Products / Arduino Yún / Re: Problem to read SD card on: July 27, 2014, 09:21:30 pm
The output of

Code:
cat  /mnt/sd/datalog.txt

some case  should be "/mnt/sd1/datalog.txt".

28  Products / Arduino Yún / Re: view all pin states from webpage on: July 27, 2014, 09:19:55 pm
Replace ‘, ’ with  '.
 and Replace “, ”  with ".
29  Using Arduino / Networking, Protocols, and Devices / Re: I2C Communication between Arduino Uno and Cypress CY8C20160 Capacitive Sensor on: July 25, 2014, 03:02:50 pm
http://www.picaxeforum.co.uk/showthread.php?25752-Touch-sensing-i2c-chip

https://github.com/akafugu/TouchCY8C201A0
30  Products / Arduino Yún / Re: Python script to monitor Yun wifi connection on: July 25, 2014, 10:35:30 am
The reason external antenna is needed is:

  • On board chip antenna has average Gain  -0.5 dBi  
  • Yun's  transmit power is only 17 dBm.
  • Yun is siting at metal case.
  • The distance between Yun and WIFI router is far

Friis Transmission Formula with Propagation Law



  • R = Maximum range for communication link
  • N = Propagation Law (N=2 for line-of-sight, N=4 for urban environments)
  • PT= Transmit power
  • GT= Total antenna gain
  • λ = Wavelength
  • PR= Receiver sensitivity
  • FM= Fading margin

if in urban environments;-

  • Every 12 dBm receiver sensitivity gain will be double the distance.
  • Every 12 dBi antenna gain will be double the distance.
  • Every 12 dBm Transmitter power gain will be double the distance.


in line of sight environments;-

  • Every 6 dBm receiver sensitivity gain will be double the distance.
  • Every 6 dBi antenna gain will be double the distance
  • Every 6 dBm Transmitter power gain will be double the distance.

http://forum.arduino.cc/index.php?topic=175577.msg1304059#msg1304059

PC or  tablet has higher  gain antenna and transmit power could be much higher than Yun.

P.S. since use different  RF chip set, The  Receiver sensitivity could be higher than  Yun as well.
Pages: 1 [2] 3 4 ... 120