GithubHelp home page GithubHelp logo

tiancheng-luo / hackrf_android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from demantz/hackrf_android

0.0 2.0 0.0 5.37 MB

A ported version of Michael Ossmann's libhackrf library to use with Android 3.1+

License: GNU General Public License v2.0

Java 100.00%

hackrf_android's Introduction

HackRF Library for Android

This repository is a ported version of Michael Ossmann's libhackrf ([https://github.com/mossmann/hackrf/tree/master/host/libhackrf] (https://github.com/mossmann/hackrf/tree/master/host/libhackrf)) library to work with Android 3.1+.

hackrf_android

(photo by Dennis Mantz)

See http://tech.mantz-it.com and @dennismantz for updates.

Implemented Features

  • Open HackRF (including the USB permission request)
  • Reading Board ID from HackRF
  • Reading Version from HackRF
  • Reading Part ID and Serial Number from HackRF
  • Setting Sample Rate of HackRF
  • Setting Frequency of HackRF
  • Setting Baseband Filter Width of HackRF
  • Compute Baseband Filter Width for given Sample Rate
  • Setting VGA Gain (Rx/Tx) of HackRF
  • Setting LNA Gain of HackRF
  • Setting Amplifier of HackRF
  • Setting Antenna Port Power of HackRF
  • Setting Transceiver Mode of HackRF
  • Receiving from the HackRF using a BlockingQueue
  • Transmitting to the HackRF using a BlockingQueue
  • Get Transmission statistics
  • Example App that shows how to use the library

Tested Devices

Device Does it work? Comments Tester
Oneplus One yes KR0SIV
Nexus 7 2012 yes ~ 2 Msps, Filewriter is too slow. demantz
Nexus 7 2013 yes 15 Msps @kx3companion
Nexus 4 needs ROM... ...and Y cable. (http://goo.gl/rRyQVM) -
Nexus 5 yes 15 Msps demantz
Moto G yes ~ 2 Msps @kx3companion
Acer A500 yes ~ 5 Msps @digiital
Samsung S3 LTE yes 10 Msps, running CM 10.1.3 dc1rdb
Samsung S4 yes @digiital
Samsung S4 LTE yes 10 Msps Jonyweb
Samsung S4 Zoom yes Ace Rimmer
Samsung S5 yes @simonroses
Samsung Note 3 yes @M3atShi3ld
Galaxy Tab S 8.4 yes Christophe Morel
Galaxy Tab S 10.5 yes Harald Pedersen
HTC M8 yes dmaynor
Sony Xperia Pro no insufficient USB bus power anttivs
Sony Xperia Z2 yes Harald Pedersen
LG G2 yes @michaelossmann
LG G3 yes @HashHacks
Moto G 4G yes @paul2dart
Motorola Xoom M601 yes Reg Blank
Dragon Touch A1X yes John Wright
Moto X (1st gen) yes sabas1080

Known Issues

  • USB connection is too slow for Sample Rates >15 Msps (testet on Nexus 7)
  • FileWriter in example app is too slow. Only works for ~ 2 Msps on old devices.
  • It seems that the HackRF sometimes gets to less power if using a to long or low quality USB cable.

Installation / Usage

Build the library and the example app by using the Android Studio projects:

  • hackrf_android/
  • hackrf_android/examples/

If you want to use the library in your own app, just copy the hackrf_android/app/build/outputs/aar/app-debug.aar file into your project and include it as a library. See the example project to learn how to use the library.

The hackrf_android.aar and the HackRF_Test.apk files are also in this repository so that they can be used without building them. But they won't be synched to the latest code base all the time.

A short howto to get started can be found on this blog post: [http://tech.mantz-it.com/2014/10/hackrfandroid-using-hackrf-with-android.html] (http://tech.mantz-it.com/2014/10/hackrfandroid-using-hackrf-with-android.html)

Use the example application to test the library on your device and trouble shoot any problems. It has the option to show the logcat output!

License

This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. http://www.gnu.org/licenses/gpl.html GPL version 2 or higher

principal author: Dennis Mantz <dennis.mantzgooglemail.com>

principal author of libhackrf: Michael Ossmann <mikeossmann.com>

hackrf_android's People

Contributors

demantz avatar paul2d avatar seelmann avatar

Watchers

James Cloos avatar Tiancheng-Luo 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.