greatscottgadgets / hackrf

low cost software radio platform
https://greatscottgadgets.com/hackrf/
GNU General Public License v2.0
6.46k stars 1.52k forks source link

Problem with band select #844

Closed watchix closed 3 years ago

watchix commented 3 years ago

Hi,

I'm having an issue with the band select ... it seems that HackRF don't select the band i suggested it.

In France FM band is 87,5MHz to 108MHz, no problem to receive/view/listen with #SDR or GQRX (Linux & Windows) But with HackRF i can receive FM radio before this band and after ...

As example : "JAZZ Radio" : 99,2 MHZ => This frequency is normal https://i.ibb.co/xJFLbBP/Jazz-Radio-OK.jpg

But at this frequency +20MHz i can hear the same FM station : "JAZZ Radio" : 119,2MHz => Not normal https://i.ibb.co/Q6tNm0Y/Jazz-Radio-PLUS-NOK.jpg

The same at 99,2 - 20Mhz : 79,2MHz : "JAZZ Radio" => Not normal. https://i.ibb.co/1nZfzgD/Jazz-Radio-Minus-NOK.jpg

With another SDR there is no problem ... FM Radios are in the right band (87.5 to 108MHz)

Tests : Differents OS and computer. Multiple reboot and different antenna on the HackRF.

Firmware Version: 2018.01.1 (API:1.02) libhackrf version: 2018.01.1 (0.5)

This HackRF is a recent buy with no modifications.

Regards,

watchix commented 3 years ago

Hi, I did a video/screen capture about the problem.

https://youtu.be/NfzjkGC7Ssw

Regards,

grvvy commented 3 years ago

That is strange, have you tried updating your firmware or host code from source?

watchix commented 3 years ago

Hi GraveJake,

Thanks for your reply, and so to "PassionRadio".

I've updated the SPI and CPLD with success (as i know) : No errors reported during compiling and transfer. But now the device it K.O ... My hosts are right updated (tested on 2 different OS (ArchLinux & Debian)

Before udates : [watchix-pc build]# hackrf_info hackrf_info version: git-f202160 libhackrf version: 2018.01.1 (0.5) Found HackRF Index: 0 Serial number: 00000000000000xxxxxxxx23 Board ID Number: 2 (HackRF One) Firmware Version: 2018.01.1 (API:1.02) Part ID Number: 0xa000cb3c 0x0064475a

After updated SPI & CPLD : watchix-pc sgpio_if]# hackrf_info hackrf_info version: git-f202160 libhackrf version: 2018.01.1 (0.5) Found HackRF Index: 0 Serial number: 00000000000000xxxxxxxx23 Board ID Number: 2 (HackRF One) Firmware Version: git-f202160 (API:1.04) Part ID Number: 0xa000cb3c 0x0064475a

[watchix@watchix-pc ~]$ hackrf_info hackrf_info version: git-f202160 libhackrf version: 2018.01.1 (0.5) Found HackRF Index: 0 Serial number: 00000000000000xxxxxxxx23 Board ID Number: 2 (HackRF One) Firmware Version: git-f202160 (API:1.04) Part ID Number: 0xa000cb3c 0x0064475a

[watchix@watchix-pc ~]$ hackrf_transfer -t /dev/zero call hackrf_set_sample_rate(10000000 Hz/10.000 MHz) call hackrf_set_hw_sync_mode(0) call hackrf_set_freq(900000000 Hz/900.000 MHz) Stop with Ctrl-C 0.0 MiB / 1.000 sec = 0.0 MiB/second

Couldn't transfer any bytes for one second.

Exiting... hackrf_is_streaming() result: HACKRF_TRUE (1) Total time: 1.00012 s hackrf_stop_tx() done hackrf_close() done hackrf_exit() done fclose() done exit

[watchix@watchix-pc ~]$ hackrf_transfer -r /dev/null -s 21500000 call hackrf_set_sample_rate(21500000 Hz/21.500 MHz) call hackrf_set_hw_sync_mode(0) call hackrf_set_freq(900000000 Hz/900.000 MHz) Stop with Ctrl-C 0.0 MiB / 1.000 sec = 0.0 MiB/second

Couldn't transfer any bytes for one second.

