Issue with installing OpenCR board onto Arduino 1.8.19 and 2.3.2

Issue: Install issue for OpenCR with Arduino on Windows 11

PROVIDE A THOUROUGH DESCRIPTION OF YOUR ISSUE, THE MORE DETAIL YOU PROVIDE THE EASIER IT WILL BE FOR THE COMMUNITY TO PROVIDE YOU ASSISTANCE

@willson and @Jonathon

OpenCR-1, Using Arduino 1.8.19 on Windows 11.

Following the board install instruction (V. 1.5.3) from this link was OK:

However, in the middle of the installation, ARDUINO IDE gave a Java Error as shown below:

Stream is not in the BZip2 format
java.lang.RuntimeException: java.io.IOException: Stream is not in the BZip2 format
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:179)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Stream is not in the BZip2 format
at org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream.init(BZip2CompressorInputStream.java:240)
at org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream.(BZip2CompressorInputStream.java:132)
at org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream.(BZip2CompressorInputStream.java:109)
at cc.arduino.utils.ArchiveExtractor.extract(ArchiveExtractor.java:97)
at cc.arduino.utils.ArchiveExtractor.extract(ArchiveExtractor.java:82)
at cc.arduino.contributions.packages.ContributionInstaller.install(ContributionInstaller.java:158)
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onInstallPressed$2(ContributionManagerUI.java:172)
… 1 more
Could not find boards.txt in C:\Users\UserName\AppData\Local\Arduino15\packages\OpenCR\hardware\OpenCR\1.5.3. Is it pre-1.5?

And when I checked deeper inside the above AppData folder, I found that no OpenCR files were copied into it.

image

So, I had to copy manually those files from the GITHUB OpenCR ZIP file into the appropriate folder. After that I can make Arduino work fine with Arduino 1.8.19 and Arduino 2.3.2. However, it will see the OpenCR board as “unknown”:

image

But my existing code using the Dynamixel2Arduino library works fine as before.

image

DYNAMIXEL Servo:

LIST ALL DYNAMIXEL SERVOS USED IN THIS PROJECT

XL-430

DYNAMIXEL Controller:

LIST ALL DYNAMIXEL CONTROLLERS USED IN THIS PROJECT

OpenCR-1

Software Interface:

LIST ALL SOFTWARE INTERFACES USED IN THIS PROJECT

Arduino 1.8.19 and Arduino 2.3.2


SOLUTION FOR UBUNTU (works with version 1.5.3)


General Explanation:

The file opencr.tar.bz2 is not compressed with bzip2 but with gzip (https://github.com/ROBOTIS-GIT/OpenCR/releases/download/1.5.3/opencr.tar.bz2).

Problem Resolution Strategy:

Create a local copy on an HTTP server, like LAMP, of the following file:
https://raw.githubusercontent.com/ROBOTIS-GIT/OpenCR/master/arduino/opencr_release/package_opencr_index.json
and replace the opencr.tar.bz2 archive with a true bzip2-compressed version!
Remember to modify/recalculate the checksum with sha256sum and update the byte length of opencr.tar.bz2 in the JSON file!

Detailed Explanation:

Install the LAMP HTTP server:

sudo apt update
sudo apt install apache2 php libapache2-mod-php mysql-server php-mysql

In /var/www/html, get the main folder of the Git project https://github.com/ROBOTIS-GIT/OpenCR:

cd /var/www/html
sudo git clone https://github.com/ROBOTIS-GIT/OpenCR

Install Arduino software 1.8.19:
Download “Linux 64 bits” in “Legacy IDE (1.8.X)”: https://www.arduino.cc/en/software

In Arduino software 1.8.19, replace the URL in “File/Preferences/Additional Boards Manager URLs” with the following local URL:
http://localhost/OpenCR/arduino/opencr_release/package_opencr_index.json

In this previous JSON file, the file (https://github.com/ROBOTIS-GIT/OpenCR/releases/download/1.5.3/opencr.tar.bz2) is not in bzip2 format!

Download https://github.com/ROBOTIS-GIT/OpenCR/releases/download/1.5.3/opencr.tar.bz2.

Decompress with gzip:

tar xvzf opencr.tar.bz2

Recompress with bzip2:

tar cjf opencr.tar.bz2 opencr

Recalculate the checksum:

sha256sum opencr.tar.bz2
ccc4f702f0e5306d1ec5f8bf6b9a88bf67c190b7c4222e35dc9bfccd6cd35731  opencr.tar.bz2

The exact size of opencr.tar.bz2 is 2022887 bytes.

Copy the new opencr.tar.bz2 file to the local website:

sudo cp opencr.tar.bz2 /var/www/html/OpenCR/arduino/opencr_release

Update the JSON content using an editor like Geany, for example:

sudo geany /var/www/html/OpenCR/arduino/opencr_release/package_opencr_index.json

In this JSON file, replace the section:

{
  "name": "OpenCR",
  "architecture": "OpenCR",
  "version": "1.5.3",
  "category": "Arduino",
  "help": {
    "online": "https://github.com/ROBOTIS-GIT/OpenCR"
  },
  "url": "https://github.com/ROBOTIS-GIT/OpenCR/releases/download/1.5.3/opencr.tar.bz2",
  "archiveFileName": "opencr.tar.bz2",
  "checksum": "SHA-256:418656e5e6d99d45d187ffdb28dece0f450c6707da3f6db56769f3ecafdc413c",
  "size": "2690860",
  "help": {
    "online": "http://emanual.robotis.com/docs/en/parts/controller/opencr10/"
  },
  "boards": [
    {"name": "OpenCR"}
  ],
  "toolsDependencies": [
    {
      "packager": "OpenCR",
      "name": "opencr_gcc",
      "version": "5.4.0-2016q2"
    },
    {
      "packager": "OpenCR",
      "name": "opencr_tools",
      "version": "1.0.0"
    }
  ]
}

With:

{
  "name": "OpenCR",
  "architecture": "OpenCR",
  "version": "1.5.3",
  "category": "Arduino",
  "help": {
    "online": "https://github.com/ROBOTIS-GIT/OpenCR"
  },
  "url": "http://localhost/OpenCR/arduino/opencr_release/opencr.tar.bz2",
  "archiveFileName": "opencr.tar.bz2",
  "checksum": "SHA-256:ccc4f702f0e5306d1ec5f8bf6b9a88bf67c190b7c4222e35dc9bfccd6cd35731",
  "size": "2022887",
  "help": {
    "online": "http://emanual.robotis.com/docs/en/parts/controller/opencr10/"
  },
  "boards": [
    {"name": "OpenCR"}
  ],
  "toolsDependencies": [
    {
      "packager": "OpenCR",
      "name": "opencr_gcc",
      "version": "5.4.0-2016q2"
    },
    {
      "packager": "OpenCR",
      "name": "opencr_tools",
      "version": "1.0.0"
    }
  ]
}

Then retest the installation of version 1.5.3 of the OpenCR board!

Tools/Board/Boards Manager…/Filter your search => OpenCR / choose version 1.5.3.

Everything should be OK.

Hi @eric58000
Thank you very much for the detailed solution. I am forwarding this to @Jonathon and @Jason to see if Robotis can have this fixed officially.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.