Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Nexus 9 - SDR problems - HackRF and RTL_SDR not working #401

Closed
Livebullshit opened this issue Mar 11, 2016 · 5 comments
Closed

Nexus 9 - SDR problems - HackRF and RTL_SDR not working #401

Livebullshit opened this issue Mar 11, 2016 · 5 comments

Comments

@Livebullshit
Copy link

Hi,

When i plug my HackRF, Nethunter find it but can't get it to work. I got the following :

root@kali:~# hackrf_info
Found HackRF board 0:
hackrf_open() failed: HACKRF_ERROR_LIBUSB (-1000)

root@kali:~# modprobe hackrf
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/3.10.40-g6857980-dirty/modules.dep.bin'
modprobe: FATAL: Module hackrf not found in directory /lib/modules/3.10.40-g6857980-dirty

root@kali:~# rmmod hackrf
rmmod: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file '/lib/modules/3.10.40-g6857980-dirty/modules.builtin.bin'
rmmod: ERROR: Module hackrf is not currently loaded

root@kali:~# dmesg
[...]
[  167.946258] [USB] utmi_phy_power_on UTMIP_XCVR_CFG0:6002337 xcvr_use_fuses:1 utmi_xcvr_setup:7
[  168.201101] usb 3-1.1: new high-speed USB device number 3 using tegra-ehci
[  168.332686] usb 3-1.1: New USB device found, idVendor=1d50, idProduct=6089
[  168.332732] usb 3-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  168.332754] usb 3-1.1: Product: HackRF One
[  168.332773] usb 3-1.1: Manufacturer: Great Scott Gadgets
[  196.329165] type=1400 audit(1457697100.035:69): avc: denied { write } for pid=2676 comm="postgres" laddr=::1 lport=45234 faddr=::1 fport=45234 scontext=u:r:init:s0 tcontext=u:r:init:s0 tclass=udp_socket permissive=1
[  196.333775] type=1400 audit(1457697100.035:70): avc: denied { read } for pid=2677 comm="postgres" laddr=::1 lport=45234 faddr=::1 fport=45234 scontext=u:r:init:s0 tcontext=u:r:init:s0 tclass=udp_socket permissive=1
[  228.405166] healthd: battery l=62 v=3880 t=29.8 h=2 st=3 c=-750 chg= 2016-03-11 11:52:12.130698561 UTC
[  256.395426] type=1400 audit(1457697160.115:71): avc: denied { rename } for pid=2677 comm="postgres" name="db_0.tmp" dev="dm-0" ino=527192 scontext=u:r:init:s0 tcontext=u:object_r:system_data_file:s0 tclass=file permissive=1
[  260.161014] tegra_rt5677_spk_startup:mi2s amp on
[  260.890495] type=1400 audit(1457697164.585:72): avc: denied { read } for pid=3165 comm="sh" name="/" dev="tmpfs" ino=5257 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:device:s0 tclass=dir permissive=1
[  260.890821] type=1400 audit(1457697164.585:73): avc: denied { open } for pid=3165 comm="sh" path="/dev" dev="tmpfs" ino=5257 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:device:s0 tclass=dir permissive=1
[  260.925191] type=1400 audit(1457697164.625:74): avc: denied { getattr } for pid=3171 comm="ls" path="/dev/hidg0" dev="tmpfs" ino=5533 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:device:s0 tclass=chr_file permissive=1
[  260.958248] type=1400 audit(1457697164.665:75): avc: denied { call } for pid=3156 comm="main" scontext=u:r:zygote:s0 tcontext=u:r:system_server:s0 tclass=binder permissive=1
[  260.961413] type=1400 audit(1457697164.665:76): avc: denied { transfer } for pid=3156 comm="main" scontext=u:r:zygote:s0 tcontext=u:r:system_server:s0 tclass=binder permissive=1
[  261.280259] init: Untracked pid 3154 exited with status 241
[  261.280778] type=1400 audit(1457697164.985:77): avc: denied { call } for pid=670 comm="Binder_2" scontext=u:r:system_server:s0 tcontext=u:r:zygote:s0 tclass=binder permissive=1
[  261.510043] init: Untracked pid 3156 exited with status 0
[  263.334750] tegra_rt5677_spk_shutdown:mi2s amp off
[  264.902146] tegra_rt5677_spk_startup:mi2s amp on
[  269.563832] tegra_rt5677_spk_shutdown:mi2s amp off
[  269.848155] tegra_rt5677_spk_startup:mi2s amp on
[  273.033154] tegra_rt5677_spk_shutdown:mi2s amp off
[  273.473593] tegra_rt5677_spk_startup:mi2s amp on
[  273.544309] [USB] utmi_phy_power_on UTMIP_XCVR_CFG0:6002337 xcvr_use_fuses:1 utmi_xcvr_setup:7
[  273.730019] usb 3-1: reset high-speed USB device number 2 using tegra-ehci
[  274.180690] usb 3-1.1: reset high-speed USB device number 3 using tegra-ehci
[  274.292345] usb 3-1.1: USB disconnect, device number 3
[  274.370292] usb 3-1.1: new high-speed USB device number 4 using tegra-ehci
[  274.483260] usb 3-1.1: New USB device found, idVendor=1d50, idProduct=6089
[  274.483305] usb 3-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  274.483333] usb 3-1.1: Product: HackRF One
[  274.483356] usb 3-1.1: Manufacturer: Great Scott Gadgets
[  276.649614] tegra_rt5677_spk_shutdown:mi2s amp off
[  277.714294] tegra_rt5677_spk_startup:mi2s amp on
[  280.890295] tegra_rt5677_spk_shutdown:mi2s amp off
[...]

