Coder Social home page Coder Social logo

sensorhub-cloud-iot's People

Contributors

atn832 avatar blakelawson avatar grafnu avatar mangini avatar woody77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sensorhub-cloud-iot's Issues

Doc update: Generic BMP280 usage instead of Adafruit BMP280.

There is a huge choice of cheap BMP280 Barometric Pressure Sensor Breakout Boards on Amazon, eBay or AliExpress like these ones:
https://www.amazon.com/Wrisky-GY-BMP280-3-3-Pressure-Precision-Atmospheric/dp/B01KZ6S06O
https://www.aliexpress.com/item/I2C-SPI-BMP280-3-3-Digital-Barometric-Pressure-Altitude-Sensor-High-Precision-Atmospheric-Module-Replace-BMP180/32681667220.html

You can use it instead of original Adafruit BMP280, the only thing you need is using the following pinout:

VCC -> +3.3V (J8 pin 1)
GND -> Ground (J8 pin 9)
SCL -> I2C1 SCL (J8 pin 5)
SDA -> I2C1 SDA (J8 pin 3)
CSB -> to +3.3V through a pull-up resistor (I2C bus selection if HIGH)
SDO -> to +3.3V through a pull-up resistor (0x77 I2C bus addr selection if HIGH)

Create PEM for Android Things: Invalid authentication key. Check the format.

Finally, fixed this issue by almost one day:

image

Firstly, execute the follow command to create a pem file, I use EC in this command:

adb shell am start -e project_id <PROJECT_ID> -e cloud_region <REGION> -e registry_id <REGISTRY_ID> -e device_id <DEVICE_ID> [-e key_algorithm <one of RSA,EC>] com.example.androidthings.sensorhub/.SensorHubActivity

the key point is -e key_algorithm, which allows RSA and EC, and EC is actually ES256:

ES256 key pair using the Eliptic Curve algorithm
See Google Cloud Internet of Things Core - Creating Public/Private Key Pairs

Lastly, upload the pem to GCP console, and select ES256_X509:

image

This function in AuthKeyGenerator.class is actually for _X509

public void initialize() throws GeneralSecurityException, IOException {
    if (certificate instanceof X509Certificate) { // is true

private void writeCertificatePEM(OutputStream os) throws GeneralSecurityException, IOException {
    os.write("-----BEGIN CERTIFICATE-----\n".getBytes());
    os.write(Base64.encode(certificate.getEncoded(), Base64.DEFAULT));
    os.write("-----END CERTIFICATE-----\n".getBytes());
}

Done

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.