Skip to content

Is the Raspberry Pi Build HAT firmware in this repository stale? #2411

@pmunts

Description

@pmunts

When I run a minimal program that just instantiates a Raspberry Pi Build HAT Brick object, I get the following failure:

Unhandled exception. System.IO.IOException: BuildHat firmware signture error
   at Iot.Device.BuildHat.Brick.GetBuildHatInformation()
   at Iot.Device.BuildHat.Brick..ctor(String port, GpioController controller, Int32 reset, Boolean shouldDispose)
   at Program.<Main>$(String[] args)
Aborted

This error happens even if the Build HAT firmware has already been loaded e.g. by the Python library. I conjecture that the firmware files included in the Iot.Device.Bindings NuGet package are incompatible with the current Raspberry Pi Build HAT boot loader. See the Build HAT firmware versions in this repository and the Python library repository at the very bottom of this issue submission.

Steps to reproduce

Build and run the following test program:

using Iot.Device.BuildHat;

var brick = new Brick("/dev/ttyAMA0");
brick.Dispose();

Expected behavior

Program runs successfully.

Actual behavior

Program fails with error message above.

Versions used

Build machine dotnet --info:

.NET SDK:
 Version:           9.0.302
 Commit:            bb2550b9af
 Workload version:  9.0.300-manifests.183aaee6
 MSBuild version:   17.14.13+65391c53b

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.26100
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\PROGRA~1\dotnet\sdk\9.0.302\

.NET workloads installed:
 [wasm-tools]
   Installation Source: VS 17.14.36301.6
   Manifest Version:    9.0.7/9.0.100
   Manifest Path:       C:\PROGRA~1\dotnet\sdk-manifests\9.0.100\microsoft.net.workload.mono.toolchain.current\9.0.7\WorkloadManifest.json
   Install Type:              Msi

Configured to use loose manifests when installing new manifests.

Host:
  Version:      9.0.7
  Architecture: x64
  Commit:       3c298d9f00

.NET SDKs installed:
  5.0.202 [C:\PROGRA~1\dotnet\sdk]
  6.0.100 [C:\PROGRA~1\dotnet\sdk]
  9.0.302 [C:\PROGRA~1\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.30 [C:\PROGRA~1\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.30 [C:\PROGRA~1\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.4 [C:\PROGRA~1\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.5 [C:\PROGRA~1\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.0 [C:\PROGRA~1\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.5 [C:\PROGRA~1\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.18 [C:\PROGRA~1\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.7 [C:\PROGRA~1\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.30 [C:\PROGRA~1\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.4 [C:\PROGRA~1\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.5 [C:\PROGRA~1\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0 [C:\PROGRA~1\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.5 [C:\PROGRA~1\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.12 [C:\PROGRA~1\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.18 [C:\PROGRA~1\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.7 [C:\PROGRA~1\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 5.0.4 [C:\PROGRA~1\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.5 [C:\PROGRA~1\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.0 [C:\PROGRA~1\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.5 [C:\PROGRA~1\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.18 [C:\PROGRA~1\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 9.0.7 [C:\PROGRA~1\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  arm64 [C:\Program Files\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\arm64\InstallLocation]
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Target machine dotnet --info:

Host:
  Version:      9.0.7
  Architecture: arm64
  Commit:       3c298d9f00
  RID:          linux-arm64

.NET SDKs installed:
  No SDKs were found.

.NET runtimes installed:
  Microsoft.NETCore.App 9.0.7 [/usr/local/lib/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/usr/local/lib/dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Package versions:

  <ItemGroup>
    <PackageReference Include="Iot.Device.Bindings" Version="4.0.1" />
  </ItemGroup>

Raspberry Pi Build HAT bootloader version:

BHBL> version
BuildHAT bootloader version 1631704133 2021-09-15T12:08:53+01:00

Build HAT firmware in the dotnet/iot repository:

~/iot/src/devices/BuildHat/data$ cat version ; md5sum -b *
1636109636
c86bb5fd7aeb34c93c774e142af2fdf3 *firmware.bin
c7529d660e16b6c3e162c33a25bdcc43 *signature.bin
c43ca26e77d995b579e8626e809e758a *version

Build HAT firmware in the Python library repository:

~/python-build-hat/buildhat/data$ cat version ; md5sum -b *
1737564117
711180af1a9c2535c2874e3104174bca *firmware.bin
12caf25acaf3fdd1046f483cb7f1957f *signature.bin
3d422c3562bbacab4fab45ff4c63a920 *version

Metadata

Metadata

Assignees

Labels

Priority:2Work that is important, but not critical for the releasebugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions