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

It looks like you have multiple versions of po-util installed.

Please delete the non macOS version.

What do type po and which po say?

Here’s what happened? I removed redbear duo to see if po util works.

second I

particle device add 1c005200xxxxxxxx
Claiming device 1c0052000xxxxxxxxxx
Failed to claim device, server said: Device is not connected

Next I copied this to make new redbear duo.

dfu-util -d 2b04:d058 -a 0 -s 0x8008000 -D fac-dct-r1.bin
dfu-util -d 2b04:d058 -a 0 -s 0x08020000 -D duo-system-part1.bin
dfu-util -d 2b04:d058 -a 0 -s 0x08040000 -D duo-system-part2.bin
dfu-util -d 2b04:d058 -a 2 -s 0x140000 -D duo-fac-tinker.bin
dfu-util -d 2b04:d058 -a 2 -s 0x180000 -D duo-wifi-r1.bin
particle keys doctor 1c00520009xxxxxx

I installed the whole thing po-utils.
ruby -e β€œ$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

c$ ruby -e β€œ$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
==> This script will install:

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown imac /Library/Caches/Homebrew
==> Downloading and installing Homebrew…
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
HEAD is now at 13576111 Merge pull request #2822 from ilovezfs/software_spec-recursive-reqs
Updated 1 tap (nrobinson2000/po).
==> Cleaning up /Library/Caches/Homebrew…
==> Migrating /Library/Caches/Homebrew to /Users/imac/Library/Caches/Homebrew…
==> Deleting /Library/Caches/Homebrew…
==> Updated Formulae
nrobinson2000/po/po :heavy_check_mark:
==> Installation successful!

==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:

==> Next steps:

  • Run brew help to get started
  • Further documentation:

po init duo

Directory is already Initialized!

I’ve tried almost everything. is there something I’m missing?

how do I delete the non macOS version?

What do type po and which po say? It should help you locate the linux version if it is installed.

$ po
__ __ __
/ | / |/ |
______ ______ __ __ β–ˆβ–ˆ | β–ˆβ–ˆ/ β–ˆβ–ˆ |
/ \ / \ ______ / | / |/ β–ˆβ–ˆ | / |β–ˆβ–ˆ |
/β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ |/β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ |/ |β–ˆβ–ˆ | β–ˆβ–ˆ |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/ β–ˆβ–ˆ |β–ˆβ–ˆ |
β–ˆβ–ˆ | β–ˆβ–ˆ |β–ˆβ–ˆ | β–ˆβ–ˆ |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/ β–ˆβ–ˆ | β–ˆβ–ˆ | β–ˆβ–ˆ | __ β–ˆβ–ˆ |β–ˆβ–ˆ |
β–ˆβ–ˆ |__β–ˆβ–ˆ |β–ˆβ–ˆ __β–ˆβ–ˆ | β–ˆβ–ˆ __β–ˆβ–ˆ | β–ˆβ–ˆ |/ |β–ˆβ–ˆ |β–ˆβ–ˆ |
β–ˆβ–ˆ β–ˆβ–ˆ/ β–ˆβ–ˆ β–ˆβ–ˆ/ β–ˆβ–ˆ β–ˆβ–ˆ/ β–ˆβ–ˆ β–ˆβ–ˆ/ β–ˆβ–ˆ |β–ˆβ–ˆ |
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/ β–ˆβ–ˆβ–ˆβ–ˆ/ β–ˆβ–ˆ/ β–ˆβ–ˆ/
β–ˆβ–ˆ |
β–ˆβ–ˆ |
β–ˆβ–ˆ/ https://po-util.com

Copyright (GPL) 2017 Nathan D. Robinson

       po DFU_COMMAND
       po install [full_install_path]
       po library LIBRARY_COMMAND

Run "man po" for help.

Can you run:

$ type po


$ which po

