Reinstate Virtual Com Port after using libftdi on FT232RL

ε祈祈猫儿з 提交于 2019-12-11 13:58:55

问题


I'm trying to use libftdi to toggle some pins on an ft232rl, then use the regular Virtual Com Port (/dev/ttyUSB0). I've got a microcontroller (LPC1114) connected to an FT232RL for programming. To get it into ISP mode, it has to be reset with one line held low, and to execute code after programming, it has to be reset. I'm trying to automate this with the ft232. I've got libftdi working, and toggling pins correctly, but once the program finishes, the VCP has disappeared from /dev. Even using the libftdi example programs, I have to physically unplug and plug back in the USB cable, which completely defeats the purpose.

TL;DR: is there a way to get back /dev/ttyUSB0 after using libftdi in bitbang mode without unplugging the cable.


回答1:


LibFTDI seems to use LibUSB under the hood.

You clould try using libusb_attach_kernel_driver function from LibUSB to restore /dev/ttyUSBx functionality.



来源:https://stackoverflow.com/questions/38404997/reinstate-virtual-com-port-after-using-libftdi-on-ft232rl

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!