Rtl8710 and adafruit bme680 i2c hang (arduino IDE)


I am seeing i2c hang on BME680 sensor from Adafruit (Adafruit BME680 - Temperature, Humidity, Pressure and Gas Sensor [STEMMA QT] : ID 3660 : $18.95 : Adafruit Industries, Unique & fun DIY electronics and kits) , I am using relatek rtl8710AF dev board and here is sketch supplied by adafruit library (Please see at the end)

here is output on serial console

Designed specifically to work with the Adafruit BME680 Breakout
----> Adafruit BME680 - Temperature, Humidity, Pressure and Gas Sensor [STEMMA QT] : ID 3660 : $18.95 : Adafruit Industries, Unique & fun DIY electronics and kits

These sensors use I2C or SPI to communicate, 2 or 4 pins are required
to interface.

Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing products
from Adafruit!

Written by Limor Fried & Kevin Townsend for Adafruit Industries.
BSD license, all text above must be included in any redistribution

#include <Wire.h>
#include <SPI.h>
#include <Adafruit_Sensor.h>
#include “Adafruit_BME680.h”

#define BME_SCK 13
#define BME_MISO 12
#define BME_MOSI 11
#define BME_CS 10

#define SEALEVELPRESSURE_HPA (1013.25)

Adafruit_BME680 bme; // I2C
//Adafruit_BME680 bme(BME_CS); // hardware SPI
//Adafruit_BME680 bme(BME_CS, BME_MOSI, BME_MISO, BME_SCK);

void setup() {
while (!Serial);
Serial.println(F(“BME680 test”));

if (!bme.begin()) {
Serial.println(“Could not find a valid BME680 sensor, check wiring!”);
while (1);

// Set up oversampling and filter initialization
bme.setGasHeater(320, 150); // 320*C for 150 ms

void loop() {
if (! bme.performReading()) {
Serial.println(“Failed to perform reading :(”);
Serial.print(“Temperature = “);
Serial.println(” *C”);

Serial.print(“Pressure = “);
Serial.print(bme.pressure / 100.0);
Serial.println(” hPa”);

Serial.print(“Humidity = “);
Serial.println(” %”);

Serial.print(“Gas = “);
Serial.print(bme.gas_resistance / 1000.0);
Serial.println(” KOhms”);

Serial.print(“Approx. Altitude = “);
Serial.println(” m”);


Adafruit BME_680 library version 2.0.1 hangs where as version 1.0.5 and version 1.0.7 works fine

Hi @Alok_Kumar_Mishra

Are you ok with “version 1.0.5 and version 1.0.7”?

or there are some particular reasons you must use version 2.0.1 now?

I would prefer latest version (2.0.1 onwards),since 2.0.1 hangs therefore I am using 1.0.7

Hi, @Alok_Kumar_Mishra
The problem is we could not help to verify the issue due to lack of sensor(BME680), and since the sensor only stop working when using the newer lib, it is highly likely it is a software issue caused by the update of the Adafruit library

I suggest that you also post a issue under the adafruit lib github repo, so that those with access to both sensor and dev board can help you look into it