Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tested devices #2

Open
dc1rdb opened this issue Oct 20, 2014 · 27 comments
Open

Tested devices #2

dc1rdb opened this issue Oct 20, 2014 · 27 comments

Comments

@dc1rdb
Copy link

dc1rdb commented Oct 20, 2014

Tested Ver. 1.06 on my Samsung S3 LTE (GT-I9305), running CM 10.1.3. Works perfect up to 10 Msps. Passive OTG-Adaptor.

@anttivs
Copy link

anttivs commented Oct 20, 2014

Tested Sony Xperia Pro (MK16i) running ICS 4.0.4, with an OTG cable that is known good (used with other software on that specific device). I know this is an old and crappy device, but it has hardware QWERTY, hence I am using it.
After clicking Open, I get "HackRF is ready!" and a banner "HackRF at /dev/bus/usb/001/002 is ready!".
Clicking on Info results in "Error while reading Board Information!".
Clicking on RX results in "Setting Sample Rate to 2000000 Sps ... error (USB)!"
The HackRF peripheral itself works ok with my laptop.
While trying the RF Analyzer, the banner newer goes away - it stays on top of everything, and if logging is enabled, a zero length log file is created on the SD card.
Happy to provide any debug data you'd need, if you just give a hint what would be required.

@demantz
Copy link
Owner

demantz commented Oct 20, 2014

Hmm ok that's interesting, never had anything like this. Too bad that the log doesn't work, I wonder why. The Test_HackRF app also writes a log file to [sdcard]/Test_HackRF/log.txt

Maybe there is some output in this file? It will be really hard to debug that bug without logs -.-

Do you know how to you the android debug bridge (ADB)? With this tool you could display and record the logs yourself. All you need to know is on this website:
http://developer.android.com/tools/help/adb.html

At the very end of this site they explain how to use ADB over wifi, which is necessary because you need the USB port for your HackRF.

@anttivs
Copy link

anttivs commented Oct 20, 2014

Ok, the problem might be in these kernel messages that are seen when plugging in. Hypothesis: Not able to supply enough power and it fails later due to that. What do you think?

E/kernel ( 140): [ 269.973785] usb 1-1: device v1d50 p6089 is not supported
D/kernel ( 140): [ 269.973815] usb 1-1: New USB device found, idVendor=1d50, idProduct=6089
D/kernel ( 140): [ 269.973815] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
D/kernel ( 140): [ 269.973846] usb 1-1: Product: HackRF One
D/kernel ( 140): [ 269.973846] usb 1-1: Manufacturer: Great Scott Gadgets
D/kernel ( 140): [ 269.974182] usb 1-1: rejected 2 configurations due to insufficient available bus power
W/kernel ( 140): [ 269.974182] usb 1-1: no configuration chosen from 2 choices

This is what is output when trying to use it, and when disconnecting

I/hackrf_android( 1896): initHackrf: Found 1 USB devices.
D/hackrf_android( 1896): initHackrf: deviceList: vendor=7504 product=24713
I/hackrf_android( 1896): initHackrf: Found HackRF One at /dev/bus/usb/001/002
D/hackrf_android( 1896): Permission request for device /dev/bus/usb/001/002 was send. waiting...
D/hackrf_android( 1896): initHackrf: Permission granted for device /dev/bus/usb/001/002
I/hackrf_android( 1896): constructor: create Hackrf instance from /dev/bus/usb/001/002. Vendor ID: 7504 Product ID: 24713
I/hackrf_android( 1896): constructor: device protocol: 0
I/hackrf_android( 1896): constructor: device class: 0 subclass: 0
I/hackrf_android( 1896): constructor: interface count: 2
I/hackrf_android( 1896): constructor: [interface 0] interface protocol: 255 subclass: 255
I/hackrf_android( 1896): constructor: [interface 0] interface class: 255
I/hackrf_android( 1896): constructor: [interface 0] endpoint count: 2
I/hackrf_android( 1896): constructor: [endpoint 0 (IN)] address: 129 attributes: 2 direction: 128 max_packet_size: 512
I/hackrf_android( 1896): constructor: [endpoint 1 (OUT)] address: 2 attributes: 2 direction: 0 max_packet_size: 512
E/hackrf_android( 1896): Couldn't claim HackRF USB Interface!
D/kernel ( 140): [ 583.252746] usb 1-1: USB disconnect, address 2
D/kernel ( 140): [ 583.282684] msm_hsusb_host msm_hsusb_host.0: remove, state 1
D/kernel ( 140): [ 583.282714] usb usb1: USB disconnect, address 1
E/kernel ( 140): [ 583.292846] hub 1-0:1.0: hub_port_status failed (err = -19)
E/kernel ( 140): [ 583.292846] hub 1-0:1.0: connect-debounce failed, port 1 disabled
D/kernel ( 140): [ 583.294433] msm_hsusb_host msm_hsusb_host.0: USB bus 1 deregistered

