Giter Site home page Giter Site logo

linux-android-usb-comms's Introduction

linux-android-usb-comms

Linux to Android communication program using USB

Work in Progress

Description: The program uses the libusb library to create a USB communication session with an Android device.

Current Issues

Program fails on initialization, when claiming a USB interface. The function "libusb_claim_interface(handle, 0);" returns error code -6, which means LIBUSB_ERROR_BUSY. An attempt to detach the Linux kernel from the interface is made before the function call, but the program returns that the kernel is not currently using the interface, which means some other program or driver is using the interface.

Compiling in Ubuntu:

Install the libusb library using the following commands: apt-get source libusb apt-get install libusb-dev apt-get install libusb-1.0-0-dev

Compile using the following command: gcc comms.cpp -I/usr/include/ -o comms -lusb-1.0 -I/usr/include/ -I/usr/include/libusb-1.0

(Add source files to the command and replace -o comms as necessary...)

Note: The attached makefile compiles entire program including the GPS code

Finding your phone's Vendor ID and Product ID

In Ubuntu terminal, run lsusb The program will return: Bus 00X Device 00Y: ID 1234:5678 Qualcomm Inc. where 1234 is the phone's VID and 5678 is the phone's PID. Change the header file accordingly.

linux-android-usb-comms's People

Contributors

treyu avatar jello24 avatar

Stargazers

tianshupei88 avatar Jack.Y avatar

Watchers

James Cloos avatar  avatar  avatar  avatar Derek Chen avatar  avatar aazmy avatar

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.