usb

How to access Digital I/O using USB

我的未来我决定 提交于 2019-12-08 10:34:16
问题 How to access Digital I/O using USB using C or C++ or Vb.net Or C#.net? 回答1: I use the Velleman K8055 USB EXPERIMENT INTERFACE BOARD It is simple to program for, and has several inputs and outputs I got one from Maplin for less than £30 回答2: Easiest solution is possibly a USB-to-RS232 convertor. They're cheap commodity products, supported on most OS'es, and trivial to access as SerialPort objects. The physical side is a simple 5V, low-speed, low pincount interface suitable for both input and

Connect Android USB Accessory when screen is off

一世执手 提交于 2019-12-08 10:11:53
问题 Application Info I've got an application that is able to communicate with a USB accessory when the screen is on. The first thing I do, after installing the app, is turn the screen on and then plug in the USB accessory. I get the message "Open when this USB accessory is connected?". Additionally, there is a checkbox that says "Use by default for this USB accessory". I click the checkbox and press OK.[1] Now, whenever I plug in the USB accessory, my application pops to the foreground. The

Linux USB driver probe not called if device already plugged

房东的猫 提交于 2019-12-08 08:52:15
问题 If I use a modified usb skeleton driver on Linux and I insmod the module with the USB device already plugged in, the probe function doesn't get called. I need to unplug and replug the device in order for the driver to be activated. This is not the case for e.g. the serial drivers, I made some tests. Is there a reason for this? How do I get the probe function to get called? 回答1: Almost all USB HID devices are automatically managed by usbhid driver. Try the following: sudo rmmod usbhid sudo

how to send and receive data to serial port or USB port in asp.net?

与世无争的帅哥 提交于 2019-12-08 08:39:24
问题 I am developing a web application for a parking I wanna control gateways entrance with a device connected to USB port but we know that browser is in "Sand Box" so no access to computer's port I search the web and found out there is some possibility to do so via ActiveX and/or Java Applets but I'm novice to these things and want a complete tutorial or a wiki book that describe it or even class libraries relative to I want to send data to a USB or COM Port via asp.net application (Client Side)

Android kill process from broadcast receiver

六月ゝ 毕业季﹏ 提交于 2019-12-08 08:15:48
问题 Hi i'm looking to kill an activity in my application when the usb is disconnected i have a broadcast receiver and all set up and working fine public class USBOff extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Intent intent1 = new Intent(context, SdcardOff.class); startActivity(intent1); finish(); } } This code however tells me that the finish method and startActivity methods need to be created? why is this not working thank you for any help with

OUT Endpoint not accessible by pyusb

六月ゝ 毕业季﹏ 提交于 2019-12-08 08:07:32
问题 I am trying to send num lock to my custom hardware acting as a HID Keyboard. I have tied up an LED to glow if the num lock key is received on the USB. It works fine for numlock keypress from external keyboard. But I am unable to send the num lock key manually through pyusb (0x01) This is the part of the code responsible for sending it: dev = usb.core.find(idVendor=0xXXXX, idProduct=0xXXXX) try: dev.set_configuration() except usb.core.USBError as e: print e #endpoint = dev[0][(0,0)][0] # get

Connect and disconnect USB programmaticaly “WITHOUT UNPLUG AND REPLUG”

空扰寡人 提交于 2019-12-08 07:53:15
问题 I need to connect and disconnect USB programmatically. That is, I have inserted the USB device. I need to transfer the file using C#, .NET application. The application will watch the particular folder and transfer the file from that folder to a USB drive. I need to disconnect the USB device after the file is transfered and connect the USB when needed - without unplug and replug. What would be some code to do it or is there any DLL file available? Main thing: NOTE, NOTE: Without unplugging and

Communication between Android device(phone) and PC via USB coding

依然范特西╮ 提交于 2019-12-08 07:31:01
问题 I searched for some websites and learned that the way to communicate between android device(phone) and PC via USB is to have an app implementing serversocket on the phone and another app implementing client socket on PC. I kinda fixed the phone side's app(no exception now), but I got an exception "Ljava.lang.StackTraceElement" trying to initiate a socket("localhost", 38300). Does anybody know what's going on with this and how I can fix it? I attached both side's of the code below. My step to

/dev/input file created, but contains no data stream

不羁岁月 提交于 2019-12-08 07:14:32
问题 So, I'm trying to read a USB device in a brand new installation of Linux Mint. The way I've done it before is to read the raw stream found in /dev/input/by-id The device is being detected, and it is producing the expected device: $ ls /dev/input/by-id/ usb-Generic_WebCam_SC-13HDL11939N_200901010001-event-if00 usb-Logitech_Logitech_Buzz_tm__Controller_V1-event-if00 But when I look at the file using tail -f /dev/input/by-id/usb-Generic_WebCam_SC-13HDL11939N_200901010001-event-if00 No data is

How to receive a call from GSM Modem

为君一笑 提交于 2019-12-08 04:42:58
问题 I am fairly new to this area so it might look silly but I have a gsm modem connected to my pc through usb port. If somebody calls that number i need to pick it up and transfer to my headset. Is it possible? Any ideas. 回答1: Yes obviously its possible use AT Commands http://www.owen.ru/uploads/re_pm01_list_command.pdf try it works fine. 回答2: As @arun kumar non ascii mentioned you can answer the call using ATA . You can also know the number of person calling you (i.e. Caller ID) by executing AT