Giter Club home page Giter Club logo

pi-wifi's Introduction

pi-wifi

Simple WIFI setup over bluetooth

This servie uses network manager API to connect to a WIFI network.

The implementation offers two interfaces

  • a bluetooth service
  • a rest API for local(host) usage by other services

Example

You can use go run main.go on a linux machine to start the software.

Then point your browser to http://localhost:9099/ to see an example usage.

Implementation

Bluetooth

The BLE server exposes one service 12342233-0000-1000-8000-00805f9b34fb with two characteristics

  1. 0x3344 that supports
    • read - return the connectivity status as enum with values connected, limited, unknown, disconnected
    • write - accept a UTF8 string in the format WIFI:T:WPA;S:;P:;H:false; (if ssid or password contains : or ; they must be backslashed eg ;
  2. 0x4455 that support read and list the available APs the wifi device found. The response is in the format SSID;strength\n a double \n indicates the end of the list

HTTP API

The service exposes also an HTTP API to intereact with WIFI connections

  • /connect connect to a WIFI connection. Expects a body in the format { "payload": "WIFI:T:WPA;S:your ssid;P:your password;H:false;;" }
  • /status return the connection status with format {"status": "connected"}
  • /listap list the reachable APs in format {"accessPoints": [ { "ssid": "example", "strength": 54 } ]}

The connection string format is based on https://github.com/zxing/zxing/wiki/Barcode-Contents#wi-fi-network-config-android-ios-11

pi-wifi's People

Contributors

muka avatar

Stargazers

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

Watchers

 avatar  avatar

Forkers

chillimeat

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.