[Hackrf-dev] DVB-T and DVB-T2
Tom
vsboost at hotmail.com
Tue Jun 30 21:45:12 EDT 2015
Thanks Simon,
I get strange issues using the script, below is when i use it on Ubuntu 15, mind you i have no problems using the hackrf on this system
with all tools i.e. hackrf_info, hackrf_transfer, gnuradio
I am using the test.ts file that comes with gr-dvbt
./dvbt-hackrf_tx_sk.py test.ts
linux; GNU C++ version 4.9.2; Boost_105500; UHD_003.009.git-189-g6b64d9bb
Inner_coder: d_k: 1, d_n: 2, d_m: 2
Inner_coder: d_noutput: 1512, d_ninput: 1
DVBT map, d_constellation_size: 4
DVBT map, d_step: 2
DVBT map, d_alpha: 1
DVBT map, d_gain: 0.707107
DVBT map, constellation points[0]: re: 1, imag: 1, bits: 0
DVBT map, constellation points[1]: re: 1, imag: -1, bits: 1
DVBT map, constellation points[2]: re: -1, imag: 1, bits: 2
DVBT map, constellation points[3]: re: -1, imag: -1, bits: 3
d_Kmin: 0
d_Kmax: 1704
d_fft_length: 2048
d_payload_length_length: 1512
d_zeros_on_left: 172
d_zeros_on_right: 171
d_cp_length: 64
Using Volk machine: avx_64_mmx
gr-osmosdr v0.1.4-45-g46e95395 (0.1.5git) gnuradio v3.7.7.1-178-gd5cea6e4
built-in sink types: uhd hackrf
Number of USB devices: 10
USB device 1d50:6089:
FATAL: Failed to open HackRF device (-5) HACKRF_ERROR_NOT_FOUND
Trying to fill up 1 missing channel(s) with null sink(s).
This is being done to prevent the application from crashing
due to gnuradio bug #528.
gr::buffer::allocate_buffer: warning: tried to allocate
43 items of size 1504. Due to alignment requirements
128 were allocated. If this isn't OK, consider padding
your structure to a power-of-two bytes.
On this platform, our allocation granularity is 4096 bytes.
gr::buffer::allocate_buffer: warning: tried to allocate
40 items of size 1632. Due to alignment requirements
128 were allocated. If this isn't OK, consider padding
your structure to a power-of-two bytes.
On this platform, our allocation granularity is 4096 bytes.
gr::buffer::allocate_buffer: warning: tried to allocate
43 items of size 1512. Due to alignment requirements
512 were allocated. If this isn't OK, consider padding
your structure to a power-of-two bytes.
On this platform, our allocation granularity is 4096 bytes.
gr::buffer::allocate_buffer: warning: tried to allocate
43 items of size 1512. Due to alignment requirements
512 were allocated. If this isn't OK, consider padding
your structure to a power-of-two bytes.
On this platform, our allocation granularity is 4096 bytes.
gr::buffer::allocate_buffer: warning: tried to allocate
43 items of size 1512. Due to alignment requirements
512 were allocated. If this isn't OK, consider padding
your structure to a power-of-two bytes.
On this platform, our allocation granularity is 4096 bytes.
gr::buffer::allocate_buffer: warning: tried to allocate
5 items of size 12096. Due to alignment requirements
64 were allocated. If this isn't OK, consider padding
your structure to a power-of-two bytes.
On this platform, our allocation granularity is 4096 bytes.
If i run the script with sudo
sudo ./dvbt-hackrf_tx_sk.py test.ts
Traceback (most recent call last):
File "./dvbt-hackrf_tx_sk.py", line 18, in <module>
from gnuradio import blocks
ImportError: No module named gnuradio
Below is when i try the script on a different machine running Kali Linux, again all other hackrf tools and gnuradio work.
root at kali:~/Downloads/gr-dvbt/apps# ./dvbt-hackrf_tx_sk.py test.ts
linux; GNU C++ version 4.7.2; Boost_105300; UHD_003.009.git-171-g51bc00ee
Inner_coder: d_k: 1, d_n: 2, d_m: 2
Inner_coder: d_noutput: 1512, d_ninput: 1
python: /root/pybombs/src/gr-dvbt/lib/inner_coder_impl.cc:168: gr::dvbt::inner_coder_impl::inner_coder_impl(int, int, gr::dvbt::dvbt_constellation_t, gr::dvbt::dvbt_hierarchy_t, gr::dvbt::dvbt_code_rate_t): Assertion `d_ninput % 1' failed.
Aborted
From: HackRF-dev [mailto:hackrf-dev-bounces at greatscottgadgets.com] On Behalf Of Simon Kennedy
Sent: Wednesday, 1 July 2015 7:58 AM
To: hackrf-dev at greatscottgadgets.com
Subject: Re: [Hackrf-dev] DVB-T and DVB-T2
I feel slightly embarrassed as I subscribed to this list using an email address that is redirected to my main email, so consequently replies sent from my main email address were not coming from the correct address. Hence, none of the replies I posted have been seen on the list. Oops!
Here is my reply about this thread:
Hi Craig,
Check out Clayton's web page (who created the sdr-examples you refer to) <http://www.irrational.net/2014/03/02/digital-atv/> here
I amended his BladeRF script and I have put my HackRF version here <https://www.dropbox.com/s/bdnzoa0kn01dfav/dvbt-hackrf_tx_sk.py?dl=0> for download
My version transmits DVB-T on the lowest Freeview channel in the UK at 474MHz (obviously only while using a dummy load). I successfully received the transmission of my webcam image this way using an RTL-SDR dongle.
The command I used was very heavily influenced (ok, basically copied) from Clayton's examples:
avconv -f alsa -i hw:0,0 -f video4linux2 -s 640x480 -i /dev/video0 -vf drawtext=fontfile=/usr/share/fonts/truetype/freefont/FreeMonoBold.ttf:text="TEST ":x=440:y=420:fontsize=48:fontcolor=white at 0.6:box=1:boxcolor=black at 0.4 -vcodec mpeg2video -r 60 -b 2000000 -acodec mp2 -ar 48000 -ab 48000 -ac 2 -mpegts_transport_stream_id 1025 -mpegts_service_id 1 -mpegts_pmt_start_pid 4096 -mpegts_start_pid 400 -f mpegts -y in.fifo
I used a standard web cam to capture the image, sent the output to a fifo file (in.fifo) and consumed the output through the python program with the command:
./dvbt_hackrf_tx_sk.py in.fifo
The fifo file can be created using the command mkfifo in.fifo
Run the avconv command and the python program in the same directory as you created the fifo file in.
I have also transmitted DVB-S which I have documented on my blog here <http://photohamrad.blogspot.co.uk/2015/06/transmitting-video-with-hackrf-blue.html>
Simon.
On 30 June 2015 at 17:35, Simon Kennedy <simon at thekennedys.info <mailto:simon at thekennedys.info> > wrote:
Can you tell us the command you used to get this error please.
I remember that I got a smilar error but cannot look up how I solved it until I get home in a couple of hours.
The key point is that the program is trying to open a UDP port to receive the data and error relates to the asignment of the argument you supply to the program to the variable 'port' in the program.
Simon.
On 30 June 2015 at 16:49, Craig Barber <radiocraig28 at gmail.com <mailto:radiocraig28 at gmail.com> > wrote:
Here's the error I get:
Traceback (most recent call last):
File "./dvbt-hackrf.py", line 123, in <module>
main(sys.argv[1:])
File "./dvbt-hackrf.py", line 31, in main
port = int(args[0])
ValueError: invalid literal for int() with base 10: 'testdvbt'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist9.pair.net/pipermail/hackrf-dev/attachments/20150701/ad777688/attachment.html>
More information about the HackRF-dev
mailing list