Exiting... hackrf_is_streaming() result: HACKRF_TRUE (1) Total time: 1.00020 s hackrf_stop_rx() done hackrf_close() done hackrf_exit() done fclose() done exit [watchix@watchix-pc ~]$ hackrf_info hackrf_info version: git-f202160 libhackrf version: 2018.01.1 (0.5) Found HackRF Index: 0 Serial number: 00000000000000xxxxxxxx23 Board ID Number: 2 (HackRF One) Firmware Version: git-f202160 (API:1.04) Part ID Number: 0xa000cb3c 0x0064475a

Regards,

grvvy commented 3 years ago

Thanks for providing more info, it looks like before updating your firmware you were using host tools from source. Could you try rolling back both your host tools and firmware to the latest release. Also, have you tried a different USB cable?

watchix commented 3 years ago

Hi GraveJake,

I rolled back as you suggest to the latest release (2018) The problem is still here.

I did a new video to expose the problem : https://youtu.be/fE7FgPdwqcc As you can see at the end of the video, there is a strange thing. The power level increase as i get closer from the 114.697MHz (sorry for my english it's late :laughing: )

Bellow some logs of my rolling back operation :

18 Mars 2021 - 01h50 RoolBack to 2018.01.1 (Host and Firmware) watchix-pc build]# make install [ 12%] Built target hackrf-static [ 25%] Built target hackrf [ 37%] Built target hackrf_debug [ 50%] Built target hackrf_info [ 62%] Built target hackrf_sweep [ 75%] Built target hackrf_cpldjtag [ 87%] Built target hackrf_spiflash [100%] Built target hackrf_transfer Install the project... -- Install configuration: "" -- Installing: /usr/local/lib/pkgconfig/libhackrf.pc -- Installing: /usr/local/lib/libhackrf.so.0.5.0 -- Up-to-date: /usr/local/lib/libhackrf.so.0 -- Up-to-date: /usr/local/lib/libhackrf.so -- Installing: /usr/local/lib/libhackrf.a -- Installing: /usr/local/include/libhackrf/hackrf.h -- Installing: /usr/local/bin/hackrf_transfer -- Set runtime path of "/usr/local/bin/hackrf_transfer" to "" -- Installing: /usr/local/bin/hackrf_spiflash -- Set runtime path of "/usr/local/bin/hackrf_spiflash" to "" -- Installing: /usr/local/bin/hackrf_cpldjtag -- Set runtime path of "/usr/local/bin/hackrf_cpldjtag" to "" -- Installing: /usr/local/bin/hackrf_info -- Set runtime path of "/usr/local/bin/hackrf_info" to "" -- Installing: /usr/local/bin/hackrf_debug -- Set runtime path of "/usr/local/bin/hackrf_debug" to "" -- Installing: /usr/local/bin/hackrf_sweep -- Set runtime path of "/usr/local/bin/hackrf_sweep" to "" [watchix-pc build]# ldconfig [watchix-pc build]# hackrf_info hackrf_info version: 2018.01.1 libhackrf version: 2018.01.1 (0.5) Found HackRF Index: 0 Serial number: 0000000000000000325866e621898e23 Board ID Number: 2 (HackRF One) Firmware Version: git-b112d18 (API:1.04) Part ID Number: 0xa000cb3c 0x0064475a [watchix-pc build]# rm * -rf [watchix-pc build]# cd ../ [watchix-pc host]# cd ../ [watchix-pc hackrf-2018.01.1]# ls COPYING doc firmware firmware-bin hardware host Readme.md RELEASENOTES TRADEMARK [watchix-pc hackrf-2018.01.1]# cd firmware-bin/ [watchix-pc firmware-bin]# ls hackrf_cpld_default.xsvf hackrf_jawbreaker_usb.bin hackrf_jawbreaker_usb.dfu hackrf_one_usb.bin hackrf_one_usb.dfu [watchix-pc firmware-bin]# hackrf_spiflash -v -w hackrf_one_usb.bin File size 22024 bytes. Erasing SPI flash. Writing 256 bytes at 0x000000. Writing 256 bytes at 0x000100. Writing 256 bytes at 0x000200. Writing 256 bytes at 0x000300. Writing 256 bytes at 0x000400. Writing 256 bytes at 0x000500. Writing 256 bytes at 0x000600. Writing 256 bytes at 0x000700. Writing 256 bytes at 0x000800. Writing 256 bytes at 0x000900. Writing 256 bytes at 0x000a00. Writing 256 bytes at 0x000b00. Writing 256 bytes at 0x000c00. Writing 256 bytes at 0x000d00. Writing 256 bytes at 0x000e00. Writing 256 bytes at 0x000f00. Writing 256 bytes at 0x001000. Writing 256 bytes at 0x001100. Writing 256 bytes at 0x001200. Writing 256 bytes at 0x001300. Writing 256 bytes at 0x001400. Writing 256 bytes at 0x001500. Writing 256 bytes at 0x001600. Writing 256 bytes at 0x001700. Writing 256 bytes at 0x001800. Writing 256 bytes at 0x001900. Writing 256 bytes at 0x001a00. Writing 256 bytes at 0x001b00. Writing 256 bytes at 0x001c00. Writing 256 bytes at 0x001d00. Writing 256 bytes at 0x001e00. Writing 256 bytes at 0x001f00. Writing 256 bytes at 0x002000. Writing 256 bytes at 0x002100. Writing 256 bytes at 0x002200. Writing 256 bytes at 0x002300. Writing 256 bytes at 0x002400. Writing 256 bytes at 0x002500. Writing 256 bytes at 0x002600. Writing 256 bytes at 0x002700. Writing 256 bytes at 0x002800. Writing 256 bytes at 0x002900. Writing 256 bytes at 0x002a00. Writing 256 bytes at 0x002b00. Writing 256 bytes at 0x002c00. Writing 256 bytes at 0x002d00. Writing 256 bytes at 0x002e00. Writing 256 bytes at 0x002f00. Writing 256 bytes at 0x003000. Writing 256 bytes at 0x003100. Writing 256 bytes at 0x003200. Writing 256 bytes at 0x003300. Writing 256 bytes at 0x003400. Writing 256 bytes at 0x003500. Writing 256 bytes at 0x003600. Writing 256 bytes at 0x003700. Writing 256 bytes at 0x003800. Writing 256 bytes at 0x003900. Writing 256 bytes at 0x003a00. Writing 256 bytes at 0x003b00. Writing 256 bytes at 0x003c00. Writing 256 bytes at 0x003d00. Writing 256 bytes at 0x003e00. Writing 256 bytes at 0x003f00. Writing 256 bytes at 0x004000. Writing 256 bytes at 0x004100. Writing 256 bytes at 0x004200. Writing 256 bytes at 0x004300. Writing 256 bytes at 0x004400. Writing 256 bytes at 0x004500. Writing 256 bytes at 0x004600. Writing 256 bytes at 0x004700. Writing 256 bytes at 0x004800. Writing 256 bytes at 0x004900. Writing 256 bytes at 0x004a00. Writing 256 bytes at 0x004b00. Writing 256 bytes at 0x004c00. Writing 256 bytes at 0x004d00. Writing 256 bytes at 0x004e00. Writing 256 bytes at 0x004f00. Writing 256 bytes at 0x005000. Writing 256 bytes at 0x005100. Writing 256 bytes at 0x005200. Writing 256 bytes at 0x005300. Writing 256 bytes at 0x005400. Writing 256 bytes at 0x005500. Writing 8 bytes at 0x005600. [watchix-pc firmware-bin]# cd ../firmware/cpld/sgpio_if [watchix-pc sgpio_if]# ls default.xsvf program README.md sgpio_if.xise top.jed top_tb.vhd top.ucf top.vhd [watchix-pc sgpio_if]# hackrf_cpldjtag -x default.xsvf File size 37629 bytes. LED1/2/3 blinking means CPLD program success. LED3/RED steady means error. Wait message 'Write finished' or in case of LED3/RED steady, Power OFF/Disconnect the HackRF. Write finished. Please Power OFF/Disconnect the HackRF. [watchix-pc sgpio_if]# hackrf_info hackrf_info version: 2018.01.1 libhackrf version: 2018.01.1 (0.5) Found HackRF Index: 0 Serial number: 0000000000000000325866e621898e23 Board ID Number: 2 (HackRF One) Firmware Version: 2018.01.1 (API:1.02) Part ID Number: 0xa000cb3c 0x0064475a [watchix-pc sgpio_if]# exit exit [watchix@watchix-pc ~]$ hackrf_info hackrf_info version: 2018.01.1 libhackrf version: 2018.01.1 (0.5) Found HackRF Index: 0 Serial number: 0000000000000000325866e621898e23 Board ID Number: 2 (HackRF One) Firmware Version: 2018.01.1 (API:1.02) Part ID Number: 0xa000cb3c 0x0064475a [watchix@watchix-pc ~]$ hackrf_cpldjtag -x^C [watchix@watchix-pc ~]$ cd [watchix@watchix-pc ~]$ hackrf_transfer -t /dev/zero call hackrf_set_sample_rate(10000000 Hz/10.000 MHz) call hackrf_set_freq(900000000 Hz/900.000 MHz) Stop with Ctrl-C 19.9 MiB / 1.000 sec = 19.9 MiB/second 19.9 MiB / 1.000 sec = 19.9 MiB/second ^CCaught signal 2 6.6 MiB / 0.324 sec = 20.2 MiB/second

