element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Blog Part X.2 Arduino Yun OpenWrt upgrades, sftp and nodejs
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: pmohan
  • Date Created: 18 Dec 2014 5:30 PM Date Created
  • Views 2629 views
  • Likes 3 likes
  • Comments 7 comments
  • RoadTest
  • yun
  • wifi_christmas_tree
  • iot_holidaylights
  • sftp
  • nodejs
  • arduino
Related
Recommended

Part X.2 Arduino Yun OpenWrt upgrades, sftp and nodejs

pmohan
pmohan
18 Dec 2014

As i get to understand more about the capabilities of Yun, i did some basic house keeping work on the Yun.

 

  1. Expanded Disk Space with micro SD card

          The openwrt-yun os running on Yun takes about 9MB of the available 16 MB. So its essential to expand disc space if you want to add more files and packages.Following the instructions here i expanded the memory with an 8 GB micro SD card. Please note that once you expand the disk space, if you ssh in to your you will see a folder called  /mnt/sda1/arduino/www

Anything you put in to this folder will be served as a static web page. To be able to copy multiple files you would need sftp on the yun. See below.

 

   2. Installed SFTP

          Copying files to Yun would be a pain if you have to do it one by one or by swapping the SD card between computer and yun. So i installed sftp by running the package manager through shell..(By the way Secure shell (ssh) is going to be your best friend when you are working with Yun.Get familiar with it if you are not already). Here is how to install sftp

          1. On Mac Os X open Terminal.

          2. ssh root@youryun.local

          3. provide password and then update opkg package manager before installing sftp

          4. opkg update

          5. opkg install openssh-sftp-server

    

          That should allow you to SFTP in to yun and copy multiple files.Here is a reference to using sftp.

 

     3. Install node js

            I am not a python developer. I wanted the flexibility of javascript. So i wanted nodejs. I installed it by running this command to install nodejs.

opkg install node

 

     4. Upgraded the OpenWrt-Yun image

Please note that if you upgrade the openwrt-yun image, you will be erasing all your setting. I did this and ended up erasing all my configuration and redoing everything again.

    1. This is necessary only if you want to keep up with the latest releases. Otherwise you might be perfectly fine with OpenWrt-Yun that came pre-installed on your yun.
    2. The default configuration dashboard you get when you access the yun using http://youryoun.local provides you a minimal configuration screen. But If you want to see the advanced openwrt-yun dashboard and the configure certain other features on your yun access the it by clicking the "advanced configuration panel(luci)" link that you will see on the top of the "Configure" screen.
    3. There are lot of configuration features here. i was even able to make the leds on the board blink by just updating some config entries.
    4. You can note the latest firmware version. It should be "OpenWRTYun Attitude Adjustment 1 / LucCI 0.11 Branch (0.11 + svn9964)" .. If you follow the upgrade steps below, you might see that last part get updated to svn10537 or some such based on the current version.
    5. I used the instructions from here to upgrade the OpenWrt-Yun, http://arduino.cc/en/Tutorial/YunSysupgrade

           6. Update: One thing to be aware of after upgrading the openwrt-yun image is that the host key for the Yun would have changed. If you didn't change the name of your Yun, then when you try to establish an  ssh connection to the updated yun, your computer may not be able to connect. For example in Mac OS X i got the following error:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
a4:84:3f:ff:e3:e5:95:59:23:d0:fd:08:8d:5b:f7:03.
Please contact your system administrator.
Add correct host key in /Users/yourusername/.ssh/known_hosts to get rid of this message.

 

All you have to do is edit the known_hosts file at and remove the entire entry belonging to your old yun name.

/Users/mohankrr/.ssh/known_hosts

 

In later posts i intend to show how i use the nodejs in my WiFi christmas tree project

  • Sign in to reply

Top Comments

  • shabaz
    shabaz over 10 years ago +1
    That's very cool. I wonder how well node.js runs on it!
  • clem57
    clem57 over 10 years ago in reply to pmohan

    yes, did this with latest ide. But had the Uno plugged in. Wonder if that matters. Worth a try.

     

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • pmohan
    pmohan over 10 years ago in reply to shabaz

    I Intend to take nodejs for a spin on the yun. With 64 mb of ram and 400 MHz processor, it shoudk provide a decent performance for small tasks related to the microcontroller portion of yun.will share my experience.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • pmohan
    pmohan over 10 years ago in reply to clem57

    I guess you are on windows. Did you install the drivers along with latest arduino ide.. ? Arduino yun needs drivers on windows pc for usb access

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • clem57
    clem57 over 10 years ago in reply to pmohan

    I do not see com or tty and I have tried several micro usb cables to pc.. image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • pmohan
    pmohan over 10 years ago in reply to clem57

    Yes. You need to make sure you dont select the ip addres in the list of ports in ardunio ide. Select the usb tty similar to what you do with uno.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube