Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to install 1.5.3 release on Arduino #334

Open
Soupalognon opened this issue Sep 24, 2023 · 2 comments
Open

Impossible to install 1.5.3 release on Arduino #334

Soupalognon opened this issue Sep 24, 2023 · 2 comments

Comments

@Soupalognon
Copy link

When you try to install release 1.5.3 on Arduino by doing:

  1. Go to Preferences --> add URL
    https://raw.githubusercontent.com/ROBOTIS-GIT/OpenCR/master/arduino/opencr_release/package_opencr_index.json

  2. Go to Tools-->Board Manager
    Install OpenCR 1.5.3

It never installs, error code :
"Stream is not in the BZip2 format"

@Roboteer1000
Copy link

For Windows 11, I have found a work around by copying the needed OpenCR folders and files into the Arduino OpenCR folder on C: drive (which is hidden and so you'll need Administrator privilege) which is listed below:

C:\Users\UserName\AppData\Local\Arduino15\packages\OpenCR\hardware\OpenCR\1.5.3
(where UserName is your Windows Login name).

The folders and files, to be copied from, can be found in the OpenCR-1.5.3.zip file (downloaded from this GitHub), and they are in this folder:

D:\OpenCR-1.5.3.zip\OpenCR-1.5.3\arduino\opencr_arduino\opencr\

They are 4 folders named: "bootloaders", "cores", "libraries", and "variants"
and 5 files: ".gitignore", "boards.txt", "keywords.txt", "platform.txt" and "programmers.txt".

Once this copying is done, you can use Arduino IDE as "normal", I have checked this procedure with Arduino IDE 1.8.19 and 2.3.2. However when you want to "Check Info" on this board, Arduino will say "Unknown Board", but it will list the VID and PID numbers. Sketches for the OpenCR compiled, downloaded and executed fine on the OpenCR v.1.5.3 now.

@eric58000
Copy link

eric58000 commented Oct 28, 2024


  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants