Difference between revisions of "Firmware Upgrade"

From IPRE Wiki
Jump to: navigation, search
(Stand-alone Upgrader)
 
(38 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This page details the upgrade.py program for upgrading the Fluke and Scribbler/Scribbler2 firmware over Bluetooth.
+
This page details how to upgrade the Fluke and Scribbler and Scribbler2 robots to use the latest Myro firmware, over Bluetooth.  
  
# Download [http://svn.cs.brynmawr.edu/viewvc/Myro/trunk/Upgrade/upgrade.py?view=co upgrade.py] and save to a known location.
+
= Calico =
# Double-click on the file, or:
+
## Open a console/terminal window.
+
## Type:
+
##* python upgrade.py fluke
+
##* python upgrade.py scribbler
+
  
= Options =
+
# Start Calico
 +
# Switch to the Shell, using the Python language
 +
# Import upgrade and use it:
 +
  python> from firmwareupgrade import upgrade
 +
  python> upgrade("fluke")
 +
  python> upgrade("scribbler")
 +
 
 +
There are other, more advanced, functions for upgrading from a file, etc. See the code in Calico/languages/Python/modules/upgradefirmware/ folder.
 +
 
 +
= Stand-alone Upgrader =
 +
 
 +
This section details the upgrade.py program for upgrading the Fluke and Scribbler and Scribbler2 robots. The program starts up a graphical user interface by default (if available), but it can also be used as a command line program (see below for options).
 +
 
 +
This program requires that you have a version of regular [http://python.org Python] installed on your system (Calico Python won't work) ([[http://www.youtube.com/watch?v=anDLKu2a49g video: installing Python on Windows Machine]]). You also need to have [http://pyserial.sourceforge.net/ pySerial] installed ([[http://www.youtube.com/watch?v=76p7LhryMhw video: installing pyserial on windows machine]]).
 +
 
 +
# Download [[Media:pyserial.zip]] and place the pyserial\pyserial-2.6\serial folder in the C:\Python*\Lib\ folder.
 +
# Download [http://svn.cs.brynmawr.edu/Myro/trunk/Upgrade/upgrade.py?view=co upgrade.py] and save to a known location.
 +
# Double-click on the file (or use the Command Line Option, below) [[http://www.youtube.com/watch?v=yTUMIXI8pcE video: installing and using the Firmware upgrade tool under windows]]
 +
 
 +
'''NOTE''': you may have to kill the upgrade program via the Task Manager to get it to release the serial port. Otherwise, Myro won't be able to connect onto the serial port.
 +
 
 +
If you have a Fluke purchased before September 2011, you will need to upgrade the Fluke first:
 +
 
 +
# Select the Fluke option
 +
# On Windows, enter the com port (eg, COM8); on Mac/Linux enter the device path (eg, /dev/tty.scribbler or /dev/rfcomm0)
 +
# Click on the Upgrade button
 +
 
 +
After upgrading the Fluke, you can then upgrade the Scribbler.
 +
 
 +
# Select the Scribbler option
 +
# On Windows, enter the com port (eg, COM8); on Mac/Linux enter the device path (eg, /dev/tty.scribbler or /dev/rfcomm0)
 +
# Click on the Upgrade button
 +
 
 +
= Troubleshooting Problems =
 +
* Windows:
 +
** Problem: When I double click on the upgrade.py file, I see a black window flash open and then close and nothing happens.
 +
*** Path to a solution: From the start menu, choose run, and then type cmd and say OK. The black window will open. Now you need to navigate to the folder that has your upgrade.py file in it. Suppose you're in C:\Documents and Settings and your upgrade.py is in D:\foo\bar\  First, type d: (and hit enter) in the black window to change to your d drive. Then using the cd (change directory command) change to the folder where your upgrade.py is e.g. '''cd \foo\bar'''  and hit enter. Now, typing upgrade.py (and enter) will let you see the error message. Hopefully when you see the error message you can figure out what you need to do!
 +
 
 +
= Graphical User Interface =
 +
 
 +
[[Image:upgrader_image.jpg|thumb|300px|Stand alone upgrade tool]]
 +
 
 +
To use the upgrader, indicate what you want to upgrade (Fluke or Scribbler) by selecting the appropriate radio button. (Default: Scribbler).
 +
 
 +
Then, type in the name of your bluetooth serial port, such as "COM4" or "/dev/tty.scribbler" (without quotes).
 +
 
 +
Make sure you are connected to the Internet so that the tool can download the latest firmware.
 +
 
 +
Finally, press the "Upgrade" button.
 +
 
 +
<br clear="all" />
 +
 
 +
= Command Line Options =
 +
 
 +
After downloading, to use the command line options of the upgrade.py program:
 +
 
 +
# Open a console/terminal window.
 +
# cd to the known location
 +
# Enter at the console prompt:
 +
#* python upgrade.py
  
 
<pre>
 
<pre>
Line 14: Line 68:
 
----------------------------------------------
 
----------------------------------------------
 
Usage:
 
Usage:
   python upgrade.py --url=URL --port=PORT WHAT
+
   python upgrade.py --gui=VALUE --url=URL --port=PORT WHAT
  
     URL - (optional) is an internat address to use
+
    VALUE - is True OR False
     PORT - (optional) is the serial port address to use
+
     URL - is an internat address to use
 +
     PORT - is the serial port address to use
 
     WHAT - is scribbler OR fluke
 
     WHAT - is scribbler OR fluke
  
Examples:
+
Options with examples:
 +
  --gui=False                      (optional)
 +
  --port=COM8                      (optional)
 +
  --url=http://myurl.com/fluke.bin (optional)
 +
  --help
  
 +
Full Examples:
 +
 +
  python upgrade.py
 
   python upgrade.py fluke
 
   python upgrade.py fluke
 
   python upgrade.py scribbler
 
   python upgrade.py scribbler
 +
  python upgrade.py --gui=False
 
   python upgrade.py --port=COM5 fluke
 
   python upgrade.py --port=COM5 fluke
 
   python upgrade.py --port=/dev/rfcomm3 scribbler
 
   python upgrade.py --port=/dev/rfcomm3 scribbler
Line 29: Line 92:
 
   python upgrade.py --help
 
   python upgrade.py --help
 
</pre>
 
</pre>
 +
 +
= Troubleshooting =
 +
 +
It is a good idea to turn the Fluke and Scribbler off and then back on after each upgrade.
 +
 +
When the Scribbler is upgraded, it will play 5 notes quickly when you first turn it on or reboot it.

Latest revision as of 19:34, 24 January 2014

This page details how to upgrade the Fluke and Scribbler and Scribbler2 robots to use the latest Myro firmware, over Bluetooth.

Calico

  1. Start Calico
  2. Switch to the Shell, using the Python language
  3. Import upgrade and use it:
  python> from firmwareupgrade import upgrade
  python> upgrade("fluke")
  python> upgrade("scribbler")

There are other, more advanced, functions for upgrading from a file, etc. See the code in Calico/languages/Python/modules/upgradefirmware/ folder.

Stand-alone Upgrader

This section details the upgrade.py program for upgrading the Fluke and Scribbler and Scribbler2 robots. The program starts up a graphical user interface by default (if available), but it can also be used as a command line program (see below for options).

This program requires that you have a version of regular Python installed on your system (Calico Python won't work) ([video: installing Python on Windows Machine]). You also need to have pySerial installed ([video: installing pyserial on windows machine]).

  1. Download Media:pyserial.zip and place the pyserial\pyserial-2.6\serial folder in the C:\Python*\Lib\ folder.
  2. Download upgrade.py and save to a known location.
  3. Double-click on the file (or use the Command Line Option, below) [video: installing and using the Firmware upgrade tool under windows]

NOTE: you may have to kill the upgrade program via the Task Manager to get it to release the serial port. Otherwise, Myro won't be able to connect onto the serial port.

If you have a Fluke purchased before September 2011, you will need to upgrade the Fluke first:

  1. Select the Fluke option
  2. On Windows, enter the com port (eg, COM8); on Mac/Linux enter the device path (eg, /dev/tty.scribbler or /dev/rfcomm0)
  3. Click on the Upgrade button

After upgrading the Fluke, you can then upgrade the Scribbler.

  1. Select the Scribbler option
  2. On Windows, enter the com port (eg, COM8); on Mac/Linux enter the device path (eg, /dev/tty.scribbler or /dev/rfcomm0)
  3. Click on the Upgrade button

Troubleshooting Problems

  • Windows:
    • Problem: When I double click on the upgrade.py file, I see a black window flash open and then close and nothing happens.
      • Path to a solution: From the start menu, choose run, and then type cmd and say OK. The black window will open. Now you need to navigate to the folder that has your upgrade.py file in it. Suppose you're in C:\Documents and Settings and your upgrade.py is in D:\foo\bar\ First, type d: (and hit enter) in the black window to change to your d drive. Then using the cd (change directory command) change to the folder where your upgrade.py is e.g. cd \foo\bar and hit enter. Now, typing upgrade.py (and enter) will let you see the error message. Hopefully when you see the error message you can figure out what you need to do!

Graphical User Interface

Stand alone upgrade tool

To use the upgrader, indicate what you want to upgrade (Fluke or Scribbler) by selecting the appropriate radio button. (Default: Scribbler).

Then, type in the name of your bluetooth serial port, such as "COM4" or "/dev/tty.scribbler" (without quotes).

Make sure you are connected to the Internet so that the tool can download the latest firmware.

Finally, press the "Upgrade" button.


Command Line Options

After downloading, to use the command line options of the upgrade.py program:

  1. Open a console/terminal window.
  2. cd to the known location
  3. Enter at the console prompt:
    • python upgrade.py
Fluke and Scribbler/Scribbler2 Upgrade Program
----------------------------------------------
Usage:
   python upgrade.py --gui=VALUE --url=URL --port=PORT WHAT

     VALUE - is True OR False
     URL - is an internat address to use
     PORT - is the serial port address to use
     WHAT - is scribbler OR fluke

Options with examples:
  --gui=False                      (optional)
  --port=COM8                      (optional)
  --url=http://myurl.com/fluke.bin (optional)
  --help

Full Examples:

   python upgrade.py
   python upgrade.py fluke
   python upgrade.py scribbler
   python upgrade.py --gui=False
   python upgrade.py --port=COM5 fluke
   python upgrade.py --port=/dev/rfcomm3 scribbler
   python upgrade.py --url=http://myurl.com/file.bin fluke
   python upgrade.py --help

Troubleshooting

It is a good idea to turn the Fluke and Scribbler off and then back on after each upgrade.

When the Scribbler is upgraded, it will play 5 notes quickly when you first turn it on or reboot it.