<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Script to deploy firmware to device using ethernet ipv6]]></title><description><![CDATA[<p dir="auto">#!/bin/sh</p>
<h1></h1>
<p dir="auto">while getopts "d:p:" opt;<br />
do<br />
case "${opt}" in<br />
d) device=${OPTARG};;<br />
p) pass=${OPTARG};;<br />
esac<br />
done</p>
<p dir="auto">if [ -z "$device" ]<br />
then<br />
echo "Ethernet device not set, use parameter -d &lt;device&gt;"<br />
exit 1;<br />
fi</p>
<p dir="auto">address=$(ping6 -c 1 -i 4 -I $device ff02::1 | grep "64 bytes from " | awk '{print $4}' | cut -d"%" -f1 | awk -F':' '{print $0}')</p>
<p dir="auto">if [ -z "$address" ]<br />
then<br />
echo "IP v6 address not set, use parameter -a &lt;address&gt;"<br />
exit 1;<br />
fi</p>
<p dir="auto">if [ -z "$pass" ]<br />
then<br />
echo "Password not set, use parameter -p &lt;password&gt;"<br />
exit 1;<br />
fi</p>
<p dir="auto">ssh-keygen -f "~/.ssh/known_hosts" -R "$address%$device"</p>
<p dir="auto">echo "Sending Firmware to device...\n"<br />
sshpass -p$pass scp -6 -o StrictHostKeyChecking=no ~/source/bin/targets/ramips/mt76x8/openwrt-ramips-mt76x8-omega2p-squashfs-sysupgrade.bin  root@[$address%$device]:/tmp</p>
<p dir="auto">echo "Executing firmware update...\n"<br />
sshpass -p$pass ssh -6 -o StrictHostKeyChecking=no root@$address%$device sysupgrade -n /tmp/openwrt-ramips-mt76x8-omega2p-squashfs-sysupgrade.bin</p>
]]></description><link>http://community.onion.io/topic/4483/script-to-deploy-firmware-to-device-using-ethernet-ipv6</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 14:56:02 GMT</lastBuildDate><atom:link href="http://community.onion.io/topic/4483.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 08 May 2021 15:38:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Script to deploy firmware to device using ethernet ipv6 on Sun, 09 May 2021 06:43:29 GMT]]></title><description><![CDATA[<p dir="auto">#!/bin/sh</p>
<h1></h1>
<p dir="auto">while getopts "d:p:" opt;<br />
do<br />
case "${opt}" in<br />
d) device=${OPTARG};;<br />
p) pass=${OPTARG};;<br />
esac<br />
done</p>
<p dir="auto">if [ -z "$device" ]<br />
then<br />
echo "Ethernet device not set, use parameter -d &lt;device&gt;"<br />
exit 1;<br />
fi</p>
<p dir="auto">address=$(ping6 -c 1 -i 4 -I $device ff02::1 | grep "64 bytes from " | awk '{print $4}' | cut -d"%" -f1 | awk -F':' '{print $0}')</p>
<p dir="auto">if [ -z "$address" ]<br />
then<br />
echo "IP v6 address not set, use parameter -a &lt;address&gt;"<br />
exit 1;<br />
fi</p>
<p dir="auto">if [ -z "$pass" ]<br />
then<br />
echo "Password not set, use parameter -p &lt;password&gt;"<br />
exit 1;<br />
fi</p>
<p dir="auto">ssh-keygen -f "~/.ssh/known_hosts" -R "$address%$device"</p>
<p dir="auto">echo "Sending Firmware to device...\n"<br />
sshpass -p$pass scp -6 -o StrictHostKeyChecking=no ~/source/bin/targets/ramips/mt76x8/openwrt-ramips-mt76x8-omega2p-squashfs-sysupgrade.bin  root@[$address%$device]:/tmp</p>
<p dir="auto">echo "Executing firmware update...\n"<br />
sshpass -p$pass ssh -6 -o StrictHostKeyChecking=no root@$address%$device sysupgrade -n /tmp/openwrt-ramips-mt76x8-omega2p-squashfs-sysupgrade.bin</p>
]]></description><link>http://community.onion.io/post/23593</link><guid isPermaLink="true">http://community.onion.io/post/23593</guid><dc:creator><![CDATA[crispyoz]]></dc:creator><pubDate>Sun, 09 May 2021 06:43:29 GMT</pubDate></item><item><title><![CDATA[Reply to Script to deploy firmware to device using ethernet ipv6 on Wed, 19 May 2021 18:46:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/6184">@crispyoz</a> Looks interesting, but can you give some context?</p>
]]></description><link>http://community.onion.io/post/23614</link><guid isPermaLink="true">http://community.onion.io/post/23614</guid><dc:creator><![CDATA[Lazar Demin]]></dc:creator><pubDate>Wed, 19 May 2021 18:46:40 GMT</pubDate></item><item><title><![CDATA[Reply to Script to deploy firmware to device using ethernet ipv6 on Wed, 19 May 2021 19:22:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/95">@Lazar-Demin</a></p>
<p dir="auto">I need to deploy my custom firmware build to my Omega2S+ based devices, but since a new board will not have a wireless connection I need to use the ethernet connection also built into my board. So there is no reliance upon ipv4 address, this script finds the connected ipv6 device, uses scp to transfer the firmware to the device, then executes sysupgrade on the device.</p>
]]></description><link>http://community.onion.io/post/23616</link><guid isPermaLink="true">http://community.onion.io/post/23616</guid><dc:creator><![CDATA[crispyoz]]></dc:creator><pubDate>Wed, 19 May 2021 19:22:10 GMT</pubDate></item><item><title><![CDATA[Reply to Script to deploy firmware to device using ethernet ipv6 on Fri, 03 Jun 2022 15:17:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/6184">@crispyoz</a> said in <a href="/post/23593">Script to deploy firmware to device using ethernet ipv6</a>:</p>
<blockquote>
<p dir="auto">sshpass</p>
</blockquote>
<p dir="auto">Hi Thanks for you script. Can you tell me how to install sshpass? Please? THk</p>
]]></description><link>http://community.onion.io/post/24643</link><guid isPermaLink="true">http://community.onion.io/post/24643</guid><dc:creator><![CDATA[Paolo Moro]]></dc:creator><pubDate>Fri, 03 Jun 2022 15:17:01 GMT</pubDate></item><item><title><![CDATA[Reply to Script to deploy firmware to device using ethernet ipv6 on Fri, 03 Jun 2022 15:27:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/5833">@Paolo-Moro</a>  sshpass is installed on your client machine, not on the Omega, so it depends on what OS you are running on your client machine. On Ubuntu you would use the command  sudo apt install sshpass, on windows you can use putty as an alternative to sshpass</p>
]]></description><link>http://community.onion.io/post/24644</link><guid isPermaLink="true">http://community.onion.io/post/24644</guid><dc:creator><![CDATA[crispyoz]]></dc:creator><pubDate>Fri, 03 Jun 2022 15:27:12 GMT</pubDate></item><item><title><![CDATA[Reply to Script to deploy firmware to device using ethernet ipv6 on Fri, 03 Jun 2022 19:15:23 GMT]]></title><description><![CDATA[<p dir="auto">Thanks!!!!! I need to use an ONION OMEGA to setup the other ONION OMEGA!! <img src="http://community.onion.io/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=ic093v0mjao" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" title=":-)" alt="🙂" /><br />
I need to install sshpass on Onion.</p>
<p dir="auto"><a href="https://www.devdungeon.com/content/python-ssh-tutorial" rel="nofollow">https://www.devdungeon.com/content/python-ssh-tutorial</a></p>
<p dir="auto">What do you think about?</p>
]]></description><link>http://community.onion.io/post/24645</link><guid isPermaLink="true">http://community.onion.io/post/24645</guid><dc:creator><![CDATA[Paolo Moro]]></dc:creator><pubDate>Fri, 03 Jun 2022 19:15:23 GMT</pubDate></item><item><title><![CDATA[Reply to Script to deploy firmware to device using ethernet ipv6 on Sat, 04 Jun 2022 16:56:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/5833">@Paolo-Moro</a> Seems it will achieve the same thing but why not use sshpass?</p>
<p dir="auto">opkg install sshpass</p>
<p dir="auto">If it is not found then edit /etc/opkg/distfeeds.conf  uncomment lines 2 and 5 then run opkg update then opkg install sshpass</p>
]]></description><link>http://community.onion.io/post/24651</link><guid isPermaLink="true">http://community.onion.io/post/24651</guid><dc:creator><![CDATA[crispyoz]]></dc:creator><pubDate>Sat, 04 Jun 2022 16:56:17 GMT</pubDate></item><item><title><![CDATA[Reply to Script to deploy firmware to device using ethernet ipv6 on Mon, 06 Jun 2022 15:23:55 GMT]]></title><description><![CDATA[<p dir="auto">If you want a version with more features for the same task, there's been <code>omega2flash</code> <a href="https://github.com/plan44/omega2flash" rel="nofollow">here</a> for quite a while now <img src="http://community.onion.io/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=ic093v0mjao" class="not-responsive emoji emoji-android emoji--wink" title=";-)" alt="😉" /></p>
<p dir="auto">It has some additional features such as:</p>
<ul>
<li>prevents programming the same omega2(s+) twice</li>
<li>can handle (early production) omega2s having no ethernet address and fix that.</li>
<li>can set the uboot environment (useful place to have per-device info such as hardware version, without the need for different firmware images).</li>
<li>can flash extra files (initial data for the jffs overlay) along with the firmware image.</li>
<li>can be run in a loop (e.g. as a service) to program any omega2 hardware it finds on the specified ethernet interface. It does so sequentially, but as initiating the firmware update only takes a few seconds, whereas completing the update can take minutes, this amounts to pretty parallel flashing of multiple devices.</li>
<li>can run on standard macOS/Linux, but also runs on OpenWrt under <code>ash</code> shell - so a "flasher" device can be built based on any OpenWrt capable device (I have a PC-engines Alix for that).</li>
<li>uses <code>expect</code> tool (usually available on macos/linux) to enter ssh password or <a href="https://github.com/plan44/plan44-feed/tree/master/sshpass" rel="nofollow">sshpass</a> on OpenWrt.</li>
</ul>
<p dir="auto">Any comments, input, contributions welcome, it's on <a href="https://github.com/plan44/omega2flash" rel="nofollow">github</a>.</p>
]]></description><link>http://community.onion.io/post/24656</link><guid isPermaLink="true">http://community.onion.io/post/24656</guid><dc:creator><![CDATA[luz]]></dc:creator><pubDate>Mon, 06 Jun 2022 15:23:55 GMT</pubDate></item><item><title><![CDATA[Reply to Script to deploy firmware to device using ethernet ipv6 on Wed, 25 Jan 2023 23:05:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/1033">@luz</a> very interesting. Thank you for the contribution.<br />
I did the same thing. But with a different logic.</p>
<ul>
<li>Run the "master" board</li>
<li>every minute she try, by wifi, to connect to an omega-... connect on ssh (with key accept by default yes) without sshpass.</li>
<li>After a successful connection ssh she inject a script that downloads the .bin from a repository on the LAN and starts the sysupgrade.<br />
(by wifi)</li>
</ul>
<p dir="auto">I tested it with 100pz in 2 houres, all automatic. I can create many masters... and do everything faster.</p>
<p dir="auto">But my version is sh + python script</p>
<p dir="auto">Onion Omega2+ is the best! €€€</p>
]]></description><link>http://community.onion.io/post/25176</link><guid isPermaLink="true">http://community.onion.io/post/25176</guid><dc:creator><![CDATA[Paolo Moro]]></dc:creator><pubDate>Wed, 25 Jan 2023 23:05:04 GMT</pubDate></item></channel></rss>