Yun 17.11 Reboot prerelease

Hi Yuners!
Do you want to be part of the most exciting update ever :slight_smile: ? This is your chance.

We have a new and shiny beta release of the Yun firmware to try out!

This release is meant to be as “bleeding edge” as possible;
Our commitment is to update it regularly, releasing both new sysupgrade images and updating the standalone packages.

The distribution medium is a bit different from the usual: it contains a binary (GitHub - arduino/yun-go-updater) which takes care of setting up a tftp server and updating both bootloader (if needed) and rootfs, in a totally unattended way.

The bootloader (GitHub - arduino/uboot-yun) needs to be updated because the kernel doesn’t fit anymore in the tiny partition it had back in 2014. The automatic procedure follows YunUBootReflash but, doing it automatically and checking every step, you can be 99.999% sure that it will not brick your Yun. The new bootloader also supports the old firmware partitioning scheme, so you can safely restore 1.5.x or 1.6.x images over the new one without downgrading it.

However, this is still Beta software, so use it at your own risk. If you prefer to have manual control over the procedure, update the bootloader in the “classical” way and then execute the updater, which will only flash the new filesystem.

About the filesystem, it is now based on LEDE Project and lives here . Thanks to the awesome job the LEDE community is doing, we are now able to ship an astonishing 8294 packets, doubling the first Openwrt-based Yun repository.

SSL is now a first class citizen and openssl is shipped by default with the base image, making super easy (and highly encouraged) to use secure communication channels from your sketches. Bridge library supports SSL too, so the integration with your existing projects is straighforward.

Our extra packages are available in this branch (GitHub - arduino/openwrt-arduino-packages: Collection of packages from Arduino for OpenWrt official distribution) and include the Amazon AWS SDK for Python, packaged and ready to be installed. We’ll provide an exhaustive howto guide about the new onboarding experience in the next few weeks.

With the new image it’s now possibile to configure the target Access Point directly for the Arduino IDE (or via Create) using YunFirstConfig sketch.
No more MAC address wars when running a workshop :slight_smile:

Having said that, it’s time to experiment: leave your comments and suggestions here and we’ll try to address them before the final release.

LINKS!
Windows
OSX
Linux64
Linux32
LinuxARM

Happy Reboot!

Yeah !
It's a nodejs v6 !!!
Bombita !!!

the automatic method didn't work for me (win): cmd windows close / bad ip in tftp server...
so i used the manual method

then transfert system to extroot : [OpenWrt Wiki] docs:user-guide:extroot_configuration

installed node, trying node-cylon, but there is a problem with the node-serialport used by the cylon package .

Hi smag0,
thanks for testing!

To expand the filesystem to the SD it should be enough to use this sketch.

However, it wouldbe extremely useful if you could paste here the error that you get from the updater and the one on node-serialport.

Thanks a lot!

Hi facchinm,

Here are the results of my investigations, I'm not really aware with electronics, & feel better with nodejs / javascript devs, this ismy tests and perharps I dont do the things I had to, but I try :wink:

YUN-GO-UPDATER

with more test, it works with yun-go-updater.zip on my Windows 10, but :

  • the serial Monitor of the Arduino software must be closed otherwise yun-go-updater opens and close immediately the dos window, and nothing happens.
    When I tested for the first time, I think the monitor was open, so that's why I though it does'nt work.
  • on a yun where Linino was installed the dos window opens a little more time, i could see IP address of the server and client, but then close shortly, perharps because of another Uboot Prompt : this one asks to type "lin" as mentionned here : http://wiki.linino.org/doku.php?id=wiki:upgradetolininoio ?

So I installed manually Uboot & squashfs from your package with kernel from this page : https://www.arduino.cc/en/Tutorial/YunUBootReflash

Then the Yun's boot extremly fast compared to the 1.5.3 image, or the linino image I installed before, and that's a really good thing. Luci interface is fine too.

( ArduinoOS was fine for the beginners, and a package would be nice :slight_smile: )

YUNDISKSPACEEXPANDER