Exiting... Total time: 2.32478 s hackrf_stop_tx() done hackrf_close() done hackrf_exit() done fclose(fd) done exit [watchix@watchix-pc ~]$ hackrf_transfer -r /dev/null -s 21500000 call hackrf_set_sample_rate(21500000 Hz/21.500 MHz) call hackrf_set_freq(900000000 Hz/900.000 MHz) Stop with Ctrl-C 38.5 MiB / 1.000 sec = 38.5 MiB/second 38.5 MiB / 1.000 sec = 38.5 MiB/second ^CCaught signal 2 5.8 MiB / 0.143 sec = 40.4 MiB/second

Exiting... Total time: 2.14311 s hackrf_stop_rx() done hackrf_close() done hackrf_exit() done fclose(fd) done exit [watchix@watchix-pc ~]$

Regards,

miek commented 3 years ago

I did a new video to expose the problem : https://youtu.be/fE7FgPdwqcc As you can see at the end of the video, there is a strange thing. The power level increase as i get closer from the 114.697MHz (sorry for my english it's late )

What you're seeing is aliasing. Because the HackRF's baseband filter rolls off gradually, strong signals just outside the visible band aren't always attenuated enough and so they "fold" back into band. That's why you see the power gradually reduce as you tune further away - the baseband filter is attenuating the signal more.

