Is it possible to stop windows from sending SOF packet to my USB device? - windows

I want to test if my USB device will enter suspend after 3ms of IDLE state, but my PC host keeps send SOF packet every 1ms so I want to stop it for ~3ms. Is it possible?

The simplest way is to just tell your computer to go to sleep.
Another way that I think would work would be to connect your device to a USB hub (possibly a root hub inside your computer) that is not being used for any other devices, and then use the Device Manager to disable that hub. Just right-click on the hub and select "Disable".

Related

How to apply policy to offline device

I am using Android management API. I have applied policy to device and turned it to kiosk mode. After a while when I turn on the device, it is not connected to wifi anymore and is still in kiosk mode. Therefore I cannot connect it manually or update its policy. Is there a way to solve it ?
Unfortunately, as you cannot open the wifi dialog and devices cannot update the policy without a connection, the only way to workaround this is to hard reset the device per OEM instruction.
In the future, you can use KioskCustomization to have access to the status bar and navigation buttons so there would be no need to hard reset the device again if there is no connection as you can open the wifi dialog with this.
For people wondering how to escape the kiosk mode. There should be a way for your device to reboot to recovery mode. I my case - samsung tablet - I hold power button and volume down button for a while and when samsung logo appeared a released the power button, but still hold the volume down button. In recovery mode I were able to connect to wifi manually.

Command line bluetooth discovery as in Windows 10?

I'm trying to experiment with Bluetooth discovery from the command line.
I have tried:
btdiscovery from https://bluetoothinstaller.com/bluetooth-command-line-tools ( via https://superuser.com/questions/1604313/command-line-check-if-a-certain-bluetooth-device-is-discoverable )
The C code from https://www.winsocketdotnetworkprogramming.com/winsock2programming/winsock2advancedotherprotocol4j.html (via Unable to connect to Bluetooth Device using Window's Bluetooth API in C++)
Both of these, have the same problem: that when I run Bluetooth "discovery", they report one or two devices maximum, and then they exit.
However, if in Windows 10, I go to: Windows Settings/Devices/Add Bluetooth or other device/Bluetooth, so I get "Add a device" window:
... I get a while bunch of devices that are continuously updated (and some disappear, then reappear again)
Does anyone know of a ready (C/C++) example that would reproduce the same results I get in this "Add a device" window, but in the command line/terminal?
Short of that - could anyone give me any pointers on what APIs I'd need to use, in order to replicate the same Bluetooth discovery results from this "Add a device" window in a command line application? (presumably, that would be a continuous Bluetooth discovery process, that would be interrupted by Ctrl-C or similar in the terminal)

Reset USB port on Mac

I occasionally need to unplug and then re-plugin my usb TV tuner, or I could restart the entire computer... seems to be the only way to get it working again. I'm thinking that a power reset would suffice. So my question is:
Is there any way to reset the USB port on a Mac or reset the power to the USB port through Terminal or another programatic means?

Polling for Square Device status

What's the possibility to know whether the contactless device is turned on via the Square API? Is there a polling mode that the device will respond if it is in idle and waiting for a transaction?
If the device gone to sleep mode, what's the possibility to turn it on pragmatically?
Also will the device turn on automatically when it is connected via the USB cable to a USB port?
Thanks,
Unfortunately, programmatically checking the status of a reader and turning it on isn’t currently available. The reader will automatically go into sleep mode after 2 hours of inactivity. To wake it up from sleep mode, firmly press the button on the side of the reader.

Which windows event is triggered on secondary display device detection

This question is specific to Windows 8.1.
I want to schedule a windows task to run when a secondary output device (e.g., VGA monitor or HDMI A/V receiver is turned on or off) but I'm not sure which event should be used for this. I found something related to network cable plug/unplug here https://superuser.com/questions/262799/how-to-launch-a-command-on-network-connection-disconnection , but nothing for external audio/video devices. Any such event or events exist? If not, any other way to do this?
Thanks
Your computer has no way of knowing if the "secondary output device" is turned on/off. Your machine only knows if a display is plugged in or not to the video port on the computer.

Resources