zoukankan      html  css  js  c++  java
  • Using Bluetooth LE with Go

    Gatt is a Go package, which provides developers to create BLE applications for Linux and OS X.
     
    Developers install Go language on the host machine, and cross-compile the applications for RPi.
     
    The package accesses HCI devices directly via HCI sockets provided by BlueZ core (kernel space), so it doesn't require the BlueZ userland package.
    To test the example programs (sample GATT server and clients):
     
    Cross-compile the server example for an ARMv6 target device.
     
     GOARCH=arm GOARM=6 GOOS=linux go build examples/server.go
     cp server <target device>
     
    Start the server on the target device
     
     sudo ./server
     
    Cross-compile the client example (discoverer) for an ARMv6 target device.
     
     GOARCH=arm GOARM=6 GOOS=linux go build examples/discoverer.go
     cp discoverer <target device>
     
    Run the discoverer to scan surrounding peripheral devices.
     
    sudo ./discoverer
     

    https://www.elinux.org/RPi_Bluetooth_LE
    https://github.com/paypal/gatt
     

  • 相关阅读:
    1002 写出这个数
    1001 害死人不偿命的(3n+1)猜想
    Graph I
    Tree
    进程通信
    管道
    fork函数
    Priority Queue
    Search
    游戏 slider
  • 原文地址:https://www.cnblogs.com/dong1/p/8714612.html
Copyright © 2011-2022 走看看