npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@samtec-ash/fireflyi2cserver

v2.0.8

Published

Firefly I2C backend server

Downloads

13

Readme

FireFlyI2CServer

Overview

FireFly I2C Server is used to perform I2C read and write operations to FireFly's EEPROM over IPC. The design attempts to be stateless and enable redux oriented actions over IPC.

Supported FireFly Variants:

  • FireFly ECUOB04 (28 GHz)
  • FireFly ECUO14B04 (14 GHz)
  • FireFly ECUOT12
  • FireFly ECUOR12

Publishing to NPM registry

yarn run prepublish

Installation

Local install:

yarn add @samtec-ash/fireflyi2cserver

Global install:

yarn global add @samtec-ash/fireflyi2cserver --prefix /usr/local

Environmental Variables

  • NODE_ENV: development, production
  • ENV_TEST: true, false
  • IPC_ADDRESS: IPC IP Address to use. Defaults to localhost.
  • IPC_PORT: IPC IP Port to use. Defaults to 7777
  • I2C_WRITE_DELAY: Delay between i2c writes.
  • I2C_READ_DELAY: Delay between i2c reads.
  • I2C_PAGE_DELAY: Delay between EEPROM pages changes.
  • I2C_INT_PINS: FireFly interrupt pins
  • I2C_PRS_PINS: FireFly present pins
  • I2C_RST_PINS: FireFly reset pins
  • I2C_SLT_PINS: FireFly select pins

Run

./node_modules/.bin/fireflyi2cserver

Actions:

DETECT_FIREFLYS

Input Payload:

{
  actionUUID: string,
  action: 'DETECT_FIREFLYS',
  payload: null
}

Output Payload:

{
  action: 'DETECT_FIREFLYS',
  success: boolean,
  error: string | null,
  payload: Array<FireFlyStatus>
}

READ_FIREFLY_STATUS

Input Payload:

{
  action: 'READ_FIREFLY_STATUS',
  payload: {
    ids: ?Array<string>
  }
}

Output Payload:

{
  action: 'READ_FIREFLY_STATUS',
  success: boolean,
  error: string | null,
  payload: Array<FireFlyStatus>
}

READ_FIREFLY_EEPROM

Input Payload:

{
  action: 'READ_FIREFLY_EEPROM',
  payload: {
    id: string,
    fields: Array<string>
  }
}

Output Payload:

{
  action: 'READ_FIREFLY_EEPROM',
  success: boolean,
  error: string | null,
  payload: {
    status: FireFlyStatus,
    fields: Array<FireFlyField>
  }
}

WRITE_FIREFLY_EEPROM

Input Payload:

{
  action: 'WRITE_FIREFLY_EEPROM',
  payload: {
    id: string,
    fields: Array<FireFlyField>
  }
}

Output Payload:

{
  action: 'WRITE_FIREFLY_EEPROM',
  success: boolean,
  error: string | null,
  payload: {
    status: FireFlyStatus
  }
}

Types:

type GPIOSetting = {
  +pin: number,
  +dir: "output" | "input",
  +value: "low" | "high"
}

type FireFlyStatus = {
  +id: string,  // Serial Number
  +name: string,
  +type: string,
  +i2cAddress: string,
  +gpioSettings: [GPIOSetting],
  +connected: bool,
  +error: string,  
};

type FireFlyField = {
  +name: string,
  +value: boolean|string|number|Array<boolean|string|number>
}

type FireFlyECUOB04 = {
  // General Indicator
  +serialNumber: string,
  +partNumber: string,
  +firmwareVersion: string,
  +eepromVersion: string,
  +vendorDate: string,
  +temperature: number,
  +voltage1v8: number,
  +voltage3v3: number,
  +temperatureHighAlarm: Array<boolean>,
  +temperatureLowAlarm: Array<boolean>,
  +temperatureHighWarn: Array<boolean>,
  +temperatureLowWarn: Array<boolean>,  
  +temperatureTimes: Array<number>,
  +voltage1v8HighAlarm: Array<boolean>,  
  +voltage1v8LowAlarm: Array<boolean>,  
  +voltage1v8HighWarn: Array<boolean>,  
  +voltage1v8LowWarn: Array<boolean>,  
  +voltage3v3HighAlarm: Array<boolean>,  
  +voltage3v3LowAlarm: Array<boolean>,  
  +voltage3v3HighWarn: Array<boolean>,  
  +voltage3v3LowWarn: Array<boolean>,  
  // RX Control
  +rxEnable: Array<boolean>,
  +rxPolarityInvert: Array<boolean>,
  +rxOutputVoltageSwing: Array<number>,
  +rxOutputPreEmphasis: Array<number>,
  +rxCDREnable: Array<boolean>,
  +rxCDRRate: Array<number>,
  // RX Indicator
  +rxRSSIStatus: Array<number>,
  +rxLOSStatus: Array<boolean>,
  +rxLOLStatus: Array<boolean>,
  // TX Control
  +txEnable: Array<boolean>,
  +txPolarityInvert: Array<boolean>,
  +txInputEqualization: Array<number>,
  +txCDREnable: Array<boolean>,
  +txCDRRate: Array<number>,
  +txSquelch: Array<boolean>,
  // TX Indicator
  +txRSSIStatus: Array<number>,
  +txLOSStatus: Array<boolean>,
  +txLOLStatus: Array<boolean>,
  +txFault: Array<boolean>
}

type FireFlyECUOT12 = {
  // General Indicator
  +serialNumber: string,
  +partNumber: string,
  +firmwareVersion: string,
  +eepromVersion: string,
  +vendorDate: string,
  +temperature: number,
  +voltage3v3: number,
  +temperatureHighAlarm: Array<boolean>,
  +temperatureLowAlarm: Array<boolean>,
  +temperatureTimes: Array<number>,
  +voltage3v3HighAlarm: Array<boolean>,  
  +voltage3v3LowAlarm: Array<boolean>,  
  // TX Control
  +txEnable: Array<boolean>,
  +txPolarityInvert: Array<boolean>,
  // TX Indicator
  +txFault: Array<boolean>
}

type FireFlyECUOR12 = {
  // General Indicator
  +serialNumber: string,
  +partNumber: string,
  +firmwareVersion: string,
  +eepromVersion: string,
  +vendorDate: string,
  +temperature: number,
  +voltage3v3: number,
  +temperatureHighAlarm: Array<boolean>,
  +temperatureLowAlarm: Array<boolean>,
  +temperatureTimes: Array<number>,
  +voltage3v3HighAlarm: Array<boolean>,  
  +voltage3v3LowAlarm: Array<boolean>,  
  // RX Control
  +rxEnable: Array<boolean>,
  +rxOutputEnable: Array<boolean>,
  +rxOutputVoltageSwing: Array<number>,
  +rxOutputPreEmphasis: Array<number>,
  // RX Indicator
  +rxLOSStatus: Array<boolean>,
}