
Security News
Potemkin Understanding in LLMs: New Study Reveals Flaws in AI Benchmarks
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
@nrfcloud/gateway-common
Advanced tools
Common module for JavaScript based gateways.
This module contains the gateway logic for communicating with the nRF Cloud platform and Bluetooth devices.
npm i @nrfcloud/gateway-common
You'll need to provide a class that inherits from bluetoothAdapter
. This will have to be specific for your system. See ExampleAdapter
for an example.
Create a gateway on your nRF Cloud account (make sure you have an account first!) using the following command:
npx @nrfcloud/gateway-registration
It will ask you for your login credentials. It will output three files in a ./result
directory. For MQTTS, you'll need the certificates and gateway ID. For WSS, you'll just need the gateway ID. WSS uses Cognito authentication to provide security.
In your code, create a new Gateway and pass in a configuration object.
It is suggested that you use environment variables and something like dotenv
.
(Note that this example is in Typescript, but plain JS works as well.)
import { Gateway, GatewayConfiguration, GatewayEvent } from 'gateway-common';
import { NobleAdapter } from './src/adapters/nobleAdapter';
const configuration: GatewayConfiguration = {
keyPath: process.env.PRIVATE_KEY_PATH,
certPath: process.env.CLIENT_CERT_PATH,
caPath: process.env.CA_CERT_PATH,
gatewayId: process.env.GATEWAY_ID,
host: process.env.HOST,
stage: process.env.ENVIRONMENT_STAGE,
tenantId: process.env.TENANT_ID,
bluetoothAdapter: new NobleAdapter(),
};
const gateway = new Gateway(configuration);
Upon instantiation, the gateway will try to connect to nRF Cloud.
The gateway will emit some events as things happen.
GATEWAY_DELETED
: The gateway has been deleted from nRF Cloud. You'll probably want to delete the certs since they're not useful any moreNAME_CHANGED
: Gateway name has been changedDEVICE_REMOVED
: Device has been removed from the gatewayCONNECTIONS_CHANGED
: The device connections have changedTo see an implementation of this project, see the Raspbery Pi gateway.
FAQs
nRF Cloud Javascript gateway common library
The npm package @nrfcloud/gateway-common receives a total of 3 weekly downloads. As such, @nrfcloud/gateway-common popularity was classified as not popular.
We found that @nrfcloud/gateway-common demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.