Appendix VI: Updater File Structure¶
As we discussed in the Firmware Management section, Updater is our new tool updating and recovering your Brainstem modules. After playing around with it a bit you might of noticed that it keeps a history of all the devices it interacts with. In the following appendix I will be explaining the file structure Updater creates on your in or to make things easier on you.
Locating Updater’s files on your machine¶
Updater stores all its files in your home directory under a hidden folder named “.acroname”. In Mac if you would like to find this directory you can open up your terminal window and type the following.
$> cd ~/ #Change to your home directory $> ls -a #List files, including hidden files
Now lets enter the folder and look around.
$> cd ~/.acroname/updater
You may have noticed that I skipped over a directory and went straight to the updater folder. Currently there are not any other files/folders in this folder; however, feel free to explore around.
Lets have a look at what is in the updater folder.
$> ls -lah #List files, including hidden files and permissions
total 0 drwxr-xr-x 7 Mitch staff 238B Dec 4 10:34 . drwxr-xr-x 3 Mitch staff 102B Nov 30 11:08 .. -rw-r--r-- 1 Mitch staff 0B Nov 30 11:10 .history drwxr-xr-x 5 Mitch staff 170B Dec 2 11:40 3797E6F8 drwxr-xr-x 4 Mitch staff 136B Dec 4 10:34 66F4859B drwxr-xr-x 5 Mitch staff 170B Dec 2 11:38 71E3928C drwxr-xr-x 4 Mitch staff 136B Nov 30 11:08 856C1C03
Exploring the Updater files¶
Now that we have made it into the Updater file structure lets discuss what we see here. In the example above you will notice that there are 7 items.
- “.” - Standard directory structure: Current directory
- “..” - Standard directory structure: Parent directory
- “.history” - System level history (not current implemented).
The remaining four items are all devices (serial numbers) that the Updater utility has connected too previously.
Exploring the Updater Device files¶
Lets look into device/directory 66F4859B
$> cd 66F4859B $> ls -lah #List files, including hidden files and permissions
total 344 drwxr-xr-x 7 Mitch staff 238B Dec 4 10:58 . drwxr-xr-x 7 Mitch staff 238B Dec 4 11:00 .. -rw-r--r-- 1 Mitch staff 1.6K Dec 4 10:58 .history -rw-r--r-- 1 Mitch staff 228B Dec 4 10:58 .settings -rw-r--r-- 1 Mitch staff 53K Dec 4 10:58 130702287.bird -rw-r--r-- 1 Mitch staff 52K Dec 4 10:56 75203177.bird -rw-r--r-- 1 Mitch staff 52K Dec 4 10:57 99528558.bird
You will notice a similar layout from the previous example, but there are a few new items we will dig into. It is important to remember that we are now inside a folder for a specific device. Thus all the items in this folder are related to that device only.
As you would imagine the “.history” file includes a history of the device and all the actions we have preformed on it from within Updater. By default Updater will include basic information; however, you can also add your own messages to the history file by using the “-l” parameter. Please see “Using Updater via CLI” for more information. You may also choose to update this file manually. Lets take a look at the “.history” file.
$> vi .history
2015:12:04:17:34:52 | Created device entry 2015:12:04:17:50:56 | 66F4859B 00 02 04 [USBStem ] 2.1.5 2015:12:04:17:51:48 | 66F4859B 00 02 04 [USBStem ] 2.1.5 2015:12:04:17:56:36 | Current settings: 2015:12:04:17:56:36 | Serial#:[66F4859B, 1727301019] 2015:12:04:17:56:36 | Module#: 2015:12:04:17:56:36 | Model#:[04, USBStem] 2015:12:04:17:56:36 | Firmware Version: 2.1.5 2015:12:04:17:56:36 | Updating device from BIRD file: [/Users/Mitch/.acroname/updater/ 66F4859B/75203177.bird] 2015:12:04:17:56:37 | Update successful. Transferred 3 blocks, 57664 total bytes 2015:12:04:17:56:50 | 66F4859B 00 06 04 [USBStem ] 2.1.3 2015:12:04:17:57:39 | Current settings: 2015:12:04:17:57:39 | Serial#:[66F4859B, 1727301019] 2015:12:04:17:57:39 | Module#: 2015:12:04:17:57:39 | Model#:[04, USBStem] 2015:12:04:17:57:39 | Firmware Version: 2.1.3 2015:12:04:17:57:39 | Updating device from BIRD file: [/Users/Mitch/.acroname/updater/ 66F4859B/99528558.bird] 2015:12:04:17:57:42 | Update successful. Transferred 3 blocks, 57844 total bytes 2015:12:04:17:57:52 | 66F4859B 00 02 04 [USBStem ] 2.1.4 2015:12:04:17:58:03 | Current settings: 2015:12:04:17:58:03 | Serial#:[66F4859B, 1727301019] 2015:12:04:17:58:03 | Module#: 2015:12:04:17:58:03 | Model#:[04, USBStem] 2015:12:04:17:58:03 | Firmware Version: 2.1.4 2015:12:04:17:58:03 | Updating device from BIRD file: [/Users/Mitch/.acroname/updater/ 66F4859B/130702287.bird] 2015:12:04:17:58:05 | Update successful. Transferred 3 blocks, 59292 total bytes 2015:12:04:17:58:12 | 66F4859B 00 02 04 [USBStem ] 2.1.5
Just like the “.history” file the “.settings” file is also self explanatory. Here Updater information in which it needs to communication with the brainstem module. Although you have read/write access to this file it is recommended that you do not make any changes to this file. Lets take a look at what type of information is stored in the “.settings” file.
$> vi .history
FIRMWARE= 2.1.5 LAST_TRANSFER_DATE=Fri Dec 4 10:58:05 2015 LAST_TRANSFER_VERSION=/Users/Mitch/.acroname/updater/66F4859B/130702287.bird LINK_TYPE=USB MODEL_NUMBER=4 MODULE_NAME=USBStem MODULE_NUMBER=2 SERIAL_NUMBER=0x66F4859B
The remaining 4 items from the device files listed above are called “.bird” files. This is the file type in which we store our firmware. For this particular device I have updated the firmware 3 times and thus have 3 “.bird” files stored under this device. This can be very handy if you would like to return to a previous firmware. See “Example: Reverting to a Previous Version” in the “BrainStem Firmware Management” section.