Giter Club home page Giter Club logo

antport's Introduction

antport

A go library to communicate via a the ANT usb stick.

First time use in Ubuntu

You need permission to read and write the USB device. To do so add a text file with the following to /etc/udev/rules.d/99-garmin.rules

On Ubuntu 10.04 (or lower):

SUBSYSTEM=="usb", SYSFS{idVendor}=="0fcf", SYSFS{idProduct}=="1008", MODE="666"

On Ubuntu 12.04 (or other distros running newer udev):

SUBSYSTEM=="usb", ATTR{idVendor}=="0fcf", ATTR{idProduct}=="1008", MODE="666"

First time use in Mac OSX

Mac requires libusb to be installed from source code. Make sure you have XCode, Mac OSX SDK and the command line tools installed and run:

brew install libusb --HEAD

Now when you build the project you can get the following error:

# github.com/kylelemons/gousb/usb
iso.go:67:8: struct size calculation error off=72 bytesize=64

Joseph Poirier proposed a quick fix that should work:

Just wondering if anyone has looked into this since the last post? I tried to compile Kyle's gousb package on OSX today but ran into this problem; the quick hack was to change the struct's flexible member size to 1 in libusb.h.

You can find libusb.h in /usr/local/include/libusb-1.0/libusb.h. Here is a gist of my modified libusb.h. The change has been made at line 937.

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.