I want to pair my PC with a remote bluetooth device whose IO capacity is set as "noinputnooutput" as this device has neither keyboard nor display but my PC always generates a pin code to support from the remote device or asks me to put the pin code of the remote device which is not exist. Now I want to make this pair without any pin code. Is there any configuration in my PC to do that?
I'm trying from Ubuntu 17.10 also I tried it from windows machine
Related
We have a programmable proprietary USB dongle (that is not a storage device) that we insert into a machine running Windows CE7. With the dongle there is an API we can use. One simple API function is the "checkIfDongleInserted" function.
The USB dongle is recognized when inserted on the running machine, i.e. it is listed in the Wince Registry under HKLM\Drivers\Active and we can find it with the checkIfDongleInserted function.
However if we restart the machine while the dongle stays inserted, the device is not recognized anymore, i.e. it doesn't show up in the registry and the API function fails. If we reinsert the dongle by hand then it is recognized again.
Funny enough other devices (USB sticks, USB keyboards, USB mouses) work and are recognized perfectly well after a reboot of the machine while said devices stay inserted.
Upon inspecting the USB dongle's driver I found that it implements the interface USBInstallDriver. Researching this interface led me to https://learn.microsoft.com/en-us/previous-versions/windows/embedded/ms923254(v=msdn.10), where in the remarks it says that
The USB driver module calls this function when an unrecognized
device is attached to the USB port
So my guess is that restarting this "USB driver module" (from a client application) while the machine is running could be an idea to recognize the USB dongle. Though I don't see this happening from a client application.
What could be the reason for this specific device not being detected upon boot while it is inserted?
Is there a way to recognize it without having to reinsert it manually?
Inspired by this post I found the solution.
I was right in the assumption that I had to restart the USB controller, I just didn't know how.
After further research I found that HCD (Host Controller Driver) is the driver that detects the inserted USB devices and that I need to reload again. Upon doing that it would detect my already inserted USB dongle again.
Use FindFirstDevice to find the device (in this case the Host controller), then unload the driver with DeactivateDevice() and soon after load the driver again with ActivateDeviceEx().
Here's the code without any error handling (I'm on a different PC and too lazy to copy everything over, so I just roughly wrote the above steps in C)
DeviceSearchType searchType = DeviceSearchByDeviceName;
DEVMGR_DEVICE_INFORMATION deviceInfo;
//Find HCD
handle = FindFirstDevice(searchType,L"HCD*",&deviceInfo);
//Save the deviceKey to later be able to ActivateDeviceEx()
WCHAR* deviceKey = deviceInfo.szDeviceKey;
DeactivateDevice(deviceInfo.hDevice);
Sleep(100); //to make sure
ActivateDeviceEx(deviceKey,NULL,0,NULL);
What I want to do:
An AI program on a host machine, reading inputs from a camera sensing the screen of the target machine and outputting controls to the target machine via USB connection--programming the host machine's USB host as a USB peripheral connected to the target machine.
What I want to do step by step: (is it possible to implement the steps below?)
Have a host machine A and a target machine B.
Connect A and B with a USB 3.0 Type-A male-male cable.
The USB connection shows up as an HID keyboard device on B.
Write code to simulate key presses on A that sends to B.
(Eg. calling press('F') on a program running on A would type F to B's input)
It shouldn't require any program installed on B.
What I already searched:
USB 3.0 Host to host connection is possible:
https://superuser.com/questions/795053/how-do-i-connect-two-computers-using-usb-3-0
USB 2.0 Host to host connection is impossible:
https://superuser.com/questions/99274/how-to-connect-two-computers-with-usb
Similar questions asked without the assumption that USB 3.0 Host to Host connection is possible:
https://superuser.com/questions/1128365/simulate-usb-keyboard-from-machine
Setting up a computer to act as an HID device connected to another computer via ps/2,usb or another wired connection
https://superuser.com/questions/507921/computer-to-act-as-keyboard?rq=1
Suggestions in ascending order of feasibility:
USB Gadgets
You are using linux, so the default way would be to create/configure/load a gadget driver. Have a look at this tutorial, though for a raspberry, should work on your PC too. However, I could not find any information regarding the use of USB3 - the tutorial assumes your host is using one of it's OTG ports, which your PC most likely does not have. So whether this works with your USB3.1 Type-A-to-Type-A connection you'll need to test.
USBIP
The idea of sharing USB devices (not just keyboards) is not really new. With USBIP you can "export" any local USB device to the network, and your client will need the client-side USBIP driver to access the keyboard.
Dont bother with USB at all, just use Ethernet
I'd simply write two userland scripts/programs that send/receive+execute the keystrokes. Very easy to implement, you're probably familiar with python anyway.
If you absolutely cant have software installed on the client-PC and your Type-C-to-Type-C connection doesnt support USB Gadgets, there's another way. It basically involves the use of two USB-to-serial adapters (~15$) and a serial cable. While this wont be enumerated as a keyboard, but rather as serial port, it's the lowest-effort solution to transfer data without additional software on the client. Both computers will just do file I/O. If your computers still have COM-ports, you can even omit the serial converters!
I am on debian and:
I have a USB controller hooked up to a USB port on my PC (Device 1).
I have a male to male USB cord hooked up to another port on the PC that connects to Device 2. (it is a "bridging" usb cord, and has the chip for it)
I want to make them connect to each other as if they were one cord, so neither device knows that there is a computer in the middle.
This would be called a 'Coupler', except that I am using a PC as a coupler.
Here is a (really bad) diagram I made:
What I have done:
I have been able to connect the two devices independently of each other and sniff the results for when they fail to connect. The devices don't send a large volume of data back and forth.
Maybe there is some kind of command tool that I could use, for example (psudocode):
$ couple-usb-ports PORT1 PORT2
You're trying to reinvent the wheel here.
You might consider looking at this link instead.
http://dan3lmi.blogspot.com/2012/10/sniffing-usb-traffic-different.html
Specifically this.
Windows: You cannot directly capture raw USB traffic on Windows with Wireshark/WinPcap, but it is possible to capture and debug USB traffic on a virtual Windows machine under Oracle Virtual Box.
You cannot use a simple PC as transparent USB sniffer without extra (expensive) hardware. An USB bus has always one host (and one or more devices), and the PC can only be the host. This is a hardware limitation.
But you can capture USB data in a Windows machine using Wireshark and USBPcap, eliminating the need for the middle box in most cases.
As this post is tagged Linux, I suppose the controller PC is a Linux machine. Instead of connecting USB ports with a male-male connector, which is all kinds of bad (you are connecting the 5V lines of both machine with each other!), just run Wireshark in the controller PC.
There might be a little work to be done previously, as you have to enable Wireshark for USB monitoring (Particularly in Debian, this is disabled by default), and you might have to install a small driver to enable the monitoring. Have a look at this page for more information.
Once you get it working, Wireshark is an excellent tool for this!
I'm trying to do some transactions over serial ftdi interface to an ARM based board. On windows i'm able to detect it but when from virtualbox i'm unable to detect the same.
When i connect the same board to a linux sever box, it gets detected and gives me the port /dev/ttyuSB0. Any idea why Virtualbox does not detect?
By default, your VMs in VirtualBox can't see any of your 'real' hardware. You can "move" a USB device from the host to the guest. (Appears as a disconnect from the host, then a connect to the guest), but it's an odd two-step process:
When the VM isn't running, create a USB "filter" on your device.
Then, when it's running, sometimes it grabs it, and sometimes you must click the USB icon (at the bottom of your running VM window, next to your disk/CD/mouse indicators).
Make sure you have a recent version of VirtualBox. I think before 4.x, the USB support was not included in the free version. But I can confirm it works in 4.1.
I'm using node-serialport to work with USB devices, however on Windows I can't find out how can I connect to specific device. When I use list function there is only one item with COM3 address, however that is present always, even when no other devices are connected. How can I find out what is the USB device address that can be used for setting up communication?