usb

CubeMX-generated USB HID device sends wrong data when both endpoint and PMA address are changed

可紊 提交于 2020-02-04 03:47:26
问题 I'm debugging a problem with a composite device that I'm creating, and have recreated the issue in freshly-CubeMX-generated HID-only code, to make it easier to resolve. I've added small amount of code to main() to let me send USB HID mouse-clicks, and flash an LED, when the blue-button is pressed. ... uint8_t click_report[CLICK_REPORT_SIZE] = {0}; extern USBD_HandleTypeDef hUsbDeviceFS; ... int main(void) { ... while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ if(HAL_GPIO_ReadPin

Installation and emulation of virtual USB Device

人走茶凉 提交于 2020-02-01 06:33:45
问题 I already read Creating a Virtual USB Device and Virtual USB device about creating a virtual USB Device. I am familiar with the Plug and Play handling by Windows as well as the driver mechanism. So far I understood that first of all I would have to create another device driver which is used for the virtual USB device. But I am still lost on the point what actually is the virtual device. How would I control the behaviour of my virtual device? Background: I develop a software which acts as a

Android Usb Host Receive Data

核能气质少年 提交于 2020-01-29 09:16:11
问题 I try to reading data from my evalboard. It is Stellaris EKK-LM4F232 Evalutaion Kit. It has five buttons. I push a button on board and send data to my android device. For example, i push one times, and board send to 1, and second times send to 2.... I receive the first value (it mean 1) from android device when i push the button first time. But when i push the button again, i can't receive any other values like 2 ,3 ,4 ,... . Here is my code for reading. It read continuously when it is start.

Block USB devices by class GUID to prevent access? [duplicate]

丶灬走出姿态 提交于 2020-01-26 03:57:06
问题 This question already exists : How to block USB devices to prevent from read/write Access? [closed] Closed 14 days ago . I am making a module to block USB devices so that users can not read/write when plugged into computer. I know we can block USB port by changing in registry but other users can also make changes into it. I want to block USB devices same way like Antivirus/Seqrite does. so any way to do in c/c++ Thanks. 来源: https://stackoverflow.com/questions/59692478/block-usb-devices-by

USB Permissions not received by Broadcast receiver

百般思念 提交于 2020-01-25 10:15:11
问题 Good evening community, I am reaching with the hopes of being educated about the following problem. My intention with this code is to be able to handle USB permission intents in a receiver registered in a manifest file. The receiver gets USB Attached and detached actions, but not USB permissions when the user either accepts or declines the prompt. Here is the code for the manifest, receiver and an activity to send the permissions request to the USB manager. And Finally, my target SDK is 28.

PyUSB device claimed, detach_kernel_driver return Entity Not Found

╄→гoц情女王★ 提交于 2020-01-25 03:45:27
问题 I'm attempting to do bulk reads and writes from a USB device on Ubuntu using PyUSB. However, i've been unsuccessful at getting that far. import usb.core import usb.util dev = usb.core.find(idVendor=0xXXXX,idProduct=0xYYYY) if dev is None: raise ValueError('Device not found.') try: dev.detach_kernel_driver(0) except: print "exception dev.detach_kernel_driver(0)" pass dev.set_configuration() print "all done" This is the simple script I'm using. I've created /etc/udev/rules.d/40-basic-rules

How to Read a certificate from Usb Token(etoken pro 72 k(Java) )and attach to pdf

早过忘川 提交于 2020-01-25 03:45:10
问题 I want to read the signature from Usb token safenet (alladin etoken pro 72 k(Java)) and attach to pdf. I dont know how to do this. In previously they given an option to export .pfx file. Now they are giving an option to export .cer file. When i googled i get this code. When i run this code works it prompts the password of the token after enter the password i can able to verify the signature but i dont know how to attach the signature to the pdf. please guide me whether i am in correct

USB_DEVICE_ATTACHED Intent not firing

不羁的心 提交于 2020-01-19 04:46:38
问题 Has anyone out there been able to get the android.hardware.usb.action.USB_DEVICE_ATTACHED" to work? Ok so i'm trying to use the new usb host mode features to detect when a usb device is attached. For my purposes i want to be notified any time a device is attached. I was not able to see it happen. I'm using a broadcast reciever that i know works (when i have it listen for other things such as the home button being pressed. No matter what i try i can't seem to get the intent to fire.... So to

How to block USB devices to prevent from read/write Access? [closed]

萝らか妹 提交于 2020-01-17 17:47:00
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 days ago . I am making a module to prevent any access from computer when USB devices is plugged to the computer. I don't want to do by blocking port with changes in registry key because others users can also make changes in registry key. so I need something else so that when I block USB No

How to block USB devices to prevent from read/write Access? [closed]

半城伤御伤魂 提交于 2020-01-17 17:45:11
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 days ago . I am making a module to prevent any access from computer when USB devices is plugged to the computer. I don't want to do by blocking port with changes in registry key because others users can also make changes in registry key. so I need something else so that when I block USB No