What you can do to minimise it, is adjust the receiver settings in GQRX. Rather than going with the automatic filter selection, you can set it manually with the Bandwidth setting. I'd recommend trying it out with the bandwidth set to half of the sample rate to see if that helps, and then you can tweak it from there for best results

watchix commented 3 years ago

Hi miek,

Thanks for this precision, i'll test your advice 😃 But for the moment it's not the main problem.

Regards,

watchix commented 3 years ago

Hi,

It seems that my problem is simmilar than spurius frequencies, but only from the FM band... I did some tests this night and i can hear some FM radios from 36MHz to 315MHz ... lol.

My antennas are near (1Km) of two FM broadcast towers (1kW to 1.5kW) I bought a FM band reject-filter (80MHz to 110MHz) to test if the problem still continue.

See you next week to test if the problem still occur with reject-filter.

Regards,

straithe commented 3 years ago

Did the reject-filter help or do you still need assistance?

watchix commented 3 years ago

Hi Straithe,

With the FM reject-filter it's better but i'm still seeing and listening some FM radio sound when i'm listening in LSB/USB/NFM in low or high frequencies (2 to 40MHz and 114 to 600MHz) I'm a little disappointed about this product. However with same antennas there is no problems with another cheap SDR like RTL-SDR (RTL2832U)

Regards.

mossmann commented 3 years ago

I'm certain that @miek is correct. The signal images evident in your screen captures are due to aliasing, a normal and expected phenomenon. You should be able to greatly reduce the power of those aliases by lowering the anti-aliasing filter bandwidth while maintaining a high sample rate. I recommend trying bandwidth of 2.5 MHz and sample rate of 20 Msps.

While rtl-sdr devices were designed with filtering and hardware configuration specifically tuned for FM broadcast usage, HackRF One is designed for more general use. There are configuration trade-offs in your control as a HackRF user that are not in your control as an rtl-sdr user. To learn more about aliasing and other things that can help you use your HackRF more effectively, I recommend watching my educational videos on SDR.