
Quectel_LTE_and_5G_USB_Driver_V2.1.zip
5星
- 浏览量: 0
- 大小:None
- 文件类型:None
简介:
该文件为 Quectel LTE 和 5G USB 驱动程序版本 2.1 的安装包,适用于需要更新或安装相关驱动以支持蜂窝网络连接的设备。
```c
char syspath[255];
char sysport[64];
int count;
char *pchar = NULL;
int fd = 0;
memset(idVendor, 0x00, 5);
memset(idProduct, 0x00, 5);
memset(bNumInterfaces, 0x00, 5);
snprintf(sysport, sizeof(sysport), /sys/class/tty/%s, &ttyport[strlen(/dev/)]);
count = readlink(sysport, syspath, sizeof(syspath) - 1);
if (count < strlen(:1.0/tty))
return;
pchar = strstr(syspath, :1.0/tty);
if (pchar == NULL)
{
pchar = strstr(syspath, :1.2/tty);
g_is_asr_chip = (pchar != NULL);
}
if (pchar == NULL)
{
qlog_dbg(%s is not a usb-to-serial device?\n, ttyport);
return;
}
*pchar = \0;
while (*pchar != /)
pchar--;
strcpy(sysport, pchar + 1);
snprintf(syspath, sizeof(syspath), /sys/bus/usb/devices/%s/idVendor, sysport);
fd = open(syspath, O_RDONLY);
if (fd <= 0)
{
qlog_dbg(Fail to open %s, errno: %d (%s)\n, syspath, errno, strerror(errno));
return;
}
read(fd, idVendor, 4);
close(fd);
```
全部评论 (0)


