BSD 3-Clause "New" or "Revised" License

项目介绍

quiet/QuietModemKit 是一个托管在 GitHub 上的开源项目,主要使用 Objective-C 编写,采用 BSD 3-Clause "New" or "Revised" License 许可证,目前获得 459 个 Star、48 次 Fork。

仓库全名
quiet/QuietModemKit
开源许可证
BSD 3-Clause "New" or "Revised" License
Star 数
459
Fork 数
48
未关闭 Issue
18

README 摘要

QuietModemKit ============== This is the iOS framework for https://github.com/quiet/quiet With this library, you can send data through sound. Live demo: https://quiet.github.io/quiet-js/ Other platforms: Javascript: https://github.com/quiet/quiet-js Android: https://github.com/quiet/org.quietmodem.Quiet Why sound? Isn't that outdated? If you are old enough, you may remember using dial-up modems to connect to the…

完整内容见 GitHub 原始 README 或本页 。

常见问题

QuietModemKit 用什么语言开发?

主要使用 Objective-C 编写,采用 BSD 3-Clause "New" or "Revised" License 许可证,目前有 459 个 Star。

QuietModemKit 可以免费商用吗?

仓库采用 BSD 3-Clause "New" or "Revised" License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 QuietModemKit 的源码?

可以直接克隆仓库:git clone https://github.com/quiet/QuietModemKit.git,默认分支为 master;安装与运行步骤见仓库 README。

QuietModemKit 最近还在维护吗?

仓库最近一次更新为 2021年5月19日,当前有 18 个未关闭 Issue;Star 数为 459,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

iOS framework for the Quiet Modem (data over sound)

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
571
价值分
290
活跃状态
活跃

语言占比

CMake
Objective-C
Shell

Release

README

QuietModemKit

This is the iOS framework for https://github.com/quiet/quiet

With this library, you can send data through sound.

Live demo: https://quiet.github.io/quiet-js/

Other platforms:

Why sound? Isn’t that outdated?

If you are old enough, you may remember using dial-up modems to connect to the internet. In a sense, this package brings that back. While it’s true that this is somewhat of a retro approach, consider the advantages of using sound.

  • Highly cross-platform. Any device with speakers and a microphone and sufficient computational power can use this medium to communicate.

  • No pairing. Unlike Bluetooth, sound can be used instantly without the need to pair devices. This reduces the friction and improves the user experience.

  • Embeddable content. Similar to a QR code, short packets of data can be encoded into streaming or recorded audio and can then be later decoded by this package.

What does it sound like?

The answer to this depends on which operating mode you choose. Quiet provides audible and near-ultrasonic modes. Audible modes sound something like a puff of air. The near-ultrasonic modes run at 17+kHz and are virtually inaudible to adults. Either mode can operate at relatively low volumes as long as there isn’t too much background noise.

How fast does it go?

Quiet’s provided audible mode transfers at approximately 7kbps. In cases where two devices are connected over a cable (via 3.5mm jack) it can run in cable mode, which transfers at approximately 64kbps.

Building

CMake is required to build QuietModemKit. If you aren’t sure if you have CMake installed, run brew install cmake.

It is recommended that you use Carthage to build QuietModemKit. Simply run brew install cmake and then add github "Quiet/QuietModemKit" to your Cartfile and run carthage update.

Example

Transmitter:

#import <QuietModemKit/QuietModemKit.h>

int main(int argc, char * argv[]) {
    QMTransmitterConfig *txConf = [[QMTransmitterConfig alloc] initWithKey:@"ultrasonic-experimental"];

    QMFrameTransmitter *tx = [[QMFrameTransmitter alloc] initWithConfig:txConf];

    NSString *frame_str = @"Hello, World!";
    NSData *frame = [frame_str dataUsingEncoding:NSUTF8StringEncoding];
    [tx send:frame];

    CFRunLoopRun();

    [tx close];

    return 0;
}

Receiver:

#import <QuietModemKit/QuietModemKit.h>

static QMFrameReceiver *rx;

void (^recv_callback)(NSData*) = ^(NSData *frame){
    printf("%s\n", [frame bytes]);
};

void (^request_callback)(BOOL) = ^(BOOL granted){
    QMReceiverConfig *rxConf = [[QMReceiverConfig alloc] initWithKey:@"ultrasonic-experimental"];
    rx = [[QMFrameReceiver alloc] initWithConfig:rxConf];
    [rx setReceiveCallback:recv_callback];
};

int main(int argc, char * argv[]) {
    [[AVAudioSession sharedInstance] requestRecordPermission:request_callback];

    CFRunLoopRun();

    if (rx != nil) {
        [rx close];
    }

    return 0;
}

Note that we ask for the Record permission. This is required to use the receiver.

Profiles

The modem can be used audibly or via ultrasonic sound. QMTransmitterConfig and QMReceiverConfig are used to select modem configuration. For a full list of valid keys, refer to the top-level keys of quiet-profiles.json.

License

3-Claused BSD, plus third-party licenses (mix of MIT and BSD, see licenses/)

评论

暂无评论