RT @snapcraftio@twitter.com

"People using or building snaps no longer think of themselves as early adopters, but adhering to the status quo." Snapcrafter @diddledan@twitter.com shares his thoughts on the evolution of snaps. bit.ly/2ZbJnEV

๐Ÿฆ๐Ÿ”—: twitter.com/snapcraftio/status

JetBot Is NVIDIA's Newest DIY Robot: Open-Source, Ubuntu-Powered, Built Around The Jetson Nano - Phoronix
phoronix.com/scan.php?page=art

Thanks to an elite group of testing superheroes ๐Ÿฆธโ€โ™‚๏ธ the following issues have been fixed on day 7 of @ubuntu_mate for the @Raspberry_Pi; USB Booting ๐Ÿฅพ, VideoCore IV libraries/tools ๐Ÿ› ๏ธ, HDMI audio ๐Ÿ”Š, boot splash ๐Ÿ–Œ๏ธand window manager performance โšก

Day 5 of @ubuntu_mate for the #RaspberryPi added online automatic filesystem ๐Ÿ’พ expansion which doesn't require a reboot. The cause of the slow ๐ŸŒ first boot ๐Ÿ‘ขhas been identified (WIP). Thanks to @waveform80 the GPIO essentials are in place too. I โค๏ธ systemd-nspawn #systemd

Shipped the first batch of Disco Dingo prints . :) \o/ Thank you for your support ๐ŸŽถโ˜€๏ธ๐Ÿ’™.

Yesterday was day 3 of getting @ubuntu_mate 18.04.2 working on the @Raspberry_Pi. The main acheivement ๐ŸŽ‰ was Bluetooth now works and experimental f2fs support was added. Currently debugging a massive boot ๐Ÿ‘ขdelayโŒ›๏ธon very first boot. Once solved wider testing begins.

YES! The Snapd adb-support interface is finally here! ๐ŸŽ‰ Thank you to the snapcraft team. This will finally allow us to have the @ubports Installer work out of the box on every Linux distro! docs.snapcraft.io/the-adb-supp

This week I am working on @ubuntu_mate 18.04.2 images for the @Raspberry_Pi models 2 and 3/3+

Nothing exciting to report just yet, build system is configured and the root file system is being generated. Next up is adding the kernel and boot loader.

Full Circle Magazine: Full Circle Magazine #142

This month: * Command & Conquer * How-To : Python, Freeplane, and Darktable * Graphics : Inkscape * Everyday Ubuntu: Retro Games * My Opinion: Linux Devices * My Story: ALSA Settings * Book Review: Assembly Language * Ubuntu Games: Hatari Pt.2 plus: News, Linux Loopback, The Daily Waddle, Q&A, and more.

Get it while itโ€™s hot: https://fullcirclemagazine.org/issue-142/

Get started making ๐Ÿ› ๏ธ your own #IoT devices using @Raspberry_Pi@twitter.com, Ubuntu Core and snaps, with a retrospective from an embedded #Linux ๐Ÿง engineers point of view ๐Ÿ‘€

bit.ly/2S8ASWZ

Robert Ancell: Easy IoT with Ubuntu Core and Raspberry Pi

My current job involves me mostly working in the upper layers of the desktop software stack however I started out working in what was then called embedded engineering but now would probably be know as the Internet of Things (IoT). I worked on a number of projects which normally involved taking some industrial equipment (radio infrastructure, camera control system) and adding a stripped down Linux kernel and an application.While this was cutting edge at the time, there were a number of issues with this approach:

You essentially had to make your own mini-distribution to match the hardware you were using. There were some distributions available at the time but they were often not light weight enough or had a financial cost.
You had to build your own update system. That comes with a lot of security risks.
The hardware was often custom.

The above issues meant a large overhead building and maintaining the platform instead of spending that time and money on your application. If you wanted to make a hobby project it was going to be expensive.But we live in exciting times! It's now possible to use cheap hardware and easily accessible software to make a robust IoT device. For around $USD60 you can make a highly capable device using Ubuntu Core and Raspberry Pi. I decided to make a device that showed a scrolling LED display, but there are many other sensors and output devices you could attach.The Raspberry Pi 3 A+ is a good choice to build with. It was just recently released and is the same as the B+ variant but on a smaller board. This means you save some money and space but only lose some connectors that you can probably live without in an IoT device. I added an SD card and for protection put it in a case. I chose an nice Ubuntu orange colour. Next step was to connect up a display (also in Ubuntu orange). Note this didn't need the wires - it should fit flat onto the case but I spent too much time photographing the process that I accidentally soldered on the connector backwards. So don't make that mistake... ๐Ÿ˜• Final step was to connect a USB power supply (e.g. a phone charger). The hardware is complete, now for the software...Using Ubuntu Core 18 is as simple as downloading a file and copying it onto the SD card. Then I put the SD card into the Raspberry Pi, powered it on and all I had to do was:

