Bhy2_host_ble_supported

I am using a Nicla Sense board and would like to use the bhy2_host to connect via BLE, but I noticed that only the Portenta H7 and MKRWIFI1010 are supported. What changes are required to support other boards like the Nano 33 IoT or Nano 33 BLE Sense?

Other than the physical form factor of the board not allowing plugging the Arduino Nicla Sense ME directly into the headers, I can't see any reason why the compatibility with the Nano 33 IoT would not be just the same as for the MKR WiFi 1010, since these boards both use the same primary ATSAMD21G18 microcontroller, u-blox NINA-W102 Wi-Fi radio module, and "ArduinoBLE" library.

The Nano 33 BLE Sense is definitely a significantly different board from the officially supported Portenta H7 and MKR WiFi 1010, but it still uses the "ArduinoBLE" library, so it could work.

If you already have either of these boards on hand, I would just give it a try:

  1. Select File > Preferences from the Arduino IDE menus.
  2. Check the box next to "Show verbose output during: ☐ compilation".
  3. Click the OK button.
  4. Open any sketch that uses the "Arduino_BHY2Host" library.
  5. Select Sketch > Verify/Compile from the Arduino IDE menus.
  6. Wait for the compilation to finish.
  7. Check the contents of the black output panel at the bottom of the Arduino IDE window.
    You will see a list of the library paths, which will tell you where the library is located.
    For example:
    Using library Arduino_BHY2Host at version 1.0.6 in folder: C:\Users\asdf\Documents\Arduino\libraries\Arduino_BHY2Host
    
  8. Opening the library file at src/Arduino_BHY2Host.h under that path using a text editor.
  9. Change this line:
    #if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_SAMD_MKRWIFI1010)
    
    to this:
    #if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_ARDUINO_NANO33BLE)
    
  10. Save the file.
  11. Upload the sketch to your Arduino board.
1 Like

Thanks, I had just tried that with the Nano 33 IoT and can verify that it did work.

I'll need to try the Nano 33 BLE Sense later.

You are welcome. I'm glad the Nano 33 IoT is working!

I just tried the Nano 33 BLE Sense and that works also.

One thing that I tried that did not work was BSEC over BLE. I tried both new and legacy addresses.

I just get zero values. When I tried Standalone mode, I had to use the legacy address to get it to work.

What's different in this case is that BSEC over BLE is not working for the Portenta either.

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