Portapack application development tutorial (1) Introduction, compilation, burning and Hello World

I used Portapack when I did the GPS receiving experiment of LimeSDR before, it can transmit GPS signals:

https://blog.csdn.net/shukebeta008/article/details/103270214

When testing the direction finding function of KerberosSDR, I also use Portapack to transmit a single tone signal:

https://www.bilibili.com/video/av78385598?from=search&seid=9727676114121593493

Portapack is small in size. Although the computer + sdr can also transmit test signals, it is very convenient for this kind of transmission requirements that require frequent exercise. More than that, it has no boot process and no need to enter commands. It is quite convenient to use outdoors.

Portapack itself has many functions, such as receiving adsb signals, tpms signals, listening to AM and FM broadcasts, transmitting FM signals, sweeping frequencies, etc.:

https://www.bilibili.com/video/av75970840?from=search&seid=12318126195803131787

Other functions reference:

https://www.rtl-sdr.com/a-review-of-the-hackrf-portapack-with-havok-firmware/

Its principle is to directly perform signal processing on the hackrf's onboard arm chip, so that for some applications with a small amount of calculation, it can be separated from the computer and implemented directly on portapack+hackrf.

The previously used gridrf version of the firmware has GPS launch function, but it is not open source. The other parts of this firmware are actually very old and can't keep up with the latest development of portapack firmware, so I plan to write a similar program by myself. You can see the screenshot of the latest version of the main interface below. Now it’s all grids and you can touch and click directly. The main interface of the previous old version (that is, the version used by gridrf) is line by line like the upper left corner of the previous screenshot. , More than that, some specific transceiver modules are also constantly being updated.

Since portapack programs are all running on hackrf's arm chip, it is also useful for deep understanding of the development of hackrf onboard firmware. In the later period, I may also modify the AM demodulation module and use it to display analog video. The original AM demodulation is only demodulated audio, but analog video is also an AM signal. The amplitude value of AM is used to represent the brightness of each pixel.

The portapack firmware is developed by two organizations, one is developed by the hardware designer himself, the author is Jared Boone, and the other is the havoc firmware developed by furrtek, which has many functions.

The gridrf version mentioned earlier is actually slightly modified on the havoc firmware, and its gps launch function is actually similar to the replay function in the havoc firmware. It's just that replay transmits a 16-bit iq signal with a sampling rate of 500kHz, while gps transmission needs to transmit an 8-bit iq signal. The sampling rate is usually 2.6MHz (I use 2MHz).

What we are going to do now is equivalent to writing an app for portapack.

Visit this github address first

https://github.com/furrtek/portapack-havoc

This is the project folder of portapack. It contains all the code. There are also compiling and burning steps in the wiki. It is not difficult to follow the steps.

Compile: https://github.com/furrtek/portapack-havoc/wiki/Building-from-source

Burning: https://github.com/furrtek/portapack-havoc/wiki/Flashing

The code files we want to change are all under firmware.

Before adding modules, you can try to change the code on a relatively simple interface and try the development process.

Open the following file 

/firmware/application/apps/ui_about.hpp

There is a part of this code. 

const credits_t credits[25] = {
		//           012345678901234567890123456789
		{ 60,		"PortaPack|HAVOC",					0 },
		{ 4 * 8,	    "Version " VERSION_STRING,		16 },
		{ 11 * 8,	           "Gurus  J. Boone",		0 },
		{ 18 * 8,	                  "M. Ossmann",		16 },
		{ 11 * 8,	           "HAVOC  Furrtek",		16 },
		{ 7 * 8,	       "POCSAG rx  T. Sailer",		0 },
		{ 18 * 8,	                  "E. Oenal",		16 },
		{ 0 * 8,	"Radiosonde infos  F4GMU",			0 },
		{ 18 * 8,	                  "RS1729",			16 },
		{ 4 * 8,	    "RDS waveform  C. Jacquet", 	16 },
		{ 7 * 8,	       "Xy. infos  cLx", 			16 },
		{ 2 * 8,	  "OOK scan trick  Samy Kamkar",	16 },
		{ 7 * 8,	       "World map  NASA", 			16 },
		{ 0 * 8,	"TouchTunes infos  Notpike",		16 },
		{ 4 * 8,	    "Subaru infos  Tom",			0 },
		{ 18 * 8,	                  "Wimmenhove",		24 },
		{ 6 * 8,	      "Thanks & donators",			16 },
		{ 1 * 8,	 "Rainer Matla     Keld Norman",	0 },
		{ 1 * 8,	 " Giorgio C.         DC1RDB",		0 },
		{ 1 * 8,	 " Sigmounte           Waax",		0 },
		{ 1 * 8, 	" Windyoona         Channels",		0 },
		{ 1 * 8, 	"   F4GEV             Pyr3x",		0 },
		{ 1 * 8,    "  HB3YOE",							24 },
		{ 11 * 8,	            "MMXVIII",				-1 }
	};

These codes will be scrolled and displayed when you open the about page in portapack. You can change the contributor text inside to any text you want to display.

After the modification, you can compile, refer to the compiling and downloading steps in the wiki:

#编译 先退到这个项目最上层文件夹
mkdir build
cd build
cmake ..
make firmware -j4

#下载
cd /build/firmware
hackrf_spiflash -w portapack-h1-havoc.bin #做这一步之前要把portpack切换为hackrf模式

 After the download is complete, press the reset button on hackrf and re-enter the portpack. You can see the results of the changes on the About page.

The following is the effect of my change, adding my own signature on the penultimate line.

 

Attach the software and hardware principle reference of portapack:

Firmware structure: https://github.com/sharebrained/portapack-hackrf/wiki/Firmware-Architecture

Boot process: https://github.com/sharebrained/portapack-hackrf/wiki/Boot-Process

Hardware: https://github.com/sharebrained/portapack-hackrf/wiki/Hardware

Guess you like

Origin blog.csdn.net/shukebeta008/article/details/104303466