Quectel_LTE&5G_USB_Driver_V2.1.zip

所需积分/C币:50 2020-02-21 21:04:53 10.29MB ZIP
138
收藏 收藏
举报

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 ../../devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1:1.0/ttyUSB0/tty/ttyUSB0 pchar = strstr(syspath, ":1.0/tty"); //MDM if (pchar == NULL) { pchar = strstr(syspath, ":1.2/tty"); //ASR 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);

...展开详情
立即下载 身份认证后 购VIP低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
  • 分享宗师

关注 私信
上传资源赚钱or赚积分
最新推荐
Quectel_LTE&5G_USB_Driver_V2.1.zip 50积分/C币 立即下载
1/0