VGAtoBaseband: Unterschied zwischen den Versionen

Aus LaborWiki
Wechseln zu: Navigation, Suche
(more documentation)
(+doku)
Zeile 61: Zeile 61:
== Arguments ==
== Arguments ==


  ./vgatoiqbaseband inputfile [OPTIONS]
  ./vgatoiqbaseband inputfile [ARGS]


if inputfile isn't specified, use -t argument
if inputfile isn't specified, use -t argument


OPTIONS can be:
ARGS could be:
  -nofilter        disable fragmentshader
  -nofilter        disable fragmentshader
  -v              be verbose
  -v              be verbose
Zeile 108: Zeile 108:


== TODO ==
== TODO ==
Windows modesetting support
*Windows modesetting support
 
** You may use a custom edid, see here for more details [[HackingVGAforFun]].
== deprecated ==
'''xrandr'''
To do so use xrandr:<br>
xrandr --newmode "MODE1"  64.00  1400 1400 1401 1401 700 700 702 702 -hsync -vsync
xrandr --addmode VGA-0 "MODE1"
xrandr --output VGA-0 --mode "MODE1" --right-of LVDS
 
note: VGA-0 may not apply, it could be VGA1 or VGA too, depending on the driver.<br>
note: the last command assumes LVDS to be your primary active connector, change depending on your system.
 
'''Xorg.conf'''
Add a ModeLine to your Xorg.conf.
Section "Monitor"
        Identifier      "SyncMaster"
        Option          "VGA-0"
        HorizSync      30-96
        VertRefresh    50-160
        ModeLine        "MODE1" 64.00  1400 1400 1401 1401 700 700 702 702
EndSection
 
'''EDID'''
You may use a custom edid, see here for more details [[HackingVGAforFun]].


== Links ==
== Links ==
Zeile 137: Zeile 115:
* http://bk.gnarf.org/creativity/vgasig/
* http://bk.gnarf.org/creativity/vgasig/
* http://www.sevenforums.com/tutorials/7947-force-dvi-hdmi-resolutions-refresh-rates-4.html
* http://www.sevenforums.com/tutorials/7947-force-dvi-hdmi-resolutions-refresh-rates-4.html
[[Category:HowTo]]

Version vom 6. März 2013, 11:37 Uhr

         
VGAtoBaseband

Release status: experimental [box doku]

Description use the VGA port to generate I/Q baseband signals
Author(s)  siro
Last Version  0.1 ()
Platform  Evil Hack
License  GPL
Download  [1]




Requirements

  • PC with VGA adapter
  • OpenGL with Direct Redering
  • Vsync enabled
  • Software-defined Radio Transmitter that generates I/Q Signals
  • GL_ARB_fragment_program to use the low-pass filter
  • GL_ARB_pixel_buffer_object for efficient CPU to GPU transfers

Linux

  • Mesa 9.0 (other drivers are untested)
  • X-server

Windows

  • Windows XP doesnt work out of the box
  • other OS are untested
  • it is possible to add custom edids / modelines, but that's rather a hack

Software

This software generates analog I/Q Signals that can be feed into a rf-modulator. The current version runs on any symbolrate, recommended are 5MSymbols/s or more.
You need to set the DAC clock to 7*desired MSymbols per second,because low pixel clocks might not work and high pixel clocks can be scaled down by using multiple pixel per Msymbol (here 7).

Every symbol is a complex number, that contains an I (real) and Q (imag) value.
By default the signal is lowpass filtered using convolutional sinc function. To edit the impulse response edit the file fragment.glsl. The I/Q values are feed using a unix fifo / a file. 8 byte form two 32bit floats, the first float maps to I, the second to Q. The values have to be between 0.0f and 1.0f. The real part (I) is assigned to the RED and the imag part (Q) to the GREEN channel, while the BLUE channel is set to 0.5f. 8bit and 10bit VGA Graphic cards are supported.

vgatobaseband uses the first VGA output found. If none is found it terminates. The VGA output has to be configured first using xrandr, arandr, ....
The coordinates are saved, a new modeline is added and set. On termination the modeline is removed and the initial mode is restored.
No need to do any modesetting by hand !!!

Examples

./vgatoiqbaseband /tmp/myfifo -v -msps 56 -cutofright 0 -cutofbottom 0

This will read from the file /tmp/myfifo, pixelclk is 56Mhz, it will output 56/7 = 8 MSPS, set HSYNC to 0 and VSYNC to 0.
0 VSYNC might only work on Intel GPU.

./vgatoiqbaseband -v -t

This will generate test paterns, pixelclk is 64Mhz, it will output 64/7 = 9.142 MSPS, set HSYNC to 1 and VSYNC to 2.
It might work on all GPUs.

Arguments

./vgatoiqbaseband inputfile [ARGS]

if inputfile isn't specified, use -t argument

ARGS could be:

-nofilter        disable fragmentshader
-v               be verbose
-verbose         be verbose
-cutofright <n>  cutof n rightmost pixels (hsync)
                 default:  1
-cutofbottom <m> cutof m bottommost pixels (vsync)
                 default:  2
-display DISPLAY Specify the X server to connect to. If not specified, the value of the DISPLAY environment variable is used. 
-direct          force direct rendering
-t               generates test patterns
-msps <x>        use a pixelclock of x Mhz
                 default: 64

Libraries

  • freeglut3-dev
  • libglu1-mesa-dev
  • libgl1-mesa-dev
  • libxrandr-dev

OFDM Bandwidth

OFDM useful carriers to total carriers ratio: 1705 / 2048 = 0.832

DAC clock [Mhz] Msymbols/s carrier ratio Bandwidth
64 9.14285 0.832 7.61
56 8.000 0.832 6.66
48 6.8571 0.832 5.71

TODO

  • Windows modesetting support

Links