diff --git a/rtl-sdr.rules b/rtl-sdr.rules index b2f4054..28d9717 100644 --- a/rtl-sdr.rules +++ b/rtl-sdr.rules @@ -18,6 +18,9 @@ # original RTL2832U vid/pid (hama nano, for example) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2832", MODE:="0666" +# modified RTL2832U vid/pid .. not known to dvb modules +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2832", MODE:="0666" + # RTL2832U OEM vid/pid, e.g. ezcap EzTV668 (E4000), Newsky TV28T (E4000/R820T) etc. SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE:="0666" diff --git a/src/librtlsdr.c b/src/librtlsdr.c index 666b9d5..611e12e 100644 --- a/src/librtlsdr.c +++ b/src/librtlsdr.c @@ -349,6 +349,7 @@ static rtlsdr_dongle_t known_devices[] = { { 0x0ccd, 0x00d3, "Terratec Cinergy T Stick RC (Rev.3)" }, { 0x0ccd, 0x00d7, "Terratec T Stick PLUS" }, { 0x0ccd, 0x00e0, "Terratec NOXON DAB/DAB+ USB dongle (rev 2)" }, + { 0x1209, 0x2832, "Generic RTL2832U" }, { 0x1554, 0x5020, "PixelView PV-DT235U(RN)" }, { 0x15f4, 0x0131, "Astrometa DVB-T/DVB-T2" }, { 0x15f4, 0x0133, "HanfTek DAB+FM+DVB-T" }, diff --git a/src/rtl_eeprom.c b/src/rtl_eeprom.c index f562d73..da39618 100644 --- a/src/rtl_eeprom.c +++ b/src/rtl_eeprom.c @@ -73,6 +73,8 @@ void usage(void) "\t[-d device_index (default: 0)]\n" "\t[-m set manufacturer string]\n" "\t[-p set product string]\n" + "\t[-M set manufacturer ID (aka vendor ID) in hexadecimal]\n" + "\t[-P set product ID in hexadecimal]\n" "\t[-s set serial number string]\n" "\t[-i <0,1> disable/enable IR-endpoint]\n" "\t[-g generate default config and write to device]\n" @@ -85,7 +87,7 @@ void usage(void) "\t[-w write dumped file to device]\n" "\t[-r dump EEPROM to file]\n" "\t[-h display this help text]\n" - "\nUse on your own risk, especially -w!\n"); + "\nUse on your own risk, especially -w, -M and -P!\n"); exit(1); } @@ -255,6 +257,8 @@ int main(int argc, char **argv) FILE *file = NULL; char *manuf_str = NULL; char *product_str = NULL; + int manuf_id = 0; + int product_id = 0; char *serial_str = NULL; uint8_t buf[EEPROM_SIZE]; rtlsdr_config_t conf; @@ -264,7 +268,7 @@ int main(int argc, char **argv) int ir_endpoint = 0; char ch; - while ((opt = getopt(argc, argv, "d:m:p:s:i:g:w:r:h?")) != -1) { + while ((opt = getopt(argc, argv, "d:m:p:M:P:s:i:g:w:r:h?")) != -1) { switch (opt) { case 'd': dev_index = atoi(optarg); @@ -277,6 +281,14 @@ int main(int argc, char **argv) product_str = optarg; change = 1; break; + case 'M': + manuf_id = (int)strtol(optarg, NULL, 16); + change = 1; + break; + case 'P': + product_id = (int)strtol(optarg, NULL, 16); + change = 1; + break; case 's': serial_str = optarg; change = 1; @@ -375,6 +387,12 @@ int main(int argc, char **argv) if (product_str) strncpy((char*)&conf.product, product_str, MAX_STR_SIZE); + if (manuf_id > 0) + conf.vendor_id = manuf_id; + + if (product_id > 0) + conf.product_id = product_id; + if (serial_str) { conf.have_serial = 1; strncpy((char*)&conf.serial, serial_str, MAX_STR_SIZE);