As for the RTL_SDR :

root@kali:~# rtl_test
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM

Kernel driver is active, or device is claimed by second instance of librtlsdr.
In the first case, please either detach or blacklist the kernel module
(dvb_usb_rtl28xxu), or enable automatic detaching at compile time.

usb_claim_interface error -6
Failed to open rtlsdr device #0.

I don't mind too much for the RTL_SDR because i don't use it very often, but i use my HackRF a lot and beeing able to use it on nethunter would be a life saver.

I hope you can help me with my problems.

Apart from that Nethunter is so awsome !!!

Thx guys

@binkybear
Copy link
Collaborator

I don't have a HackRF myself to test but have you tried the RF Analyzer Android app (https://github.com/demantz/RFAnalyzer)?

Also: http://tech.mantz-it.com/2014/10/rf-analyzer-explore-frequency-spectrum.html

Technically hackrf doesn't have a kernel module for Android but some folks have gotten it working using a ported Android library from the app.

@Livebullshit
Copy link
Author

Yeah i tried RFAnalyzer with a rtl sdr and the hackrf. Both ain't working on the nexus 9.
But both (hackrf and rtlsdr) worked on my stock galaxy s6 phone with this app. Which is nice to explore but i wish i could use the hackrf / osmocom lib to do more with nethunter. Thx for the article link. The app itself is already amazing, i just wish it could do more.

I dont know if it comes from something i misconfigured or the nexus 9 itself. If not a hackrf, does anyone got a rtlsdr dongle to work on this device ?

Thx again for the help

@TomasAndersonvoid
Copy link

@darmoy I have tried hackrf on my nexus6p with andorid 6.0.1, it works well for the RFAnalyzer. The only thing I can help is to remind you make sure USB debug mode is enabled.

binkybear added a commit to binkybear/flounder that referenced this issue Apr 1, 2016
offensive-security/kali-nethunter#401
Signed-off-by: binkybear <binkybear@nethunter.com>
@Livebullshit
Copy link
Author

It seems to be related to the nexus 9

@finfinack
Copy link

I had the same issue and after a few trial and errors found a solution. Not sure why it is Nexus 9 related but it seems to be, yes.

The same issue was described in this hackrf thread:
greatscottgadgets/hackrf#165

Which pointed me at these:
https://rad1o.badge.events.ccc.de/troubleshooting#rad1o_usb_disconnects_every_5_seconds_not_usable_at_all
http://unix.stackexchange.com/questions/91027/how-to-disable-usb-autosuspend-on-kernel-3-7-10-or-above

Quote:
"""
Reason: usb-autosuspend. manually configured auto-suspend or you may have laptop-mode-tools or tlp (thinkpad powersaving tool)

Reason: usb-autosuspend. manually configured auto-suspend or you may have laptop-mode-tools or tlp (thinkpad powersaving tool)
"""

On the tablet, kali doesn't have tlp over laptop-mode-tools (you can probably try installing?), so I fixed it temporarily:

$ hackrf_info
Found HackRF board 0:
hackrf_open() failed: HACKRF_ERROR_LIBUSB (-1000)

$ cat /sys/module/usbcore/parameters/autosuspend
2
$ echo -1 >/sys/module/usbcore/parameters/autosuspend
$ cat /sys/module/usbcore/parameters/autosuspend
-1
$ hackrf_info
Found HackRF board 0:
USB descriptor.....

RFAnalyzer now works reliably as well. Yay!

Maybe someone else can figure out how to make this permanent :)

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

No branches or pull requests

5 participants