Select my home WiFi network.
Enter my email address for my Ubuntu SSO account.
Secure shell into the Raspberry Pi from my Ubuntu laptop.

The last step is magically easy. If you connect a screen to the Pi it shows you the exact ssh command to type to log into it (i.e. you don't have to work out the IP address) and it uses the SSH key you have attached to your Ubuntu SSO account - no password necessary!$ ssh robert-ancell@192.168.1.210 Now to write my application. I decided to write it in C so it would be fast and have very few dependencies. The easiest way to quickly develop was to cross-compile it on my Ubuntu laptop, then ssh the binary over the the Pi. This just required installing the appropriate compiler:$ sudo apt install gcc-arm-linux-gnueabihf$ arm-linux-gnueabihf-gcc test.c -o test$ scp test robert-ancell@192.168.1.210:$ ssh robert-ancell@192.168.1.210 ./testOnce I was happy my application worked the next step was to package it to run on Ubuntu Core. Core doesn't use .deb packages, instead the whole system is built using Snaps.All that is required to generate a snap is to fill out the following metadata (running snapcraft init creates the template for you): name: little-orange-displaybase: core18version: gitsummary: Demonstration app using Ubuntu Core and a Raspberry Pidescription: |  This is a small app used to demonstrate using Ubuntu Core with a Raspberry Pi.  It uses a Scroll pHAT HD display to show a message.architectures:  - build-on: all    run-on: armhfgrade: stableconfinement: strictapps:  little-orange-display:    daemon: simple    command: display-daemon    plugs:      - i2cparts:  little-orange-display:    plugin: make    source: .This describes the following:

Information for users to understand the app.
It is an armhf package that is stable and confined.
It should run as a daemon.
It needs a special access to I2C devices (the display).
How to build it (use the Makefile I wrote).

To test the package I built it on my laptop and installed the .snap file on the Raspberry Pi:$ snapcraft$ scp little-orange-display_0+git.aaa6688_armhf.snap robert-ancell@192.168.1.210:$ ssh robert-ancell@192.168.1.210$ snap install little-orange-display_0+git.aaa6688_armhf.snap$ snap connect little-orange-display:i2c pi:i2c-1$ snap start little-orange-displayAnd it ran!   The last stage was to upload it to the Snap store. This required me to register the name (little-orange-display) and upload it:$ snapcraft register little-orange-display$ snapcraft push little-orange-display_0+git.aaa6688_armhf.snapAnd with that little-orange-display is in the store. If I wanted to make more devices I can by installing Ubuntu Core and enter the following on each device:$ snap install little-orange-display$ snap connect little-orange-display:i2c pi:i2c-1$ snap start little-orange-displayAnd that's the end of my little project. I spent very little time installing Ubuntu Core and doing the packaging and the majority of the time writing the app, so it solved the issues I would have traditionally encountered building a project like this.Using Ubuntu Core and Snaps this project now has following functionality available:

It automatically updates.
The application I wrote is confined, so any bugs I introduce are unlikely to break the OS or any other app that might be installed.
I can use Snap channels to test software easily. In their simplest usage I can have a device choose to be on the edge channel which contains a snap built directly from the git repository. When I'm happy that's working I can move it to the beta channel for wider testing and finally to the stable channel for all devices.
I get metrics on where my app is being used. Apparently it has one user in New Zealand currently (i.e. me). ๐Ÿ™‚

Jamie Strandboge: Monitoring your snaps for security updates

Some time ago we started alerting publishers when their stage-packages received a security update since the last time they built a snap. We wanted to create the right balance for the alerts and so the service currently will only alert you when there are new security updates against your stage-packages. In this manner, you can choose not to rebuild your snap (eg, since it doesnโ€™t use the affected functionality of the vulnerable package) and not be nagged every day that you are out of date.

As nice as that is, sometimes you want to check these things yourself or perhaps hook the alerts into some form of automation or tool. While the review-tools had all of the pieces so you could do this, it wasnโ€™t as straightforward as it could be. Now with the latest stable revision of the review-tools, this is easy:

$ sudo snap install review-tools $ review-tools.check-notices ~/snap/review-tools/common/review-tools_656.snap {'review-tools': {'656': {'libapt-inst2.0': ['3863-1'], 'libapt-pkg5.0': ['3863-1'], 'libssl1.0.0': ['3840-1'], 'openssl': ['3840-1'], 'python3-lxml': ['3841-1']}}}

The review-tools are a strict mode snap and while it plugs the home interface, that is only for convenience, so I typically disconnect the interface and put things in its SNAP_USER_COMMON directory, like I did above.

Since now it is super easy to check a snap on disk, with a little scripting and a cron job, you can generate a machine readable report whenever you want. Eg, can do something like the following:

$ cat ~/bin/check-snaps #!/bin/sh set -e snaps="review-tools/stable rsync-jdstrand/edge" tmpdir=$(mktemp -d -p "$HOME/snap/review-tools/common") cleanup() { rm -fr "$tmpdir" } trap cleanup EXIT HUP INT QUIT TERM cd "$tmpdir" || exit 1 for i in $snaps ; do snap=$(echo "$i" | cut -d '/' -f 1) channel=$(echo "$i" | cut -d '/' -f 2) snap download "$snap" "--$channel" >/dev/null done cd - >/dev/null || exit 1 /snap/bin/review-tools.check-notices "$tmpdir"/*.snap

or if  you already have the snaps on disk somewhere, just do:

$ /snap/bin/review-tools.check-notices /path/to/snaps/*.snap

Now can add the above to cron or some automation tool as a reminder of what needs updates. Enjoy!

Omer Akram: Control GPIO pins on a RaspberryPi 3 running Ubuntu Core 18, remotely (part 1/4)

Ubuntu Core 18 is out and one of the features that it packs with it is a set of snapd interfaces to access GPIO pins on the Raspberry Pi 2/3 in a fully confined snap. This enables one to just flash Ubuntu Core 18 on a micro sd card, boot, install a snap (which I author), connect a few interfaces and start controlling relays attached to a Raspberry Pi 2/3.If you don't have Ubuntu Core 18 already installed, you can see the install instructions hereTo get started (assuming you have Ubuntu Core 18 installed and have working ssh access to the Pi), you need to install a snap that exposes the said functionality over the network (local) $ snap install pigpioThe above command installed the pigpio server, which automatically starts in the background. The server could take as much as 30 seconds to start, you have been warned.We also need to allow the newly installed snap to access a few GPIO pins $ snap connect pigpio:gpio pi:bcm-gpio-4 $ snap connect pigpio:gpio pi:bcm-gpio-5 $ snap connect pigpio:gpio pi:bcm-gpio-6 $ snap connect pigpio:gpio pi:bcm-gpio-12 $ snap connect pigpio:gpio pi:bcm-gpio-13 $ snap connect pigpio:gpio pi:bcm-gpio-17 $ snap connect pigpio:gpio pi:bcm-gpio-18 $ snap connect pigpio:gpio pi:bcm-gpio-19 $ snap connect pigpio:gpio pi:bcm-gpio-20 $ snap connect pigpio:gpio pi:bcm-gpio-21 $ snap connect pigpio:gpio pi:bcm-gpio-22 $ snap connect pigpio:gpio pi:bcm-gpio-23 $ snap connect pigpio:gpio pi:bcm-gpio-24 $ snap connect pigpio:gpio pi:bcm-gpio-26The above pin numbers might look strange, but if you read a bit about the Raspberry Pi 3's GPIO pinout, you will realize, I only selected the "basic" pins, you are however free to connect all GPIO pin interfaces.The pigpio snap that we installed above exposes the GPIO functionality over WAMP protocol and http. The HTTP implementation is very basic and allows to "turn on" and "turn off" a GPIO pin and get current state(s) of the pins.Note: below commands assumes you have httpie installed (snap install http).To get the state of all pins    $ http POST http://raspberry_pi_ip:5021/call procedure=io.crossbar.pigpio-wamp.get_statesIf we only want the state of a specific pin    $ http POST http://raspberry_pi_ip:5021/call procedure=io.crossbar.pigpio-wamp.get_state args:='[4]'To "turn on" a pin    $ http POST http://raspberry_pi_ip:5021/call procedure=io.crossbar.pigpio-wamp.turn_on args:='[4]'To "turn off"    $ http POST http://raspberry_pi_ip:5021/call procedure=io.crossbar.pigpio-wamp.turn_off args:='[4]'I am skipping talking about the WAMP based API for this, to keep this blogpost short, I must add though, that the WAMP implementation is much more powerful than the http one, especially because it has "event publishing", imagine multiple people controlling a single GPIO pin from different clients, we publish an event that can be subscribed to, hence ensuring all client apps stay in sync. I'll talk about this in a different blog post. In a later post, I will also be talking about making the GPIO pins accessible over the internet.For me personally, I have a few projects for home and one for my co-working space that I plan to accomplish using this.The code lives on github

Show more
Mastodon

Server run by the main developers of the project ๐Ÿ˜ It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!