• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
F-MEYER LOGO

F-MEYER

Find the best information on all topics related to.

  • Home
  • Automotive
  • Finance
  • Home & Garden
  • Lifestyle
  • Tech

You are here: Home / Technology / Update C.H.I.P. from a Container

Update C.H.I.P. from a Container

By Fernando Meyer | Tuesday 2:57 pm

Update C.H.I.P. from a Container

I still tinker with my C.H.I.P devices but not all that frequently. Certainly not frequently enough to keep an environment on my daily laptop updated and ready to flash firmware. So I created a container to house all those dependencies!

If you do not care to read (or about) all the words and explanations, feel free to skip to the SHORT VERSION

BACKGROUND

As you may know from a previous post, I really struggled with the C.H.I.P. documentation simply because I wasn’t using Ubuntu. So I fumbled around and ended up getting something working. But now, I created a container to interface with my C.H.I.P. This allows me to not have to worry about the web flasher, spinning up a VM, or resolving all sorts of dependencies on my laptop.

While what I’ve done may not align with all the best practices of containers (and it is much larger than I’d like it to be), it is certainly helpful for me:

00 Prerequisites

Obviously this is reliant on Docker. There is tons of documentation online to help get Docker installed if it is not already. I’m going to leave that up to your internet skillz.

01 Pull down the image

I’ve put the image on Docker hub, so using it is as easy as “pulling” the image:

docker pull dswhitley/chipinteractive

NOTE: if you prefer to build it yourself, feel free, I’ve included some instructions both in my github repo and on the hub page

02 Run the container

Now in order to access the C.H.I.P. you need to allow the docker image privilege to your USB devices:

docker run -it --rm --name chip --privileged \
           -v /dev/bus/usb:/dev/bus/usb chip-interactive

NOTE: I didn’t do a consistent job with the naming, but feel free to modify if you wish

03 Enjoy the menu

For whatever reason I wanted this to provide an interactive menu. It will look like this and could use some explanation:

                 #  #  #               
               #########               
             ###       ###             
               # {#}   #               
             ###  '%######             
               #       #               
             ###       ###             
               ########                
                #  #  #                
=======================================
Menu...                                
=======================================
Enter 0 to revert back to default      
Enter 1 to customize buildroot         
XXXEnter 2 to customize LinuxXXX       
Enter 3 to flash with customizations   
Enter 4 to stop this container         
                                       
=======================================
Enter option Number:                  

And here is what the options mean:

0: this is simply using the default, currently available image
1: this just runs the make and make nconfig to customize
2: I did not get around to this yet…
3: this actually flashes the C.H.I.P. with whatever was built (in #1)
4: this just exits, stopping the container

NEXT STEPS

I don’t think I’ll be able to do what I wanted with this container, but I hope that someone else can benefit from it. Next I will probably make a non-interactive container that I may call from an Ansible playbook that also includes configuring the networking of the C.H.I.P. over the USB port with expect scripting. Pipedreams.

WHAT I LEARNED

  • I learned a lot about the C.H.I.P. build process, but I’m still not sure I understand buildroot, etc.
  • I learned about constructing a Docker image
  • I learned that I am not able to do what I wanted by configuring the firmware (at least from what I can tell). I had hoped to create an “image” that already contained my wireless SSID and password and potentially a bridged configuration so that I could just slap it on there and when it booted, the new C.H.I.P. would make itself part of my mesh…

REFERENCES:

  • My docker hub pre-built image: dswhitley/chipinteractive
  • My github repository for this work: dswhitley/CHIPinteractive
  • I’m still learning about git, so free to do git “stuff” there like review my commits or submit an issue or a pull request
  • Also, note my references in github, I couldn’t have done this without them
  • Official C.H.I.P. documentation: Flash CHIP Firmware

SHORT VERSION:

To avoid tl;dr enjoy this instead:

## 00 Prerequisites
# ensure that Docker is installed on your system
## 01 Pull down the image
docker pull dswhitley/chipinteractive
## 02 Run the container
docker run -it --rm --name chip --privileged \
           -v /dev/bus/usb:/dev/bus/usb chip-interactive
## 03 Enjoy the menu

Filed Under: Technology

Fernando MeyerFernando Meyer is a freelance writer and founder of fMeyer website. His writing strengths include business, financial topics, and lifestyle. He uses his life experiences to inspire his detailed and informative style of writing.

Primary Sidebar

  • Facebook
  • Instagram
  • LinkedIn
  • Pinterest
  • Twitter
  • YouTube

Looking for Something?

More to See

Denon Blu-ray Disc Player

Denon Blu-ray Disc Player: The Mercedes-Benz of Blu-Ray Players

Posted in Monday 2:03 pm

Sony BDP-S580 Overview

Sony BDP-S580 Overview

Posted in Sunday 1:52 pm

Do Stop Smoking Video Games Work?

Do Stop Smoking Video Games Work?

Posted in Saturday 12:56 pm

Why and How Gamification Works

Why and How Gamification Works

Posted in Friday 12:43 pm

My Favorite Discontinued Foods

My Favorite Discontinued Foods

Posted in Tuesday 1:02 pm

My Top Picks of Campgrounds in the DFW Area

My Top Picks of Campgrounds in the DFW Area

Posted in Wednesday 12:52 pm

5 Things to Check Before Buying a Used RV

5 Things to Check Before Buying a Used RV

Posted in Sunday 11:51 am

Footer

Disclaimer

This site is for informational and entertainment purposes only, and the content herein should not be mistaken for professional financial advice. It is highly recommended that you seek advice from a professional for serious financial matters. This site and its author may be compensated for expressing personal opinions regarding featured products and services.

Pages

  • About
  • Contact Us
  • Privacy Policy
  • Terms & Conditions

E-mail Newsletter

Copyright © 2023