835552

14 回复 / 888 浏览

RTL2832作为成本最低的SDR接收设备，要是能够互相同步工作就可以开发出很多玩法，例如可以做成干涉式测向机或者MIMO多天线接收机之类的东西。RTL电视棒成本便宜，按照淘宝上50一个的价格组个有十几个单元的阵列也比一台HackRF便宜。于是上网查找到了如下的一些资料：

• RTL2832这个芯片没有公开的datasheet，RTL-SDR库的作者是对官方库进行逆向工程弄出RTL-SDR的。。 作者还透露了其他的一些信息:
Well, Realtek developed the driver themselves, so I'm pretty sure they just used their internal documentation that will probably never leave Realtek. The datasheet I've seen is more aimed at the people doing the layout of such DVB-T sticks, like pinout, power requirements etc. Some registers and the general USB commands are described as well, but that's about it.

(1) The USB interface is on-chip. The RTL2832U contains an 8051 core which handles the USB control side of things, like enumeration, I2C transfers, IR receiver, and a hardware FIFO which handles the bulk transfers. So the 8051 never sees the actual samples.

(2) Yes. In fact, the demodulator is a sub-chip on the die of the RTL2832U, and its registers are exposed via I2C. This I2C bus is shared, you can enable a repeater so that the tuner is 'attached' to the bus. Since you may need to communicate with the demodulator while receiving, you don't want to have the I2C activity leaking into the tuner as noise.

(3) Well, the point of librtlsdr is abstracting the whole dongle so it can be used with little to no knowledge of its inner workings. But all code in the tuner_*-files accesses the tuner, everything in librtlsdr.c accesses the RTL2832U + demod subchip. There is one exception, for the detection of the tuner we access it directly from librtlsdr.c.

(4) There is more to it. First of all, it depends if you use a zero-IF tuner like the E4000 or a low-IF tuner like the R820T. In the first case, both I and Q ADCs are used, in the second case only one of them is used. The ADCs sample the signal with a fixed rate of 28.8 MHz, which is then passed through a DDC (digital downconverter), a lowpass-filter and into a resampler (which then downsamples to our desired samplerate, 3.2 MHz at max.). The DDC only comes to play for low-IF tuners or the direct sampling mod, and it shifts and filters out the desired part of the spectrum, generating I/Q samples from real samples.

(5) You can look up quite a few registers in the Linux kernel driver I mentioned, but some things were figured out by playing around with it. I tried setting almost every bit in every register and see what happens. Most interesting things (like the counter mode that is used to check for lost samples in rtl_test) were figured out this way. I haven't seen it being mentioned anywhere else.

(6) Yes, just take a look at rtl_eeprom. It doesn't contain code, only parts of the USB descriptor, a few uninteresting settings, and the keymap for the infrared remote. What I did though, is dumping the maskrom of the RTL2832U which contains the 8051 code. Nothing really interesting in there, some USB initialization, reading the EEPROM, some IR-receiver-related stuff, the USB->I2C bridge and that's about it. And no, the code cannot be changed.

(7) Depends on which AGC. There's an AGC in the tuner, and a few more AGCs inside the RTL2832U: The RF-AGC, IF-AGC and DAGC. Both the RF-AGC and IF-AGC are disabled, since we control the gain of the tuner directly or let the tuner handle the gain control. They are only used for DVB-T reception so that the demodulator can generate an analog control voltage to control the tuner RF and IF gains to achieve the best SNR. The DAGC (Digital AGC) does nothing more than scaling the sample values, and is exposed through rtlsdr_set_agc_mode().

(8) This mode is used for the direct sampling mod, where you bypass the tuner and directly feed the RF signal to the ADC input. If enabled, the IF mode is activated and calls to rtlsdr_set_center_freq() actually set the IF frequency of the DDC. This can be used for HF-reception from 0 to 14.4 MHz.


• 虽然RTL-2832本身没有官方的公开datasheet，但是电视棒里常用的配合RTL2832使用的射频前端芯片R820T和E4000的手册都很容易找到，例如这是其中一页的框图

• 不过经过多次查找，还是找到了电视棒的框图和实际电路

少し前から、実験の為に、「DVB-T　DAB+FM」のドングルについて、回路図が必要でした。
すこしずつ回路をトレースしながら、水魚堂さまの「Bsch3V」の勉強を兼ねて、書き溜めてきました。
バイパスコンデンサは面倒なので書いてありませんが、かなり実用的になってきたので、皆様に間違いを指摘して頂けたらなと思い、公開することにしました。

まあ、硬い話はおいといて、間違いがあれば、教えてください。
まだ、回路的に変更すべき所もありそうです。



[修改于 9 个月前 - 2017-07-01 18:33:10]

ry7740kptv9 个月前 -2017-07-01 21:15835562

[修改于 9 个月前 - 2017-07-01 21:31:00]

ry7740kptv9 个月前 -2017-07-01 21:32835565

[修改于 9 个月前 - 2017-07-01 21:33:44]

ry7740kptv9 个月前 -2017-07-01 21:36835567

HackRF的上变频器RFFC5072最高6G，7.24G已经是超标应用饿了。。

panjun119 个月前 -2017-07-03 07:59835645

panjun118 个月前 -2017-07-07 23:43836083

[修改于 8 个月前 - 2017-07-09 01:26:15]

nkc production Server  https://github.com/kccd/nkc