project:gctx
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| project:gctx [2012/11/20 22:55] – [Limitations] jenda | project:gctx [2025/03/13 14:21] (current) – fix templatere plugin invocation root | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Graphic card transmitter ====== | ||
| + | |||
| + | Use graphic card as a software defined transceiver! | ||
| + | |||
| + | Maybe someone did it: https:// | ||
| + | |||
| + | {{template> | ||
| + | name=gctx| | ||
| + | image=EDITME| | ||
| + | sw=-| | ||
| + | hw=-| | ||
| + | founder=[[user: | ||
| + | interested=[[user: | ||
| + | status=active | ||
| + | }} | ||
| + | |||
| + | |||
| + | ===== Motivation ===== | ||
| + | |||
| + | Software defined receivers are pretty cheap now (rtl-sdr~200CZK~8USD), | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | ===== Goal ===== | ||
| + | |||
| + | Goal is to create GNU Radio sink, that will eat your data and transmit them. | ||
| + | |||
| + | ===== Transmitting arbitrary data (first try) ===== | ||
| + | |||
| + | We will create the signal in gnuradio, convert it to black-and-white images and then use ffmpeg to convert the images into video file. We then play this file with mplayer. | ||
| + | |||
| + | Obtain your pixel clock and resolution (from now on, resolution means htotal and vtotal) using xvidtune. | ||
| + | |||
| + | Create the following flowgraph. | ||
| + | |||
| + | {{ : | ||
| + | (audio is 2x oversampled -- the Complex to Real probably does not work with the I/Q samples as I expected) | ||
| + | |||
| + | Set the project sample rate to your actual pixel clock. | ||
| + | |||
| + | Run the flowgraph. It is slow (~10 MS/s). | ||
| + | |||
| + | Create file named " | ||
| + | < | ||
| + | P5 | ||
| + | your_x_resolution your_y_resolution | ||
| + | 255 | ||
| + | </ | ||
| + | |||
| + | Generate frames. | ||
| + | < | ||
| + | cat chn.raw | for i in `seq 1 560`; do ( cat head; head -c $(( 1712 * 1063 )) ) > frame$i.pgm; | ||
| + | </ | ||
| + | (change "1712 * 1063" for your resolution) | ||
| + | |||
| + | Generate video | ||
| + | < | ||
| + | ffmpeg -i frame%d.pgm -r 60 -crf 25 -preset ultrafast | ||
| + | </ | ||
| + | (adjust -r to your screen refresh rate) | ||
| + | |||
| + | Play the video in baseband | ||
| + | < | ||
| + | (on my machine, OpenGL output does not support vsync, xv output does. This is probably important) | ||
| + | |||
| + | Play the video on harmonics - we use video filter to introduce sharp edges into the signal. Unfortunately the spectrum is then pretty crap. | ||
| + | < | ||
| + | |||
| + | ===== Inspiration ===== | ||
| + | |||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * http:// | ||
| + | * http:// | ||
| + | |||
| + | |||
| + | ===== TODO ===== | ||
| + | * learn how GnuRadio works and how to write a simple sink for it | ||
| + | * switch on VGA output and make it display our picture without affecting other screens | ||
| + | * turn vsync and keep track how fast are frames being refreshed - learn SDL? :( | ||
| + | * split incoming signal into separate pictures | ||
| + | * display each picture for calculated time, generating the wanted signal | ||
| + | * make a [[http:// | ||
| + | |||
| + | ===== Limitations ===== | ||
| + | |||
| + | Highest pixel clock of a common graphic card could be around 200 MHz (1920x1200 at 85 Hz). This gives you ability to directly transmit up to ~50 MHz achieving reasonable signal quality. [[http:// | ||
| + | |||
| + | 2nd and 4th harmonic seem to be OK, 4th harmonic is weak, but still receivable on Baoveng UV-5R with default antenna. | ||
| + | ===== Transmitting power ===== | ||
| + | |||
| + | With a graphic card alone and ~20 cm of wire as an antenna the range is a few metres. HF amplifier will be necessary to do anything outside of the laboratory. | ||
| + | |||
| + | ===== Playing under Linux and X.org ===== | ||
| + | |||
| + | (tested on EEE 1005HA with Intel Mobile 945) | ||
| + | |||
| + | When no load is detected, graphic card turns the output off. Use [[http:// | ||
| + | |||
| + | [[http:// | ||
| + | |||
| + | We can boost pixelclock a little bit (172.8 MHz here)! | ||
| + | |||
| + | < | ||
| + | xrandr --newmode " | ||
| + | PIXELCLK HVIDEO HSYNCSTART | ||
| + | MHz | ||
| + | xrandr --addmode VGA1 shorths | ||
| + | xrandr --output VGA1 --mode " | ||
| + | </ | ||
| + | |||
| + | Search for " | ||
| + | |||
| + | Now the horizontal sync gap should be only 1 pixel wide. | ||
| + | |||
| + | TODO: Eliminate VBLANK in similar way. | ||
| + | |||