@demantz
Copy link
Owner

demantz commented Oct 20, 2014

Ah that's too bad. Yeah I think you are right. This message is pretty clear:
D/kernel ( 140): [ 269.974182] usb 1-1: rejected 2 configurations due to insufficient available bus power

Hmm so it will only work on the Xperia Pro if you use a powered USB hub or a Y-OTG cable that allows you to power the device externally.

Thanks for testing, I will add that info to the readme, so that others know the issue.

@dmaynor
Copy link

dmaynor commented Oct 20, 2014

Tested the HTC M8 from ATT. It works with HackRF One. Everything works perfectly, was able to replicate the FM demo in the video.

@demantz
Copy link
Owner

demantz commented Oct 20, 2014

@dmaynor awesome! I'll add the M8 to the list. You might wanna have a look at the RF Analyzer (https://github.com/demantz/RFAnalyzer) as well. Should work for you.

@fruel
Copy link

fruel commented Nov 16, 2014

Hi, I tested a few other devices:

  • LG Nexus 5 (with Android 5.0) - works
  • HTC Nexus 9 (Android 5.0) - not working (see my next comment for details)
  • LG G Pad 7.0 (Android 4.4.2) - works (only on second attempt - first attempt showed multiple "cannot set frequency" Toast messages)
  • Archos 97b Titanium (Android 4.1) - works
  • Samsung Galaxy S2 (Android 4.0.3) - not working (needs additional power source and phone reboots when starting wideband FM demodulation)

I tested scanning with the RF Analyzer app and the default settings (FM band 88-108 MHz) and demodulated one wideband FM radio station somewhere around 95MHz.
My HackRF was connected directly to the devices without any additional power source.

@fruel
Copy link

fruel commented Nov 16, 2014

HTC Nexus 9 compatibility:

HTC Nexus 9 (32GB, WiFi), Android 5.0, rooted

The app creashes when starting scanning.
Logcat:

