"Unknown exception:list index out of range" when trying to upload first sketch

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
jemenake
Posts: 15
Joined: 01 Mar 2020 20:50

"Unknown exception:list index out of range" when trying to upload first sketch

Post by jemenake »

I've already programmed two Z-Unos, and I just bought two more. I cannot upload a sketch to either of them. When I try to upload something, I get the message below. It seems to be able to open the port and interact with the board enough to detect a corrupted S2 key, but then I get a "list index out of range". I get the same problem if I just try to burn a new boot-loader.

This also happens if I put it into rescue mode. Also, these Z-uno's are right out of the box. They're just sitting there running their blink sketch that they were shipped with.

Upload output follows:

Code: Select all

Openning port                            ..............................
Openning port                            ..............................                            OK

Stoping the user code                    ..............................
Stoping the user code                    ..............................                            OK

Closing port                             ..............................
Closing port                             ..............................                            OK

Openning port                            ..............................
Openning port                            ..............................                            OK
*** FOUND corrupted S2 key ***
 NEW S2 KEYS
*****
PRK: 
HEX: C0 87 FC 3A 87 A8 E5 66 32 28 57 13 B5 64 EB 13 86 56 3D C0 81 63 85 A9 CA 1D C1 3E 91 41 DD 68 
DEC:49287-64570-34728-58726-12124-24291-46420-60179-34390-15808-33123-34217-51741-49470-37185-56680
PUK: 
HEX: 24 B4 75 F6 62 95 B1 5A 2F 10 11 E5 25 A2 B1 BA B9 94 F7 6E 74 88 99 2A A0 5B 9E F9 5C 1D 2A 59 
DEC:09396-30198-25227-45402-12148-04597-09618-45498-47508-63342-29832-39210-41051-40697-23581-10841
*****


RAW Info: 
----------------------------------------------------------
                     FIRMWARE DATA                        
----------------------------------------------------------
(<type 'exceptions.IndexError'>, '<string>', 533)
 


			 ****    ****     ****      ****    ****    * 
			 *       *   *    *   *    *    *   *   *   * 
			 *       *   *    *   *    *    *   *   *   * 
			 ****    ***      ***      *    *   ***     * 
			 *       *  *     *  *     *    *   *  *      
			 ****    *   *    *   *     ****    *   *   * 



Error  0	 Unknown exception "list index out of range"

--------------------------
upload complete.
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: "Unknown exception:list index out of range" when trying to upload first sketch

Post by PoltoS »

Please make sure the prot is correctly selected and not used by any other s/w.

Do you see the port appearing correctly and disappearing on connect/disconnect?

Is it Z-Uno 2 or Z-Uno 1? Sure you have downloaded the right package for your Z-Uno?
jemenake
Posts: 15
Joined: 01 Mar 2020 20:50

Re: "Unknown exception:list index out of range" when trying to upload first sketch

Post by jemenake »

I do see the port disappearing and re-appearing when I unplug and re-plug, so I think I'm selecting the right port.

I'm not sure whether I've got Z-Unos 1 or 2 (I'm guessing these latest ones are 2), and this brings up some observations about the Z-Uno website....
  • It's not very obvious that there have been two different generations of the Z-Uno (one has to notice that there's a little drop-down box in the upper-right of some of the pages) and I also haven't encountered any page describing how to distinguish a v1 from a v2 Z-Uno.
  • There are also two different versions of the Arduino IDE. Version 1.x is just called "Arduino" (on MacOS, anyway), while version 2.x is going to be called "Arduino IDE". This is confusing because the Z-Uno instructions have titles like "Installing Z-Uno environment for Arduino IDE" (where the "IDE" part could be interpreted by people as referring to the 2.x version of the Arduino environment, but, from my experience, the URL for the Z-Uno extensions get ignored by the 2.x "Arduino IDE" tool.

Anyway, getting back to my particular problem:
  • It seems that I was using the Z-Uno 1 libraries with my Arduino compiler. I added the v2 of the Z-Uno libraries, and now I get the error message when I try to compile (not even upload):
    "Applications/Arduino.app/Contents/Java/arduino-builder returned 233"
  • I was able to upload a new boot loader to the board using the v2 Z-Uno library with the 1.8.x (so that's progress, I guess)
  • What's also puzzling is that I had already tried uploading to the board with VS Code (which, presumably only works with the v2 Z-Uno libraries) and I was getting upload errors similar to my initial post.
p0lyg0n1
Posts: 242
Joined: 04 Aug 2016 07:14

Re: "Unknown exception:list index out of range" when trying to upload first sketch

Post by p0lyg0n1 »

Hi,
You can easily determine which board you have using the following methods
1. Look at the upper left edge of the board (see the picture) - if there is a fuse on it, you have the 2nd version.
2. Under the SiLabs chip on the 2nd version there is a marking ZUno 2 rev. 6 (see picture)
3. The latest version (2.18) detects connections of the 2nd generation board to the development tools for the 1st.

We recommend using the stable version of Arduino IDE 1.8.xx for both versions of the board (we are testing on 1.8.17). The version of Arduino IDE 2 is still not a release, use it at your discretion.

VS Code already supports both versions of the board and the 1st and 2nd. Must be selected at first launch. Support for the 1st version was added relatively recently.

For the first version of the board, we recommend using the latest kernel version 2.18 (http://z-uno.z-wave.me/files/z-uno/pack ... index.json ). For the 2nd version of the board, it is better to use the latest release from the 3.9 beta repository (http://z-uno.z-wave.me/files/z-uno2/pac ... index.json ).
I recommend reinstalling the kernel files. See the attached PDF, you need to delete ALL versions associated with Z-Uno.

We are working on documentation. A drop-down list with the board version has been added for all different pages. The examples have not been completely reworked yet. Please send the code if it does not compile after reinstalling the packages ^^^. I will be glad to help you

Sincerely, Alex.
Attachments
G2Version.jpg
G2Version.jpg (453.44 KiB) Viewed 1650 times
Post Reply