$ type po
po is aliased to `~/po-util.sh’

$ which po


Can you delete ~/po-util.sh and remove the alias in your .bashrc?

I fixed the problem linux was having with building for duo.

Could you make something cool for Po-Util?

Okay, I hold and press reset and mode. Yellow light flash. I plug in duo, core, etc on Raspberry Pi OS USB.
Make very quick boot splash

I USB plug in Duo. Progress bar should show up. Please wait… Upgrading & Fixing DFU errors on Duo.
No mouse & keyboard typing needed.

                                          __      __  __
                                                /  |    /  |/  |
          ______    ______           __    __  _β–ˆβ–ˆ |_   β–ˆβ–ˆ/ β–ˆβ–ˆ |
         /      \  /      \  ______ /  |  /  |/ β–ˆβ–ˆ   |  /  |β–ˆβ–ˆ |
        /β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  |/β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ  |/      |β–ˆβ–ˆ |  β–ˆβ–ˆ |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/   β–ˆβ–ˆ |β–ˆβ–ˆ |
        β–ˆβ–ˆ |  β–ˆβ–ˆ |β–ˆβ–ˆ |  β–ˆβ–ˆ |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/ β–ˆβ–ˆ |  β–ˆβ–ˆ |  β–ˆβ–ˆ | __ β–ˆβ–ˆ |β–ˆβ–ˆ |
        β–ˆβ–ˆ |__β–ˆβ–ˆ |β–ˆβ–ˆ \__β–ˆβ–ˆ |        β–ˆβ–ˆ \__β–ˆβ–ˆ |  β–ˆβ–ˆ |/  |β–ˆβ–ˆ |β–ˆβ–ˆ |
        β–ˆβ–ˆ    β–ˆβ–ˆ/ β–ˆβ–ˆ    β–ˆβ–ˆ/         β–ˆβ–ˆ    β–ˆβ–ˆ/   β–ˆβ–ˆ  β–ˆβ–ˆ/ β–ˆβ–ˆ |β–ˆβ–ˆ |
        β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/           β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ/     β–ˆβ–ˆβ–ˆβ–ˆ/  β–ˆβ–ˆ/ β–ˆβ–ˆ/
        β–ˆβ–ˆ |
        β–ˆβ–ˆ |
        β–ˆβ–ˆ/             |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ         | 70% 

100% complete show up done. You may unplug USB. Unplug show screensaver or kitchen dashboard(weather, clock). If user plug in Arduino Uno or Adafruit. It should show. Sorry, not compatible.

| POS | β€”> | Damaged or errors on Particle, Pi, duo, etc |
Boom all fixed.

Could you explain what you are looking for po-util to do more clearly? I understand that you would like a progress bar but I’m not sure what else.

When using po duo flash, po dfu-open is used to put the device into dfu mode for you.

2017-6-27: UPDATE

###Introducing the bash completion beta!
You can now press tab (twice) while typing any po-util argument to have it automatically completed. Please contact me if I forgot any completions, as this is a beta.

Please update po-util and reinstall to get the bash completion.

2017-7-9: UPDATE

The bash completion is now stable!

I’ve ironed out some bugs I was having with the bash completion on macOS.

I’ve also added CONTRIBUTING.md and a Code of Conduct to po-util.

I’d also like to announce that I am offering my bash skills to anyone on the community who needs them.

2017-7-12: UPDATE

I’ve made a bunch of updates to po-util. Please run:

$ po update 
$ po install

to get them.

Added 3 libs with new feature: Now I have …

bash-3.2$ cat libs.txt 
https://github.com/grovelabs/Spark-Adafruit-PCA9685.git Spark-Adafruit-PCA9685
https://github.com/blynkkk/blynk-library.git blynk-library
https://github.com/dwcares/debounce.git debounce

But when I do po photon build, I get

make[2]: *** No rule to make target `/Users/AndrewWard/Documents/AW_HW_SW_Projects/PWM_Test/firmware/blynk-library/*.cpp', 
needed by `../build/target/user/platform-6-m/firmware/blynk-library/*.o'.  Stop.
make[1]: *** [user] Error 2
make: *** [modules/photon/user-part] Error 2

Any suggestions on how to get the blynk library to build?

Hi @awardblvr,

Please update po-util with:

po update

And then use the blynk library optimized for po-util:

po lib rm blynk-library
po lib purge blink-library
po lib get https://github.com/nrobinson2000/blynk
po lib add blynk

2017-7-29: UPDATE

I have found a method for Linux to open devices on the default baud rate of 14400 to put them into DFU mode. No more 19200 baud workaround!

Also, po-util now installs all of its dependencies and components in ~/.po-util to stay more organized. Below are the instructions to remove the old components and update po-util on macOS and Linux:

$ cd ~/github
$ rm -rf particle pi redbearduo dfu-util
$ rm -f ~/.po
$ rm -rf ~/bin/gcc-arm-embedded #Linux Only
$ sudo rm -f /usr/local/bin/arm-non-eabi* #Linux Only
$ bash <(curl -sL https://master.po-util.com/install)

I had the arduino IDE up and functional.

arduino IDE 1.8.3
I had Teensyduino 1.3.7 working too
I have the Raspberry agent installed on the latest raspbian
these worked today.

I am on RPI 3

I can still compile on the arduino IDE for teensy and other boards but the serial monitor freezes.
I installed po-utils today.

the serial monitor in the arduino IDE stops after only a few lines

pi@TELEZrpi3:~ $ type po
po is /usr/local/bin/po
pi@TELEZrpi3:~ $ which po
pi@TELEZrpi3:~ $ po list

Found the following Particle Devices:

Electron: /dev/ttyACM0

USB_Serial: /dev/ttyACM1

pi@TELEZrpi3:~ $

I wonder what happened to my serial port for serial monitor in the Arduino IDE

well did some other installs…

I am building ATOM on the rpi3…

I got the serial monitor working at 19200…for now

I will try to monitor the electron and see if that works

I did get apm and atom on my rpi3.

after a bit of flipping through


Nice. I haven’t tested po-util on raspberry pi much. Are you able to build projects?