I/ActivityManager( 1378): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.mantz_it.rfanalyzer/.MainActivity (has extras)} from uid 10022 on display 0
I/ActivityManager( 1378): Start proc com.mantz_it.rfanalyzer for activity com.mantz_it.rfanalyzer/.MainActivity: pid=14943 uid=10096 gids={50096, 9997, 1028, 1015, 3003} abi=arm64-v8a
I/MainActivity(14943): onCreate: started logcat (Process[pid=14962]) to /storage/emulated/0/RFAnalyzer/log.txt
D/OpenGLRenderer(14943): Render dirty regions requested: true
D/Atlas   (14943): Validating map...
I/OpenGLRenderer(14943): Initialized EGL, version 1.4
D/OpenGLRenderer(14943): Enabling debug mode 0
I/ActivityManager( 1378): Displayed com.mantz_it.rfanalyzer/.MainActivity: +531ms
D/HackRFSource(14943): setBasebandFilterWidth: Setting BB filter width to 15000000
D/HackRFSource(14943): setSampleRate: setting sample rate to 20000000
D/TaskPersister( 1378): removeObsoleteFile: deleting file=349_task.xml
I/hackrf_android(14943): initHackrf: Found 1 USB devices.
D/hackrf_android(14943): initHackrf: deviceList: vendor=7504 product=24713
I/hackrf_android(14943): initHackrf: Found HackRF One at /dev/bus/usb/003/003
D/TaskPersister( 1378): removeObsoleteFile: deleting file=349_task_thumbnail.png
I/ActivityManager( 1378): START u0 {flg=0x10000000 cmp=com.android.systemui/.usb.UsbPermissionActivity (has extras)} from uid 1000 on display 0
D/hackrf_android(14943): Permission request for device /dev/bus/usb/003/003 was send. waiting...
I/art     ( 1378): Background sticky concurrent mark sweep GC freed 15638(826KB) AllocSpace objects, 5(7MB) LOS objects, 14% free, 48MB/55MB, paused 14.834ms total 55.769ms
I/ActivityManager( 1378): Displayed com.android.systemui/.usb.UsbPermissionActivity: +54ms
W/InputMethodManagerService( 1378): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMeth
odClient$Stub$Proxy@2daa5ff8 attribute=null, token = android.os.BinderProxy@c48f5ae
D/OpenGLRenderer( 1553): endAllStagingAnimators on 0x558e65fbf0 (RippleDrawable) with handle 0x558de22900
D/hackrf_android(14943): initHackrf: Permission granted for device /dev/bus/usb/003/003
I/hackrf_android(14943): constructor: create Hackrf instance from /dev/bus/usb/003/003. Vendor ID: 7504 Product ID: 24713
I/hackrf_android(14943): constructor: device protocol: 0
I/hackrf_android(14943): constructor: device class: 0 subclass: 0
I/hackrf_android(14943): constructor: interface count: 2
I/hackrf_android(14943): constructor: [interface 0] interface protocol: 255 subclass: 255
I/hackrf_android(14943): constructor: [interface 0] interface class: 255
I/hackrf_android(14943): constructor: [interface 0] endpoint count: 2
I/hackrf_android(14943): constructor:     [endpoint 0 (IN)] address: 129 attributes: 2 direction: 128 max_packet_size: 512
I/hackrf_android(14943): constructor:     [endpoint 1 (OUT)] address: 2 attributes: 2 direction: 0 max_packet_size: 512
D/UsbHostManager( 1378): Added device UsbDevice[mName=/dev/bus/usb/003/004,mVendorId=7504,mProductId=24713,mClass=0,mSubclass=0,mProtocol=0,mManufacturerName=Great Scott Gadgets,mProductName=HackRF One,mSerialNumber=null,mConfigurations=[
D/UsbHostManager( 1378): UsbConfiguration[mId=1,mName=Transceiver,mAttributes=128,mMaxPower=250,mInterfaces=[
D/UsbHostManager( 1378): UsbInterface[mId=0,mAlternateSetting=0,mName=null,mClass=255,mSubclass=255,mProtocol=255,mEndpoints=[
D/UsbHostManager( 1378): UsbEndpoint[mAddress=129,mAttributes=2,mMaxPacketSize=512,mInterval=0]
D/UsbHostManager( 1378): UsbEndpoint[mAddress=2,mAttributes=2,mMaxPacketSize=512,mInterval=0]]]
D/UsbHostManager( 1378): UsbConfiguration[mId=2,mName=CPLD update,mAttributes=128,mMaxPower=250,mInterfaces=[
D/UsbHostManager( 1378): UsbInterface[mId=0,mAlternateSetting=0,mName=null,mClass=255,mSubclass=255,mProtocol=255,mEndpoints=[
D/UsbHostManager( 1378): UsbEndpoint[mAddress=129,mAttributes=2,mMaxPacketSize=512,mInterval=0]
D/UsbHostManager( 1378): UsbEndpoint[mAddress=2,mAttributes=2,mMaxPacketSize=512,mInterval=0]]]]
D/AndroidRuntime(14943): Shutting down VM
E/AndroidRuntime(14943): FATAL EXCEPTION: main
E/AndroidRuntime(14943): Process: com.mantz_it.rfanalyzer, PID: 14943
E/AndroidRuntime(14943): java.lang.RuntimeException: Error receiving broadcast Intent { act=com.mantz_it.hackrf_android.USB_PERMISSION flg=0x10 (has extras) } in com.mantz_it.hackrf_android.Hackrf$1@26cf1f2a
E/AndroidRuntime(14943):        at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:871)
E/AndroidRuntime(14943):        at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime(14943):        at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(14943):        at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(14943):        at android.app.ActivityThread.main(ActivityThread.java:5221)
E/AndroidRuntime(14943):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(14943):        at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(14943):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
E/AndroidRuntime(14943):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
E/AndroidRuntime(14943): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.hardware.usb.UsbDeviceConnection.claimInterface(android.hardware.usb.UsbInterface, boolean)' on a null object reference
E/AndroidRuntime(14943):        at com.mantz_it.hackrf_android.Hackrf.sendUsbRequest(Hackrf.java:469)
E/AndroidRuntime(14943):        at com.mantz_it.hackrf_android.Hackrf.getBoardID(Hackrf.java:505)
E/AndroidRuntime(14943):        at com.mantz_it.rfanalyzer.HackrfSource.isOpen(HackrfSource.java:113)
E/AndroidRuntime(14943):        at com.mantz_it.rfanalyzer.MainActivity.startAnalyzer(MainActivity.java:724)
E/AndroidRuntime(14943):        at com.mantz_it.rfanalyzer.MainActivity.onIQSourceReady(MainActivity.java:421)
E/AndroidRuntime(14943):        at com.mantz_it.rfanalyzer.HackrfSource.onHackrfReady(HackrfSource.java:99)
E/AndroidRuntime(14943):        at com.mantz_it.hackrf_android.Hackrf$1.onReceive(Hackrf.java:202)
E/AndroidRuntime(14943):        at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:861)
E/AndroidRuntime(14943):        ... 8 more
W/ActivityManager( 1378):   Force finishing activity com.mantz_it.rfanalyzer/.MainActivity
W/ContextImpl( 1378): Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:1321 com.android.server.usb.UsbSettingsManager.deviceAttached:741 com.android.server.usb.UsbHostManager.endUsbDeviceAdded:286 com.android.server.usb.UsbHostManager.monitorUsbHostBus:-2 com.android.server.usb.UsbHostManager.access$000:47
I/OpenGLRenderer( 1378): Initialized EGL, version 1.4
I/art     ( 1378): Background partial concurrent mark sweep GC freed 10113(655KB) AllocSpace objects, 11(12MB) LOS objects, 26% free, 44MB/60MB, paused 1.052ms total 111.381ms
W/ActivityManager( 1378): Activity pause timeout for ActivityRecord{1afa49bd u0 com.mantz_it.rfanalyzer/.MainActivity t351 f}
D/WifiService( 1378): acquireWifiLockLocked: WifiLock{Firepaper type=1 binder=android.os.BinderProxy@ad70817}
D/WifiService( 1378): releaseWifiLockLocked: WifiLock{Firepaper type=1 binder=android.os.BinderProxy@ad70817}
D/TaskPersister( 1378): removeObsoleteFile: deleting file=352_task_thumbnail.png

I tested also a USB flash drive and a USB mouse to make sure OTG itself is working.
To make sure the HackRF gets enough power I tried it also though a powered USB hub - same result.

I sent a bug report for this issue via Google Play for the RF Analyzer app - it might contain additional details.

@demantz
Copy link
Owner

demantz commented Nov 16, 2014

@fruel first of all thx! That is an excellent bug report!
I looked at the log and it looks really weird.. seems like the USB device is reconnected at a different address as soon as I try to open it:
You can see that I detect the device in this line: I/hackrf_android(14943): initHackrf: Found HackRF One at /dev/bus/usb/003/003
Then I send a permission request for this device which is also granted: D/hackrf_android(14943): initHackrf: Permission granted for device /dev/bus/usb/003/003
But in the exact moment I open the device, this message appears: D/UsbHostManager( 1378): Added device UsbDevice[mName=/dev/bus/usb/003/004,mVendorId=7504,mProductId=24713,mClass=0,mSubclass=0,mProtocol=0,mManufacturerName=Great Scott Gadgets,mProductName=HackRF One,mSerialNumber=null,mConfigurations=[...

Note that the device is now at /dev/bus/usb/003/004 instead of /dev/bus/usb/003/003.

I've never seen that before and honestly don't know what to do about that. It looks like the HackRF is reset at exactly the moment of opening it. If you wouldn't have said you tested it with a powered hub I would say it looks like a power problem..

Have you tried it with the Test_HackRF.apk too? I don't really expect something different. But just to be sure it is not a multithreading related problem ..

@fruel
Copy link

fruel commented Nov 17, 2014

I did some more research what the issue could be:

With Test_HackRF.apk I get the same results.

this.usbConnection = usbManager.openDevice(usbDevice);

The problem is that this call returns null and the official Documentation for this says "Returns null if open failed".
Digging a bit deeper into Android I found that in the proxy class for IUsbManager (http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.L_preview/android/hardware/usb/IUsbManager.java#374) in line 374 the reply for the openDevice transaction returns 0.

The kernel log shows:

<6>[  103.778733] usb 3-1.4: reset high-speed USB device number 6 using tegra-ehci
<6>[  103.901440] usb 3-1.4: USB disconnect, device number 6
<6>[  103.998737] usb 3-1.4: new high-speed USB device number 7 using tegra-ehci
<6>[  104.109981] usb 3-1.4: New USB device found, idVendor=1d50, idProduct=6089
<6>[  104.110017] usb 3-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
<6>[  104.110029] usb 3-1.4: Product: HackRF One
<6>[  104.110038] usb 3-1.4: Manufacturer: Great Scott Gadgets
<6>[  144.698651] usb 3-1.4: reset high-speed USB device number 7 using tegra-ehci
<6>[  144.810814] usb 3-1.4: USB disconnect, device number 7
<6>[  144.908648] usb 3-1.4: new high-speed USB device number 8 using tegra-ehci
<6>[  145.019949] usb 3-1.4: New USB device found, idVendor=1d50, idProduct=6089
<6>[  145.019973] usb 3-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
<6>[  145.019984] usb 3-1.4: Product: HackRF One
<6>[  145.019993] usb 3-1.4: Manufacturer: Great Scott Gadgets

This confirms that the device is reset and immediately reconnected with a new device number. But it does not say anything about the reason.

During most of those tests I connected the HackRF though a powered USB hub to the Nexus 9. I also connected a mouse to the hub. The mouse stayed connected and active the whole time - thus I can say that only the HackRF gets reset and not the whole USB stack/driver.

Another thing I tried is changing the VID/PID in the library source code to convince it that my Xbox One controller is a HackRF. Of course Info/RX/TX does not work but the connection to the device could be established successfully and usbManager.openDevice(usbDevice) did not return null.

Android 5.0 itself can't be the issue either as it works fine on the Nexus 5.
Right now I think it might be an issue caused by some hardware specific code from HTC or NVidia.
Maybe it would be interesting if someone could test it on an NVidia SHIELD Tablet as it uses a pretty similar hardware platform (but 32bit),
Another thing worth trying might be some alternative kernels from XDA - but it might take a while until there will be any available.

@theoneandonly-vector
Copy link

Works perfectly for my OnePlus One with nethunter...
I can send high-quality Fm-audio, and jam dvb-t and dab signals..,

It would be nice to get more features...(sending audio from file, or mocrophone etc.)

@demantz
Copy link
Owner

demantz commented Jan 3, 2015

Thx for testing... I'm currently working on RF Analyzer (https://github.com/demantz/RFAnalyzer) and it takes up all my time. But I want to release another app that does all the TX stuff you mentioned ;)

@theoneandonly-vector
Copy link

Please inform me, when there will he something new for tx..
RF-Analyzer works pretty good, dab-functionality would be nice to have in
RF-Analyzer.
Am 04.01.2015 00:24 schrieb "Dennis Mantz" [email protected]:

Thx for testing... I'm currently working on RF Analyzer (
https://github.com/demantz/RFAnalyzer) and it takes up all my time. But I
want to release another app that does all the TX stuff you mentioned ;)


Reply to this email directly or view it on GitHub
#2 (comment)
.

@demantz
Copy link
Owner

demantz commented Jan 3, 2015

I'm still far away from digital modes... but I find them very interesting too ;) we will see..

I'll keep you up to date about the TX stuff!

@theoneandonly-vector
Copy link

Thank you very much for all your effort.
Am 04.01.2015 00:36 schrieb "Dennis Mantz" [email protected]:

I'm still far away from digital modes... but I find them very interesting
too ;) we will see..

I'll keep you up to date about the TX stuff!


Reply to this email directly or view it on GitHub
#2 (comment)
.

@zjchen
Copy link

zjchen commented Jun 2, 2015

Hi, I test on my sony L50t(Android 4.4.2). It can get the information of Hackrf one ,the usb can work. Also view spectrum from ours Handheld Spectrum Analyzer. I try to send something and receive by the other Hackrf board. As the result, the other Hackrf cannot receive the correct data. The latest version can receive and send information ? If transmit nothing in one frequency, the Hackrf also can get something like noise and different board would different.

@demantz
Copy link
Owner

demantz commented Jun 3, 2015

@zjchen I'm not sure if I understand all details of your problem.

The driver and the test app are both able to send and receive data with the HackRF. Transmitting data with the app and receiving it with a RTL stick on my laptop works fine for me on my Nexus7 and Nexus5.

So your setup contains 2 HackRF boards connected to 2 Android devices and you are using the hackrf_android driver together with your own app? There are many things that could go wrong in this scenario and I don't know where to start.. could you give me some more information (maybe even some source code snippets of how you interact with the driver)?

@theoneandonly-vector
Copy link

Any update?..

2015-06-03 12:57 GMT+02:00 Dennis Mantz [email protected]:

@zjchen https://github.com/zjchen I'm not sure if I understand all
details of your problem.

The driver and the test app are both able to send and receive data with
the HackRF. Transmitting data with the app and receiving it with a RTL
stick on my laptop works fine for me on my Nexus7 and Nexus5.

So your setup contains 2 HackRF boards connected to 2 Android devices and
you are using the hackrf_android driver together with your own app? There
are many things that could go wrong in this scenario and I don't know where
to start.. could you give me some more information (maybe even some source
code snippets of how you interact with the driver)?


Reply to this email directly or view it on GitHub
#2 (comment)
.

@zjchen
Copy link

zjchen commented Jun 3, 2015

@demantz I bush string in queue by "byte[] packet" and "transmitLoop()" also send data to usb interface. Maybe the data i send go wrong. As you say, i use two Hackrf one and two android devices. By the way, could you provide the file "hackrf_android.iq" you use ?

@demantz
Copy link
Owner

demantz commented Jun 8, 2015

@zjchen You can use every file you recorded with the hackrf_transfer tool by Michael Ossmann. Here is an example I uploaded some time ago: http://www.file-upload.net/download-9711411/flex_2000000sps_931MHz.iq.html

Note that the samples have to be in the format of interleaved, 8-bit, signed IQ samples (in-phase component first, followed by the quadrature component)!

@zjchen
Copy link

zjchen commented Jul 4, 2015

@demantz thinks for your share firs. We use this file transfor by harkrf and receive by other harkrf. Just change the frequence. When I compare the file from receive point and the file you share, they are different. For this project, is it cpu push the iq data to usb and hackrf send by itself? Sometimes, I have no idea that my operate is ok.

@zjchen
Copy link

zjchen commented Jul 5, 2015

@demantz in the process of debug, I check value "packet" in the function transmitThread() line 656 "if(queue.offer(packet, 1000, TimeUnit.MILLISECONDS) == false)". The data get from file is correct and it just push the packet to the queue and do nothing. Should I setting something ? In hackrf.class, the data push to queue "packet = (byte[]) queue.poll(1000, TimeUnit.MILLISECONDS);"

@demantz
Copy link
Owner

demantz commented Jul 6, 2015

@zjchen I'm sorry, but I don't understand what your exact problem is. Could you describe it again?

The packet is pushed in the queue by your application. The TX thread will then read the packet from the queue and send it to the HackRF via USB. The HackRF will then transmit the samples. Of course you have to put the HackRF in TX mode first by calling startTX(). This will start the TX thread.

Please also note, that the data you will receive on the second HackRF will never exactly be the same as in your original file. What you are transmitting here are raw IQ samples. They will get distorted, mixed with noise and other signals. If you want to transmit any data you would need to implement some sort of modulation and you also need to filter the signal accordingly.

@demantz
Copy link
Owner

demantz commented Sep 25, 2015

@fruel I know this is a really old thread. But I just got an email of someone with a NVIDIA shield tablet and he has the exact same issue (as you predicted). However he managed to work around it:

"Hello, I have found a fix; if I plug the hackRF into a USB hub, the hub into an otg adapter, then restart the app a few times and try different ports on the hub, it connects and works perfectly. Very, very odd."

"Whoa, actually, if I just try enough times without the hub, it connects on the fifth attempt or so. Just spamming the "play" button solves the problem. Wierd."

So this seems to be hardware related. I hope this helps others with the same issue!

@finfinack
Copy link

FWIW, I just posted a solution that worked for me to what I think is / might be the same issue: offensive-security/kali-nethunter#401 (comment)

@Radiomix2000
Copy link

Nexus 6 working fine!

@rapbando
Copy link

rapbando commented Sep 23, 2021

FULL RATE!!!

Samsung Galaxy S9+ SM-G965F rooted with lineage OS and no bloatware.

Screenshot_20210923-020552_HackRF_Test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants