Polling for Square Device status - square-connect

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.

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.

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

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".

What to expect when Airplane mode is enabled during wifi scan?

I'm using windows WLAN APIs (Windows Desktop not Metro Apps) to scan WiFi networks.
I'm curious what will be the behavior of the WiFi scan when Airplane mode is enabled before the scan is completed?
I'm trying to create such scenario but it very hard to catch such timing.
Any ideas?
Technically speaking, "Airplane Mode" Takes the Radio Transmitters in your iPhone and changes their frequencies of transmission to frequencies that are sympathetic to Aeronautic Instrumentation, such as Guidance Systems for example.
Due to the frequency change, if you're scanning Networks and then you change the properties of the Network adapter, the adapter has to restart. So, your Scan will be temporarily interrupted.
Test it on your iPhone, download something from App Store and switch modes during the download, see what happens. The Icon will suddenly stop and will display "SEARCHING" and will then re attempt to pick up the connection again.

osx lion never stays in sleep mode

Since I updated to OSX Lion I got a strange issue.
I am used to never shut down my Mac, I simply put it in hibernate / sleep mode.
But since the update to Lion the mac just starts up at random times.
Day and Night I can hear the CD-Drive sound when it wakes up.
The screen does not even go on, it stays black but the as soon as you hit any key the monitor just turns on.
This is really annoying as it sometimes wakes you up at night when you MAC is booting up.
I could not find a similar issue reported yet.
Thanks
Sebastian
Given the RTC (Alarm) wake reason, ensure Wake for network activity is turned off. See the last comment in the thread at https://discussions.apple.com/thread/3247367?start=0&tstart=0
Also ensure you have not scheduled wake. See http://osxdaily.com/2010/07/17/why-mac-wakes-from-sleep/
Launch the Terminal and type the following at the command line:
syslog |grep -i "Wake reason"
OHC: stands for Open Host Controller, is usually USB or Firewire. If you see OHC1 or OHC2 it is almost certainly an external USB keyboard or mouse that has woken up the machine.
EHC: standing for Enhanced Host Controller, is another USB interface, but can also be wireless devices and bluetooth since they are also on the USB bus of a Mac.
USB: a USB device woke the machine up
LID0: this is literally the lid of your MacBook or MacBook Pro, when you open the lid the machine wakes up from sleep.
PWRB: PWRB stands for Power Button, which is the physical power button on your Mac
RTC: Real Time Clock Alarm, is generally from wake-on-demand services like when you schedule sleep and wake on a Mac via the Energy Saver control panel. It can also be from launchd setting, user applications, backups, and other scheduled events.
Hope this fixes your problem.

Emulate Sleeping Windows Mobile Device

Is it possible to emulate a device sleeping and waking using the Microsoft-supplied device emulators?
Yes, but you have to generate your own emulator image with a modified kernel (changing OEMPowerOff). Bruce Eitman blogged about it here. You didn't detail your needs, so it's hard to say, but you might be able to provide some form of simulation by manually setting the named power management events.
This is an old thread, but in case anyone else stumbles across it, you can make the Windows Mobile emulators 'sleep' and wake up, though not with the debugger attached.
Close the emulator window while your application is running and save the state. Or, configure power management to sleep the emulator at the desired time; the emulator will close and save its state automatically. If the debugger is attached, it will lose its connection and stop debugging.
Open Device Emulator Manager and click Refresh until the emulator shows up as disconnected (no icon next to it). Right-click on the emulator name and select Connect.
Emulator wakes up and reappears. If your application is listening for the wake-up notification, it will be signaled at this point.
You can also wake up the emulator using Debug > Attach to Process, though this does not always succeed. Either way, by the time the debugger attaches, the wake up sequence will already have executed. If you can get by with debug statements, though, this is easier than modding the emulator image.

Resources