I don't think that the YunExpander sketch that you mention does'nt create a swap partition, which is a good thing to install nodejs and other package.
opposed to the [OpenWrt Wiki] docs:user-guide:extroot_configuration that permits swap partition ? + in "notes section" the way to transfert opkg-lists on overlay.

  • I get this message : with yunexpander :
This sketch will format your micro SD card and use it as additional disk space for your Arduino Yun.
Please ensure you have ONLY your micro SD card plugged in: no pen drives, hard drives or whatever.
Do you wish to proceed (yes/no)? yes

Starting Bridge...

You don't have enough disk space to install the utility software. You need to free at least 1MB of Flash memory.
Retry!

so I replaced "rootfs" to "overlay" in YunDiskSpaceExpander :

Process awk;

awk.runShellCommand(F("df / | awk '/rootfs/ {print $4}'"));

```
to
```

awk.runShellCommand(F("df / | awk '/overlay/ {print $4}'"));

```

then , I got a message that said an error installing mkdos
```
root@Arduino:~# opkg install mkdosfs
Unknown package 'mkdosfs'.
Collected errors:
* opkg_install_cmd: Cannot install package mkdosfs.
```

--> I'm blocked

GPIO /PWM FROM NODEJS :

As I said, i'm a nodejs dev and with the earlier versions (LININO), I could access gpio & pwm pins directly from my node js scripts :
The best way to do that for me was using lininoio method http://wiki.linino.org/doku.php?id=wiki:upgradetolininoio :
the command 'lininoio start' upload a 'bathos-xxx.hex' sketch. and change 'Arduino console to 'spicons' and other things that I didn't succès to redo, but with lininoio I could acces gpio pin directly with linux command as explained here http://wiki.linino.org/doku.php?id=wiki:lininoio_sysfs
Is there a way to access the arduino pins (gpio, pwm...) in the same way with the new Reboot 17-11 ?
It would be a good thing for me if I could :wink: .

Because I was blocked, I tried to use cylon Arduino YUN with Cylon.js and Cylon.js Fun With The Arduino Yun

with this simple script :

var Cylon = require('cylon');

Cylon.robot({
connections: {
arduino: { adaptor: 'firmata', port: '/dev/ttyATH0' }
},

devices: {
led: { driver: 'led', pin: 13 }
},

work: function(my) {
every((1).second(), function(){
my.led.toggle();
});
}
}).start();

so I have installed node-cylon-firmata :
...
Downloading http://downloads.arduino.cc/openwrtyun/17.11/packages/packages/mips_24kc/packages/node-cylon_0.22.0-7_mips_24kc.ipk
[...]
Configuring node-cylon.
Configuring node-arduino-firmata.
Configuring node-cylon-i2c.
Configuring node-cylon-gpio.
Configuring node-cylon-firmata.
root@Arduino:~# node cylontest.js
Cannot find the 'cylon-firmata' module.
This problem might be fixed by installing it with 'npm install cylon-firmata' and trying again.
Terminated

but cylon-firmata is not found : I thought that node-cylon-firmata was the remplacement of cylon-firmata but ???


So I installed 'cylon-firmata' 'firmata' as describe here https://cylonjs.com/documentation/platforms/yun/
installing on my windows (uninstall node 9 & install node 6), then transfering with winscp : 

mkdir cyloninstall
cd cyloninstall
npm init
npm install firmata

remove cylonfirmata/serialport , then transfert to /usr/lib/node

and then .... got that : 

root@Arduino:~# opkg install node-cylon
Installing node-cylon (0.22.0-7) to root...
Downloading http://downloads.arduino.cc/openwrtyun/17 .11/packages/packages/mips_24kc/packages/node-cylon_0 .22.0-7_mips_24kc.ipk
Installing node (v6.11.2-3) to root...
Downloading http://downloads.arduino.cc/openwrtyun/17 .11/packages/packages/mips_24kc/packages/node_v6.11.2 -3_mips_24kc.ipk
Installing node-npm (v6.11.2-3) to root...
Downloading http://downloads.arduino.cc/openwrtyun/17 .11/packages/packages/mips_24kc/packages/node-npm_v6. 11.2-3_mips_24kc.ipk
Configuring node.
Configuring node-npm.
Configuring node-cylon.
root@Arduino:~# opkg install node-cylon-firmata
Installing node-cylon-firmata (0.22.0-7) to root...
[...]
Configuring node-serialport.
Configuring node-arduino-firmata.
Configuring node-cylon-i2c.
Configuring node-cylon-gpio.
Configuring node-cylon-firmata.
root@Arduino:~# touch cylontest.js
root@Arduino:~# node cylontest.js
(node) v8::ObjectTemplate::Set() with non-primitive v alues is deprecated
(node) and will stop working in the next major releas e.

==== JS stack trace ================================= ========

Security context: 0x5be2a925 #0#
1: .node [module.js:597] [pc=0x5e763744] (this=0x 5bef84dd <an Object with map 0x2341fde1>#1#,module=0x 57edb2b5 <a Module with map 0x234206fd>#2#,filename=0 x57eda53d <String[54]: /usr/lib/node/serialport/build /Release/serialport.node>)
2: load [module.js:487] [pc=0x236e8bb8] (this=0x5 7edb2b5 <a Module with map 0x234206fd>#2#,filename=0x 57eda53d <String[54]: /usr/lib/node/serialport/build/ Release/serialport.node>)
3: tryModuleLoad(aka tryModuleLoad) [module.js:44 6] [pc=0x236e8480] (this=0x5be08121 ,modul e=0x57edb2b5 <a Module with map 0x234206fd>#2#,filena me=0x57eda53d <String[54]: /usr/lib/node/serialport/b uild/Release/serialport.node>)
[...]
71: /* anonymous /(aka / anonymous /) [module.j s:604] [pc=0x236d570c] (this=0x5be08121 )
72: run(aka run) [bootstrap_node.js:389] [pc=0x236 d5514] (this=0x5be08121 ,entryFunction=0x5 bed0565 <JS Function Module.runMain (SharedFunctionIn fo 0x5bebadcd)>#41#)
73: startup(aka startup) [bootstrap_node.js:149] [ pc=0x236919b0] (this=0x5be08121 )
74: /
anonymous /(aka / anonymous */) [bootstra p_node.js:504] [pc=0x2368e6e4] (this=0x5be08109 ,process=0x5bef8ab9 <a process with map 0x23413705># 42#)

I, [2017-12-15T00:16:55.648Z] INFO -- : [Robot 1] - Starting connections.
/usr/lib/node/firmata/lib/firmata.js:554
this.transport = new com.SerialPort(port, setting s.serialport);
^

TypeError: com.SerialPort is not a constructor
at new Board (/usr/lib/node/firmata/lib/firmata.j s:554:22)
at Adaptor.connect (/usr/lib/node/cylon-firmata/l ib/firmata.js:42:16)
at Robot. (/usr/lib/node/cylon/lib/rob ot.js:299:27)
at /usr/lib/node/cylon/lib/utils/helpers.js:237:3 6
at Array.forEach (native)
at Object.parallel (/usr/lib/node/cylon/lib/utils /helpers.js:237:13)
at Robot.startConnections (/usr/lib/node/cylon/li b/robot.js:303:12)
at next (/usr/lib/node/cylon/lib/utils/helpers.js :266:22)
at Object.series (/usr/lib/node/cylon/lib/utils/h elpers.js:270:3)
at Robot.start (/usr/lib/node/cylon/lib/robot.js: 235:5)
at Object. (/root/cylontest.js:17:4)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:1 0)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
root@Arduino:~#


trying to put the 'serialport' from the 'firmata' folder & got this : 

root@Arduino:~# node cylontest.js
It looks like serialport didn't compile properly. This is a common problem and its fix is well documented here https://github.com/voodootikigod/node-serialport#to-install
The result of requiring the package is: undefined

/usr/lib/node/cylon/lib/registry.js:39
throw e;
^
Missing serialport dependency
root@Arduino:~#

no more idea I'm blocked.

It was so simple with the lininoio method !!!
HOW COULD I 'SIMPLY' ACCESS GPIO/ PWM from the nodejs programs I've developped ???????????

DOn't please tell me it's not possible...

Woah, such a lot on information :slight_smile: Thank you!
I'm trying to answer them "inline".

Yun updater tool: the serial monitor and anything which holds the lock on the serial port must be closed before launching the tool. About the uboot prompt, it should recognize "ard", "lin" and "any button" stop words so it's a bit strange that it didn't; I'll investigate

ArduinoOS as a package: can be done, it's not a top priority though

YunDiskSpaceExpander on this link is already adapted to the new image, you probably used the old one.
About swap, it's a good idea, I'll add it to that script

LininoIO: again, it's not a top priority, but if it gets some traction I'll package it and make it available via opkg

Node-cyclon-serialport: thanks for testing, I'll check if the problem is on our compilation recipe or somewhere else

Thxs for your job.

With YunDiskExpander that you mention, I got this error messaege :

This sketch will format your micro SD card and use it as additional disk space for your Arduino Yun.
Please ensure you have ONLY your micro SD card plugged in: no pen drives, hard drives or whatever.
Do you wish to proceed (yes/no)? yes

Starting Bridge...

Ready to install utility software. Please ensure your Arduino Yun is connected to internet.
Ready to proceed (yes/no)? yes
Updating software list...
Software list updated. Installing software (this will take a while)...
e2fsprogs dosfstools fdisk rsync kmod-fs-ext4 installed

Proceed with partitioning micro SD card (yes/no)? yes
Enter the size of the data partition in MB: 3000
Partitioning (this will take a while)...

err. formatting to EXT4

with dmesg like that :


[ 436.812368] wlan0: associated
[ 436.813954] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 437.111673] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready
[ 511.003990] sd 0:0:0:0: [sda] 15196160 512-byte logical blocks: (7.78 GB/7.25 GiB)
[ 511.015670] sda: sda1 sda2
[ 665.125842] kmodloader: loading kernel modules from /etc/modules.d/*
[ 665.357549] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 665.863450] kmodloader: loading kernel modules from /etc/modules.d/*
[ 665.873601] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 716.019422] sda: sda1
[ 717.161115] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[ 718.838929] EXT4-fs (sda1): recovery complete
[ 718.845881] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts:
root@Arduino:~#

Perharps could I do what I want without lininoio, with Serial1 communicating to /dev/ttyATH0 as explain in this github :

I

I'll explore a new way,
I've just discovered I could use ttyATH0

with this sketch :

void setup() {
// Open serial communications and wait for port to open:
Serial.begin(57600);
Serial1.begin(250000);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
while (!Serial1) {
; // wait for serial port to connect. Needed for native USB port only
}

Serial.println("Goodnight moon!");
Serial1.println("Goodnight moon!");
}

void loop() { // run over and over
if (Serial1.available()) {
Serial.write(Serial1.read());
}
if (Serial.available()) {
Serial1.write(Serial.read());
}
}

with 2 linux terminal, in the first, i use

root@Arduino:~# cat /dev/ttyATH0

& in the other, i write with :

root@Arduino:~# echo ok > /dev/ttyATH0
root@Arduino:~# echo test > /dev/ttyATH0

Is there a bidirectional sketch that map directly Arduino pins & fonction (pinmode, analogRead, digitalWrite...), so I could write something like a JSON :

echo {"D13":1,"PWM9":45} > /dev/ttyATH0 ???

I will explore with #include <ArduinoJson.h>
?

Hi,

I have an Arduino YUN shield and a 8device NUY shield. will this work on them? or just the original YUN. I also have 2 Arduino TIAN, will these still be supported in the future?

Thanks,
Luc

Really excited about a big update! Is there a rough timeline for when this will come out of beta (weeks or months)?

@ltheoret Yun shield (NUY if branded by 8devices) will surely be supported at some point. Probably you'll need to update Caraboot manually to accept the new partition layout but it will be quite simple. The same applies to Yun mIni and Industrial 101. Tian, instead, is really a product on its own and won't be available with this port.

@TrashCompactor we are still fixing some little bugs here and there, but I think we'll go really live near the end of January.

Hi facchinm,

Thank you for the update.

Luc

Aaaand after all this, now the Yun's been retired?!

Finally a chance to try it out ... so far the auto updater is not working. Needs sudo for the tftp daemon, assumes there isn't one already running (closed my existing) and then an IP address conflict (switched off local machine causing the conflict)

I'm still getting a timeout at flashing the boot loader: ...

Flashing Bootloader
tftp 0x80060000 u-boot-arduino-lede.bin
eth0 link down
FAIL
eth1 link down
FAIL
Using eth0 device
TFTP from server 192.168.99.200; our IP address is 192.168.99.201
Filename 'u-boot-arduino-lede.bin'.
Load address: 0x80060000
Loading: T T T T T T
expect: timer expired after 30 seconds
Could not get your IP address, check your network connection

Update: seemed like the ip address setup was a bit finicky about being on an existing network, got it working after isolating on a cross over cable.

Nice to see an update on the Yun, off to explore ! Thanks :slight_smile:

@facchinm ... what is the status on this ? I was playing along nicely but then needed some new modules, looks like kernel updates etc. needed but not available ?

Hi, the links arent' working. Is this project dead?

Doesn't seem dead but this thread does.

try these: Releases · arduino/yun-go-updater · GitHub

niallp:
Finally a chance to try it out ... so far the auto updater is not working. Needs sudo for the tftp daemon, assumes there isn't one already running (closed my existing) and then an IP address conflict (switched off local machine causing the conflict)

I'm still getting a timeout at flashing the boot loader: ...

Flashing Bootloader
tftp 0x80060000 u-boot-arduino-lede.bin
eth0 link down
FAIL
eth1 link down
FAIL
Using eth0 device
TFTP from server 192.168.99.200; our IP address is 192.168.99.201
Filename 'u-boot-arduino-lede.bin'.
Load address: 0x80060000
Loading: T T T T T T
expect: timer expired after 30 seconds
Could not get your IP address, check your network connection

Update: seemed like the ip address setup was a bit finicky about being on an existing network, got it working after isolating on a cross over cable.

Nice to see an update on the Yun, off to explore ! Thanks :slight_smile:

niallp:
Finally a chance to try it out ... so far the auto updater is not working. Needs sudo for the tftp daemon, assumes there isn't one already running (closed my existing) and then an IP address conflict (switched off local machine causing the conflict)

I'm still getting a timeout at flashing the boot loader: ...

Flashing Bootloader
tftp 0x80060000 u-boot-arduino-lede.bin
eth0 link down
FAIL
eth1 link down
FAIL
Using eth0 device
TFTP from server 192.168.99.200; our IP address is 192.168.99.201
Filename 'u-boot-arduino-lede.bin'.
Load address: 0x80060000
Loading: T T T T T T
expect: timer expired after 30 seconds
Could not get your IP address, check your network connection

Update: seemed like the ip address setup was a bit finicky about being on an existing network, got it working after isolating on a cross over cable.

Nice to see an update on the Yun, off to explore ! Thanks :slight_smile:

Hello,
TFTP server is your computer. run TFTP util on your computer.
Then on u-boot status, put the cmd 'setenv serverip your ip'
Next, put 'setenv ipaddr board's ip ' . You can use any thing as board ip if
it is in your network. Then re try.

Have a good luck.

Hello, thanks to new update.

I tried it but got a fail. So, I set up it manually resulting in a success.

Anyone who try it manually should be careful at some points.

You should use a new disk-expander util because old one yields a insufficient memory alarm.
(use the new version in the go-update package).

Next, you should update your u-boot at first due to a large package.

I am really happy due to this new update. I have some problems in using the python in the old version
(especially pip was not working due to certification problem). Now, it works fine.
Thanks.