airspy / airspyone_firmware Goto Github PK
View Code? Open in Web Editor NEWAirSpy Firmware
Home Page: http://airspy.com
License: GNU General Public License v2.0
AirSpy Firmware
Home Page: http://airspy.com
License: GNU General Public License v2.0
Hi,
It fails here with:
$ make GENHDR include/libopencm3/lpc43xx/m0/irq.yaml ./scripts/irq2nvic_h:113: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. data = yaml.load(infile) GENHDR include/libopencm3/lpc43xx/m4/irq.yaml ./scripts/irq2nvic_h:113: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. data = yaml.load(infile) GENHDR include/libopencm3/lpc43xx/m0s/irq.yaml ./scripts/irq2nvic_h:113: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. data = yaml.load(infile) BUILD lib/lpc43xx/m4 CP libopencm3_lpc43xx.ld CC gpio.c make[1]: arm-none-eabi-gcc: No such file or directory make[1]: *** [../../Makefile.include:42: gpio.o] Error 127 make: *** [Makefile:67: lib/lpc43xx/m4] Error 2
I'm trying to update the firmware foe my AS. Looks like I have to build it first. What does this mean and how do I do it:
Add in environment variable PATH the path to Default Install: C:\Python27\
Thanks,
Demian
ps If this not the right way to flash most recent firmware, please direct me on how to do it.
Hi,
Would it be possible to include an official "build" of the firmware (.bin) for use with airspy_spiflash.bat in the git repository. This would allow those of us tinkering with the firmware to revert to the official build without having to re-compile the original source.
The other problem is that re-compiling locally will cause the local machines time and date to be included in the new build by the python scripts, so the locally built version won't be identical to the official release.
Cheers
Malcolm
ubuntu@ubuntu-iMac:~$ airspy_info
airspy_lib_version: 1.0.9
Found AirSpy board 1
Board ID Number: 0 (AIRSPY)
Firmware Version: AirSpy NOS v1.0.0-rc10-3-g7120e77 2018-04-28
Part ID Number: 0x6906002B 0x00000030
Serial Number: 0x260868C82A6A659B
Supported sample rates:
10.000000 MSPS
2.500000 MSPS
Close board 1
ubuntu@ubuntu-iMac:~$ wget https://github.com/airspy/airspyone_firmware/releases/download/v1.0.0-rc10-6/airspy_fw_v1.0.0-rc10-6-g4008185.zip
--2020-05-09 19:18:11-- https://github.com/airspy/airspyone_firmware/releases/download/v1.0.0-rc10-6/airspy_fw_v1.0.0-rc10-6-g4008185.zip
Resolving github.com (github.com)... 13.229.188.59
Connecting to github.com (github.com)|13.229.188.59|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/26932130/4bce9700-9121-11ea-8535-f3a43afbc4a2?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200509%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200509T111812Z&X-Amz-Expires=300&X-Amz-Signature=ee67437b08e82e6b8d8bfafc0c050e6de1e0ce126e0c8da1c41a8bd500ce1d1b&X-Amz-SignedHeaders=host&actor_id=0&repo_id=26932130&response-content-disposition=attachment%3B%20filename%3Dairspy_fw_v1.0.0-rc10-6-g4008185.zip&response-content-type=application%2Foctet-stream [following]
--2020-05-09 19:18:12-- https://github-production-release-asset-2e65be.s3.amazonaws.com/26932130/4bce9700-9121-11ea-8535-f3a43afbc4a2?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200509%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200509T111812Z&X-Amz-Expires=300&X-Amz-Signature=ee67437b08e82e6b8d8bfafc0c050e6de1e0ce126e0c8da1c41a8bd500ce1d1b&X-Amz-SignedHeaders=host&actor_id=0&repo_id=26932130&response-content-disposition=attachment%3B%20filename%3Dairspy_fw_v1.0.0-rc10-6-g4008185.zip&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.82.64
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.82.64|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 513217 (501K) [application/octet-stream]
Saving to: ‘airspy_fw_v1.0.0-rc10-6-g4008185.zip’
airspy_fw_v1.0.0-rc10-6 100%[==============================>] 501.19K 162KB/s in 3.1s
2020-05-09 19:18:16 (162 KB/s) - ‘airspy_fw_v1.0.0-rc10-6-g4008185.zip’ saved [513217/513217]
ubuntu@ubuntu-iMac:~$ unzip airspy_fw_v1.0.0-rc10-6-g4008185.zip
Archive: airspy_fw_v1.0.0-rc10-6-g4008185.zip
creating: airspy_fw_v1.0.0-rc10-6-g4008185/
inflating: airspy_fw_v1.0.0-rc10-6-g4008185/airspy.dll
inflating: airspy_fw_v1.0.0-rc10-6-g4008185/airspy_rom_to_ram.bin
extracting: airspy_fw_v1.0.0-rc10-6-g4008185/airspy_spiflash.bat
inflating: airspy_fw_v1.0.0-rc10-6-g4008185/airspy_spiflash.exe
extracting: airspy_fw_v1.0.0-rc10-6-g4008185/airspy_spiflash.txt
creating: airspy_fw_v1.0.0-rc10-6-g4008185/dfuprog_airspy/
inflating: airspy_fw_v1.0.0-rc10-6-g4008185/dfuprog_airspy/dfu-suffix.exe
inflating: airspy_fw_v1.0.0-rc10-6-g4008185/dfuprog_airspy/dfu-util.exe
inflating: airspy_fw_v1.0.0-rc10-6-g4008185/dfuprog_airspy/dfuprog_airspy.bat
inflating: airspy_fw_v1.0.0-rc10-6-g4008185/dfuprog_airspy/iram_dfu_util_spiflash.bin.hdr
inflating: airspy_fw_v1.0.0-rc10-6-g4008185/dfuprog_airspy/libusb-1.0.dll
inflating: airspy_fw_v1.0.0-rc10-6-g4008185/dfuprog_airspy/lpcdfu.exe
inflating: airspy_fw_v1.0.0-rc10-6-g4008185/libusb-1.0.dll
inflating: airspy_fw_v1.0.0-rc10-6-g4008185/pthreadVCE2.dll
ubuntu@ubuntu-iMac:~$ cd airspy_fw_v1.0.0-rc10-6-g4008185
ubuntu@ubuntu-iMac:~/airspy_fw_v1.0.0-rc10-6-g4008185$ airspy_spiflash -w airspy_rom_to_ram.binFile size 21556 bytes.
Erasing 1st 64KB in 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 52 bytes at 0x005400.
ubuntu@ubuntu-iMac:~/airspy_fw_v1.0.0-rc10-6-g4008185$ airspy_info
airspy_lib_version: 1.0.9
Found AirSpy board 1
Board ID Number: 0 (AIRSPY)
Firmware Version: AirSpy NOS v1.0.0-rc10-3-g7120e77 2018-04-28
Part ID Number: 0x6906002B 0x00000030
Serial Number: 0x260868C82A6A659B
Supported sample rates:
10.000000 MSPS
2.500000 MSPS
Close board 1
During the build of the firmware, I get this error:
sudo python get-pip.py Downloading/unpacking pip
Downloading pip-21.2.4.tar.gz (1.6MB): 1.6MB downloaded
Running setup.py (path:/tmp/pip_build_root/pip/setup.py) egg_info for package pip
Traceback (most recent call last):
File "", line 17, in
File "/tmp/pip_build_root/pip/setup.py", line 7
def read(rel_path: str) -> str:
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 17, in
File "/tmp/pip_build_root/pip/setup.py", line 7
def read(rel_path: str) -> str:
^
SyntaxError: invalid syntax
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/pip
Storing debug log for failure in /root/.pip/pip.log
I need arbitrary sample rate, your sample rate is so limited for our applications
Following instructions here: https://github.com/airspy/airspyone_firmware/wiki/Linux-how-to-flash-airspy-firmware
Side-note: It took me much longer than I expected to figure out the way to install 7za and then execute 7za x lpcdfu-1.02_src_linux_win32_airspy_fw_v1.0.0-rc4.7z
When executing (And disabling quiet), I get this:
# ./dfuprog.sh airspy_rom_to_ram.bin
Downloading algo...
dfu-util 0.11-dev
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 1fc9:000c
Device DFU version 0100
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0100
Device returned transfer size 2048
Warning: Overriding device-reported transfer size
Copying data from PC to DFU device
Download [=========================] 100% 13468 bytes
Download done.
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
dfu-util: can't detach
Resetting USB to switch back to Run-Time mode
Programming airspy_rom_to_ram.bin
DFU Not in IDLE state before command
main: PREPARE Done. Result = -107
main: EXIT Result=-107
Device is the AirSpy Mini.
Any ideas?
Last night I noticed this line in the function 'r820t_calibrate' in the source file 'common/r820t.c' (https://github.com/airspy/airspyone_firmware/blob/master/common/r820t.c#L634):
rc = r820t_write_reg_mask(priv, 0x0b, 0x08, 0x60);
If my understanding of the arguments for the function 'r820t_write_reg_mask()' is correct, either the value 0x08 or the mask 0x60 are not correct (or both), since the bit set by the value 0x08 is masked by 0x60.
Perhaps I am missing something here, but you may want to double check that that statement does what it is supposed to.
Franco
This has been at the back of my mind for a while, that two firmwares built by two people in different parts of the world, with the same tools, will get different checksums because the date that the binary was built was different. Included the date that the binary was built in a firmware is less useful than the date of the last commit in git. If 20 years from now, someone built the current firmware, having 2035-MM-DD as the date in the firmware version string would be less useful than seeing 2015-07-14.
Can the following line in firmware/scripts/airspy_fw-version.py
print '#define AIRSPY_FW_BUILD_DATE "' + date.today().isoformat() + '"'
be changed to something along the lines of the following:
print '#define AIRSPY_FW_CHECKIN_DATE "' + git.show(['--pretty=format:%ai']).partition(' ')[0] + '"'
and version_string in firmware/airspy_m0/airspy_m0.c be changed as well, to use AIRSPY_FW_CHECKIN_DATE instead of AIRSPY_FW_BUILD_DATE or whatever you decide.
Feel free to close this, and go "nope, not going to happen", I just watched the below CCC video and it made me think about the different hashes again, and it probably put me in the mood for a mad rant :)
https://media.ccc.de/browse/conferences/camp2015/camp2015-6657-how_to_make_your_software_build_reproducibly.html
Hi
I'm currently experiencing an error whilst attempting to build the firmware via the official instructions:
https://github.com/airspy/firmware/wiki/Linux-how-to-build-airspy-firmware
sudo python get-pip.py
Traceback (most recent call last): File "get-pip.py", line 17474, in <module> main() File "get-pip.py", line 17466, in main bootstrap(tmpdir=tmpdir) File "get-pip.py", line 17406, in bootstrap import pip File "/tmp/tmppOvIE5/pip.zip/pip/__init__.py", line 11, in <module> File "/tmp/tmppOvIE5/pip.zip/pip/vcs/mercurial.py", line 9, in <module> File "/tmp/tmppOvIE5/pip.zip/pip/download.py", line 22, in <module> File "/tmp/tmppOvIE5/pip.zip/pip/_vendor/requests/__init__.py", line 53, in <module> File "/tmp/tmppOvIE5/pip.zip/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py", line 70, in <module> AttributeError: 'module' object has no attribute 'PROTOCOL_SSLv3'
Environment:
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie
Is there a simple solution to resolve the above missing attribute error?
Hi,
I'm trying to build the firmware for my airspy mini. I've done it successfully in the past however the process no longer works:
sudo pip3 install yamly Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting yamly Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/yamly/
GitPython installs if I use python3 rather than python2 as their project page says that it now requires => python3.4
airspy_spiflash.exe requires msvcr100.dll, which despite several hours of searching and installing I have not been able to locate. Please provide a link to the required installer or rebuild airspy_spiflash.exe with a more recent redistributable requirement?
Wouldn't it be better to convert libopencm3 into a submodule (like in the HackRF firmware) to make sure it tracks upstream changes?
Hello,
Seems something is broken on last Ubuntu :
Linux 4.10.0-30-generic #34-Ubuntu SMP Mon Jul 31 19:38:17 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Once device is plugged i have a module crash over Airspy.
I do a complete delete of media / staging/media & recompiled all modules, but after a reboot , i have the same error / crash.
I use the kernel installed by default on last ubuntu , but i installed media driver ( DVB ) from luis to get TBS card opensource working.
[ 2.422405] WARNING: You are using an experimental version of the media stack.
As the driver is backported to an older kernel, it doesn't offer
enough quality for its usage in production.
Use it with care.
Latest git patches (needed if you report a bug to [email protected]):
7c2f212f4a7f6d898190e36a7787184c73dddfad add to visit 24cxx on tbs6301
Any advice ?
GitPython made a change on the 12th of January in version 0.3.5 see: gitpython-developers/GitPython#255
To work around this in scripts/airspy_fw-version.py I have changed
"git=Repo().git"
to:
"git=Repo(search_parent_directories=True).git"
And this fixed the problem for me.
Before the change this was the error message I was getting:
root@bananapi ~/src/airspy/firmware (git)-[master] # make
for i in airspy_m0 airspy_m0s airspy_rom_to_ram; do
if [ -d $i ]; then
printf " BUILD $i\n";
make -C $i || exit ;
fi;
done
BUILD airspy_m0
make[1]: Entering directory '/root/src/airspy/firmware/airspy_m0'
echo Creating airspy_m0.hdr
Creating airspy_m0.hdr
python ../scripts/airspy_fw-version.py ./airspy_m0.hdr
Traceback (most recent call last):
File "../scripts/airspy_fw-version.py", line 14, in
git=Repo().git
File "/usr/local/lib/python2.7/dist-packages/git/repo/base.py", line 162, in init
raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: /root/src/airspy/firmware/airspy_m0
../common/Makefile_M0_inc.mk:138: recipe for target 'airspy_m0.hdr' failed
make[1]: *** [airspy_m0.hdr] Error 1
make[1]: Leaving directory '/root/src/airspy/firmware/airspy_m0'
Makefile:38: recipe for target 'airspy_fw' failed
make: *** [airspy_fw] Error 2
2 root@bananapi ~/src/airspy/firmware (git)-[master] #
When connecting the AS R2 to a Linux VM (VMware Workstation 14), lsusb produces this output:
root@ubuntu:/home/test# lsusb
Bus 001 Device 008: ID 1d50:60a1 OpenMoko, Inc. Airspy
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
When trying airspy_info, the device is not found:
root@ubuntu:/home/test# airspy_info
airspy_lib_version: 1.0.9
airspy_open() board 1 failed: AIRSPY_ERROR_NOT_FOUND (-5)
Lastly, lsusb -v produces this:
root@ubuntu:/home/test# lsusb -v
Bus 001 Device 008: ID 1d50:60a1 OpenMoko, Inc. AirspyDevice Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1d50 OpenMoko, Inc.
idProduct 0x60a1 Airspy
bcdDevice 1.00
iManufacturer 1 (error)
iProduct 2 (error)
iSerial 3 (error)
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0020
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
cannot read device status, Resource temporarily unavailable (11)
When disconnecting the device from the VM back to Windows, it will also not work in Windows until unplugged and reconnected.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.