6sense 中文文档教程

发布于 6年前 浏览 33 更新于 3年前

6sense

这是6element的子项目。 目的是使用连接尝试来计算传感器周围设备的数量。 无需连接设备,我们只需检测发出的数据包即可进行网络检测。

该软件在设计时考虑到了隐私,因为只能输出信号电平列表和每天都在变化的无法追踪的 ID。

How to install

npm install 6sense

先决条件是拥有

Quick start

6sense 的每个部分基本上都是一个连接加密狗的有限状态机。

wifi specific

var dongle = require('6sense'); 

// start recording and gather results every 60 seconds
dongle.record(60);

dongle.on('processed', function(result){
    console.log(JSON.stringify(result));
});

dongle.on('trajectories', function(result){
    console.log(JSON.stringify(result));
});

以下是主要功能:

dongle.wakeUp()  // from 'sleeping' to 'monitoring'
dongle.sleep();  // from 'monitoring' or 'recording' back to 'sleeping'
dongle.record(300); // from 'sleeping' or 'monitoring' to 'recording'
dongle.pause();  // from 'recording' to 'monitoring'
dongle.changeAllDayConfig({
    max_last_seen: 5 * 60 * 1000, // ms
    signal_precision: 5, // dB
    date_precision: 30 * 1000 // ms
}); // Change the config for the all-day measurement map

Licence

MIT

6sense

This is sub project of 6element. The purpose is to count the number of devices around the sensor using their connection attempts. No need for the device to be connected, we just detect the packets emitted for network detection.

This software was designed with privacy in mind, as only a list of signal levels and an untraceable id that change everyday can be outputed.

How to install

npm install 6sense

The prerequisit is to have

  • iw

  • tcpdump

  • A wifi interface with monitoring capability.

Quick start

Each part of 6sense is basically a finite state machine interfacing the dongle.

wifi specific

var dongle = require('6sense'); 

// start recording and gather results every 60 seconds
dongle.record(60);

dongle.on('processed', function(result){
    console.log(JSON.stringify(result));
});

dongle.on('trajectories', function(result){
    console.log(JSON.stringify(result));
});

Here are the main functions:

dongle.wakeUp()  // from 'sleeping' to 'monitoring'
dongle.sleep();  // from 'monitoring' or 'recording' back to 'sleeping'
dongle.record(300); // from 'sleeping' or 'monitoring' to 'recording'
dongle.pause();  // from 'recording' to 'monitoring'
dongle.changeAllDayConfig({
    max_last_seen: 5 * 60 * 1000, // ms
    signal_precision: 5, // dB
    date_precision: 30 * 1000 // ms
}); // Change the config for the all-day measurement map

Licence

MIT

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文