added USB vendor/device ID for use with and without dvb drivers

* added vendor/manufacturer id 0x1209 and product id 0x2832,
  see http://pid.codes/howto/
idea is to use modified rtl-dongle for SDR
 - without having to blacklist dvb_usb_rtl28xxu,
 that another unmodified device could be used with dvb
* added options -M and -P to rtl_eeprom for modification of USB IDs

Signed-off-by: hayati ayguen <h_ayguen@web.de>
development
hayati ayguen 2018-11-06 19:36:17 +00:00
parent fd362261e5
commit 3b60de66c5
3 changed files with 24 additions and 2 deletions

View File

@ -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"

View File

@ -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" },

View File

@ -73,6 +73,8 @@ void usage(void)
"\t[-d device_index (default: 0)]\n"
"\t[-m <str> set manufacturer string]\n"
"\t[-p <str> set product string]\n"
"\t[-M <id> set manufacturer ID (aka vendor ID) in hexadecimal]\n"
"\t[-P <id> set product ID in hexadecimal]\n"
"\t[-s <str> set serial number string]\n"
"\t[-i <0,1> disable/enable IR-endpoint]\n"
"\t[-g <conf> generate default config and write to device]\n"
@ -85,7 +87,7 @@ void usage(void)
"\t[-w <filename> write dumped file to device]\n"
"\t[-r <filename> 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);