Po-util: The Ultimate Local Particle Experience for Linux and macOS

electron
boron
argon
xenon
photon
Tags: #<Tag:0x00007f1ca1486b50> #<Tag:0x00007f1ca14869e8> #<Tag:0x00007f1ca1486880> #<Tag:0x00007f1ca1486740> #<Tag:0x00007f1ca14865d8>

#94

I’ve made a lot of improvements recently, notably refactoring code and adding a few more commands, like the reboot command which allows you to quickly force a reboot on a device.

Example:

$ po reboot # Reboot an automatically chosen device
$ po reboot -d /dev/ttyACM0 # Reboot a specific device

Also, the Linux DFU sticking problem has been resolved.

As always you can install po using:

$ bash <(curl -sL get.po-util.com)

You can join the Gitter room as well to get the latest info or to get po support.


#95

I’ve added a new feature that makes it easier to choose which version of Device OS you want to use when compiling.

You can now run po versions to get the list of all Device OS versions.

Example:

$ po versions
Finding Particle Device OS versions...
release/v0.5.3
release/v0.5.3-rc.2
release/v0.5.3-rc.3
release/v0.5.4
release/v0.5.5
release/v0.6.0
release/v0.6.0-rc.2
release/v0.6.1
release/v0.6.1-rc.1
release/v0.6.1-rc.2
release/v0.6.2
release/v0.6.2-rc.1
release/v0.6.2-rc.2
release/v0.6.3
release/v0.6.4
release/v0.7.0
release/v0.7.0-rc.1
release/v0.7.0-rc.2
release/v0.7.0-rc.3
release/v0.7.0-rc.4
release/v0.7.0-rc.6
release/v0.7.0-rc.7
release/v0.8.0-rc.1
release/v0.8.0-rc.2
release/v0.8.0-rc.3
release/v0.8.0-rc.4
release/v0.8.0-rc.5
release/v0.8.0-rc.6
release/v0.8.0-rc.7
release/v0.8.0-rc.8
Use one of these versions with 'po config'

You can then select a version with po config:

$ po config release/v0.8.0-rc.8
$ po update # only necessary if the version has been released sooner than you've updated po

You can get this new feature by updating your po installation:

$ po update

#96

If you had to pay a price for po-util what would you be willing to pay? (I’m not planning on monetizing po-util but I’m curious about the value it has.)

And yes, I’ll be adding Mesh support ASAP.


#97

If you’ve got a few minutes, why don’t you offhand a feature comparison chart b/t other tools and po-util? I’ve used it and I’m not even sure what all it can do!


#98

Here are the most distinctive features:
(There are many more but they are more technical.)

  • Po-util is the only comprehensive local Particle development experience. The installer can prepare a Mac or Linux machine for Particle development in minutes.

  • Po-util has a distinct flow for building and uploading firmware. You can compile a project and flash the firmware to a Particle device with a single command.

  • Po-util supports all Particle devices, even Raspberry Pi and Redbear Duo.

  • Po-util has an Atom integration that provides shortcuts for compiling projects and uploading firmware over USB or wirelessly.

  • Po-util has a library manager that can automatically download and link libraries from Particle or GitHub directly into your project. It also has an example manager that can list and import example projects from downloaded libraries.

  • Every po-util project is initialized as a Git repository that is Travis CI ready so you can test your code compilation on Travis CI.

  • Po-util can package projects as a folder and a .zip so that your projects can be compiled with tools other than po-util or on computers that don’t have the libraries your project may depend on.

  • Po-util has commands for controlling the state of Particle devices. There are commands to put devices into and out of listening mode, dfu mode, and safe mode.

  • Po-util is actively developed and you can reach out to me with any comments or suggestions.


#99

I’m working on adding Mesh support to po-util.

Currently I have local building working on Linux and I’ll have it on Mac soon.


#100

I have released support for mesh firmware in po-util on macOS.

You can get it with:

po update

It is still neccessary to manually select / initialize mesh firmware on your computer before compiling for mesh devices. You can do this with:

po config v0.8.0-rc.25-mesh duo false
po update
cd ~/.po-util/src/particle/firmware
git submodule update --init

More features coming soon…


#101

I’ve fully released Mesh support for Linux and macOS. All commands now support xenon, argon, and boron.

To select / init mesh now only the following is required:

po config v0.8.0-rc.26
po setup-mesh

The config command will now automatically switch firmware to the version you select, so po update is no longer required in this instance.


#102

Just tried again and having some success by not using ci-install and manually running:

sudo apt-get update

sudo apt install -y expect

./po-util.sh install

P.S. Thanks for making this, it looks really useful.

Guess it’s time to start learning how to use po-util :grinning:

Can you give some argon examples. I tried the steps above but it does not seem to work. The Photon example worked great.


#103

You should make sure you are using https://github.com/nrobinson2000/po, not the older repository.

You can install it with:

bash <(curl -sL get.po-util.com)

For photon, I recommend v0.8.0-rc.14 for the Particle branch, duo for the Redbear Duo branch and no for the headers.

Also, how are you using cloud9? I’ve used it in the past but now it appears to have been bought out by Amazon and no longer uses ubuntu. I made a new workspace, and I tried to install po but it failed.

Oh wait. The old c9.io is still up.


#104

Yeh I used the old repo.

I don’t think cloud9 likes

bash <(curl -sL get.po-util.com)

oh. I will just try the new repo above.

Cloud9 now needs a credit card just to try it. Is that still the same?


#105

Here are the steps to get (the old) c9.io working for argon:

sudo rm -rf /.dockerenv
sudo rm -rf ~/.nvm
bash <(curl -sL get.po-util.com) # Press enter at the prompt
# For the config options (separate lines) do: v0.8.0-rc.27 duo no
# Wait for the installer to finish
po config v0.8.0-rc.27
po setup-mesh # This is when the c9 drive literally ran out of space
cd ~/workspace
po argon init .

EDIT:
Running this caused the c9.io workspace (2gb) to overfill.

The extra mesh dependencies are simply too large for c9.


#106

I have a premium account so will see if it works for me.


#107

Ok. The commands above should work.


#108

Why are these important. They remove the docker and node virtual manager??


#109

Yeah, deleting .dockerenv makes po-util treat c9 like a normal ubuntu system which is what we want for c9.

Deleting nvm (node version manager) makes c9 use the version of node po-util installs in order to install particle-cli successfully.


#110

Over the last few years it would have been nice to know that little trick.

P.S. I thought I was good at bash programming, but you are at a totally different level. This stuff is amazing.


#111

So that was amazing.

Built the workspace-argon.bin file and used 3Gb of disk space.

I will try this on my laptop which should let me flash the code.

Thanks @nrobinson2000. Today was a very good day.


#112

Sorry, the Disk was 2gb, the memory was 500mb. 2gb was not enough disk space.

po should install much more easily on ubuntu running on your laptop.

This is all you should need:

bash <(curl -sL get.po-util.com) # Press enter at the prompt
# For the config options (separate lines) do: v0.8.0-rc.27 duo no
# Wait for the installer to finish
po config v0.8.0-rc.27
po setup-mesh

EDIT:
Sorry for any confusion I really need to update the documentation. :wink:

If you need direct support again I’d recommend trying the gitter.im chatroom or sending me a PM. This thread is getting long.


#113

Particle released Device OS v1.0.0 today. I just wanted to mention that it is supported in po-util.

To get v1.0.0 all you need to do is:

po update
po config v1.0.0