w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Test if device is Always-On/Always-Connected (AOAC) or Connected Standby is supported?
Here's some code that should help: http://social.msdn.microsoft.com/Forums/en-US/tailoringappsfordevices/thread/eeb164a3-8ceb-4eb2-8768-4faaa7218c59/ (scroll down to the answer by 'User1024x768')

Categories : C#

What usb device is connected to a usb port
The primary issue in C++ is that there is no standard functions for detecting USB ports. USB Port identification and implementation is a platform specific issue. For example, Linux handles USB ports quite differently than Windows and many embedded systems don't have USB ports. So you'll have to look for a 3rd party library or find some OS API to use for your platform.

Categories : C++

Starting my app when USB device connected
You're going about this the wrong way. Although you can write a program to constantly monitor the USB ports to detect when something is connected, there's no need. The OS is already doing that anyway. Register an Autoplay handler for your device type and class. This is distinct from the old AutoRun feature, which would automatically execute programs found on an inserted file system. You can begin with an overview of the feature from the November 2001 issue of MSDN Magazine. Your handler will be a COM DLL. You can register the DLL as a handler, and register the handler with events you want to handle. You can either perform everything in the DLL, or you can put the bulk of the functionality in your application and just use the DLL as a proxy between the OS and your program.

Categories : Windows

Getting location information of the connected USB device
Look at Get-ItemProperty Cmdlet with registry Provider Path. For example, Get-ItemProperty -path HKLM:SOFTWAREMicrosoftPowerShell1ShellIdsMicrosoft.PowerShell Try this for getting location information for all USB devices: $devid = gwmi Win32_USBControllerDevice |%{[wmi]($_.Dependent)} | Select -ExpandProperty DeviceID $devid | % { Get-ItemProperty "HKLM:SYSTEMCurrentControlSetEnum$_" -Name LocationInformation -ErrorAction SilentlyContinue}

Categories : Windows

BLE 4.3 startScan() cause losing of the connected device
Did you try to wait before start a new scan? In my app it works. If I connect the phone to a BLE device and then start a new scan too early, the connection with the BLE device drops down. So I tried to wait some sec before attempt a new scan, and the connection doesn't drop down. The BLE device I used is a Nordic nRF8002 tag

Categories : Android

Android capture video of connected device with ADT
There is a tool called Android ScreenCast, it's open source and you can find it here : https://code.google.com/p/androidscreencast/

Categories : Android

auto connect bluetooth to last connected device
Wrote this using gEdit since, I don't have eclipse atm. So if there is some coding error please don't hesitate to edit this. For ease of explanation I haven't used SharedPreferences here, if you want to use don't hesitate it. //Assuming that you have device address and is connected private String partnerDevAdd="00:11:22:AA:BB:CC"; private boolean isConnected=true; IntentFilter filter = new IntentFilter(); filter.addAction(BluetoothDevice.ACTION_FOUND); filter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED); filter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED); registerReceiver(mReceiver, filter); // Create a BroadcastReceiver for bluetooth related checks private final BroadcastReceiver mReceiver = new BroadcastReceiver() { public void onReceive(Context context, Intent intent)

Categories : Android

how to script commands that will be executed on a device connected via ssh?
My immediate thought is why not create a script and push it over to the remote machine to have it run locally in a text file? If you can't for whatever reason, I fiddled around with this and I think you could probably do well with a HEREDOC: ssh -t jane@stackoverflow.com bash << 'EOF' command 1 ... command 2 ... command 3 ... EOF and it seems to do the right thing. Play with your heredoc to keep your quotes safe, but it will get tricky. The only other thing I can offer (and I totally don't recomend this) is you could use a toy like perl to read and write to the ssh process like so: open S, "| ssh -i ~/.ssh/host_dsa -t jane@stackoverflow.com bash"; print S "date "; # and so on but this is a really crummy way to go about things. Note that you can do this in other languages.

Categories : Shell

send data from iOS app to externally connected non iOS device
If you want your iOS app to communicate to your accessory, it is mandatory you use the mFi chip and you must request apple for that. Without that you can not talk to external accessory. And there is a separate framework called "External Accessory", provided by Apple, for this purpose. Good Luck!

Categories : IOS

How to get notification when a new device connected to android hotspot
Did you try to 'getWifiState()' then if the result is : Constant Value: 0 (0x00000000) -- > WIFI_STATE_DISABLING Constant Value: 1 (0x00000001) -- > WIFI_STATE_DISABLED Constant Value: 2 (0x00000002) --> WIFI_STATE_ENABLING Constant Value: 3 (0x00000003) --> WIFI_STATE_ENABLED Constant Value: 4 (0x00000004) --> WIFI_STATE_UNKNOWN For other option check here : http://developer.android.com/reference/android/net/wifi/WifiManager.html If that's all you can just checkmark to my answer if i helped you , thank you !

Categories : Android

iOS How can I get the battery level of the connected bluetooth device
As I know, For classic BT, only devices contain headset profile can. check this https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf

Categories : IOS

C# Serial Port Check if Device is Connected
I would agree that is a hacky because any device could be connected and sending '>'; but that doesn't mean its your device. Instead, be dynamic and use something like SerialPort.GetPortNames and WMI Queries to interrogate the devices plugged into the COM ports. You could use this example as a starting point. After reading documentation and examples, you should be able to create a list of all device information that registers drivers on the computer and their connected COM port. Edit: Since the device doesn't register itself, consider looking at the product drivers for Visual Studio that might make your job a lot easier.

Categories : C#

Is it possible to find out MAC address of directly wired connected device?
Computers connected to the same TCP/IP local network can determine each other's MAC addresses. The technology called ARP - Address Resolution Protocol included with TCP/IP makes it possible. From Windows terminal "arp -a" gives the list of ARP entries For more on ARP go to this link _EDIT__ @arthur86 This can be done by sending "Gratuitious ARP" from Device X (broadcast). A gratuitous ARP request is an AddressResolutionProtocol request packet where the source and destination IP are both set to the IP of the machine issuing the packet and the destination MAC is the broadcast address ff:ff:ff:ff:ff:ff. Device Y will have its arp cache updated with Device X MAC. Using the arp cache entries, Device Y can get the IP and MAC of Device X. Check this link for details about Gratuitious ARP

Categories : Networking

How can i write unit test for code that connected a device
Use a mock library, for example: http://www.hibernatingrhinos.com/oss/rhino-mocks . Then, in the unit test you can create a mock that implements the device's interface, and you can verify that a particular method (in this case - reset) was called.

Categories : C#

IOS received notification when not connected bluetooth device is no longer available
I assume the reason your wondering is because you would like to refresh your foundPeripherals array and update UI correct? Well since you have no current bond with the device there is no way to know when the device has moved away or come closer. Your solution is this: start an NSTimer that clears your foundPeripherals and begin discovering again when it fires. If you see it in the new discovery, it's still there and you should re-add to foundPeripherals. Otherwise it's gone.

Categories : Iphone

Fetch Device IP Addresses/MAC address of devices connected to a LAN
I'm thinking you could do a broadcast ping, ala: $ ping -b 192.168.0.255 using the Apple sample code for ping. But I have not tried it.

Categories : Iphone

How can a JavaScript app detect if a Leap Motion device is connected
That depends on what operating system API and drivers you have available. When a device is connected to a computer an operating system can detect a device connected to one of its sockets (using IRQ, polling etc.). You can then use driver or OS API (if it supports this kind of devices natively) to check a state of the device. Since this is usually done using a more low-level programming language like C++, C or even the assembly language (javascript is not suitable for several reasons) you should check your javascript API reference (not sure if you use browser API, Win8 API or something else) and see if there are any functions related. Update: The API link you sent seems to be quite vague on that. However I figured out that it establishes a WebSocket connection to a localhost under the hood

Categories : Javascript

"no route to host" on device on getOutputStream() - connected wirelessly
Well well - disabling the (WPA-PSK) Encryption on the router I connect alright. I would accept as an answer a (programmatic) work around EDIT : entering the URL into the android device's browser I do see the doGet() page. I reenabled all firewalls - the only thing that makes a difference is toggling encryption on and off

Categories : Android

How to get connected device count in hotspot(AP) programmatically [Android]
You can check this example:- http://www.whitebyte.info/android/android-wifi-hotspot-manager-class its working for me.

Categories : Android

How to find what device is connected to USB port (HID or Disk drive) in C++
I would recommend looking at the USBView sample in the WDK. If you are unfamiliar with this, simply run it - this tool walks the entire USB tree on the system and prints out information and descriptor listings for each device. In your case, I'd start at the RefreshTree() function in this sample, you can then follow the code to see how it enumerates the host controllers, hubs and finally devices. For each device that you find you can look at the bInterfaceClass in the interface descriptors to find out what types of interfaces it is advertising (in your case 0x03 for HID Interface Class and 0x08 for Mass Storage Class). The easiest way to get the source to this sample is to install the 7.1.0 WDK which is currently available here: http://www.microsoft.com/en-us/download/details.aspx?id=1180

Categories : C++

How to get a list of devices connected to an Android device from adb shell
Since it's unix based, you should be able to try: ls /dev/tty.* or ls /dev/cu.* Also, I haven't tried myself yet, but the Android Open Accessory Development Kit sounds useful.

Categories : Android

I need to establish communication between android device and a convertor which is connected through USB
An application note, AN809 - Integrating the CP210x in to the Android Platform, has been released which may provide some guidance in getting your CP2104 device recognized by the system.

Categories : Android

Virtual Mac XCode iPhone debugging - device not connected issue
I successfully connected to remote VM installing Logmein's Hamachi VPN software on both my host and VM. Using it, XCode could detect my iPhone device once shared via USB Network Gate.

Categories : Iphone

Is there an iTunes C++ library for Windows that allows access to a USB-connected iOS device's filesystem?
Check out ifuse - a cross platform tool. Url: https://github.com/libimobiledevice/ifuse Detailed instructions on compiling and using it are in this answer.

Categories : C++

Network Provider doesn't work sometimes when the Device not connected to the Internet
The network provider requires a connection to the network to work. Its algorithm is to detect what towers it can see and their signal strengths and tries to triangulate a location. For further accuracy it also uses Wifi SSIDs. If it isn't connected to those sources, it has no way of telling where you are.

Categories : Android

Background IntentService Force Closes because device is connected to WiFi but is not authenticated
You could move the connectivity check in your activity (or wherever else you have the context) and start the service from there. Thus you won't have the force close constraint of the intentService and it should work fine. Edit: Ok got it! Here's what you can do to be sure that the user has access to Internet: private boolean hasInternetAccess() { boolean hasInternetAccess = false; try { //I set google but you can try anything "reliable"... //isReachable(1) the timeout in seconds hasInternetAccess = InetAddress.getByName("www.google.com").isReachable(1); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generat

Categories : Android

How can I find the device uuid's of all connected devices through a command line script?
I found a similar question about using multiple devices here is my form of the answer that helped me: #!/bin/sh i=0 for line in $(system_profiler SPUSBDataType | sed -n -e '/iPad/,/Serial/p' -e '/iPhone/,/Serial/p' | grep "Serial Number:" | awk -F ": " '{print $2}'); do UDID=${line} echo $UDID udid_array[i]=${line} i=$(($i+1)) done cnt=${#udid_array[@]} for ((i=0;i<cnt;i++)); do echo ${udid_array[i]} done

Categories : Iphone

Android device is not connected to USB for debugging (Android studio)
If you are on windows, many times it will not recognize the device fully and because of driver issues, the device won't show up. go to settings control panel hardware and sound device manager And look for any devices showing an error. Many androids will show as an unknown USB device. Select that device and try to update the drivers for it.

Categories : Android

Get connected port number and hub number of the device
You need to list the USB device IDs using WMI, then lookup each in the registry to get the location information, if any exists... $devices = gwmi Win32_USBControllerDevice |%{[wmi]($_.Dependent)}|select DeviceID $devices.DeviceID | %{Get-ItemProperty -Path "HKLM:SYSTEMCurrentControlSetEnum$_"}| select Mfg,DeviceDesc,HardwareID,LocationInformation,Class Produces info like this on my machine: Mfg : @msmouse.inf,%msmfg%;Microsoft DeviceDesc : @msmouse.inf,%hid.mousedevice%;HID-compliant mouse HardwareID : {HIDVID_15CA&PID_00C3&REV_0512, HIDVID_15CA&PID_00C3, HID_DEVICE_SYSTEM_MOUSE, HID_DEVICE_UP:0001_U:0002...} LocationInformation : Class : Mouse Mfg : @usb.inf,%generic.mfg%;(Standard

Categories : Windows

SQL Developer: Joining tables from connected SQL Server DB and connected Oracle DB
Oracle has the concept of a DBLink, and SQL Server has the concept of a Linked Server. Both these features let you query data from two separate databases. Here's a link with instructions for setting up an Oracle DBLink to a SQL Server DB... http://www.dba-oracle.com/t_database_link_sql_server_oracle.htm And here's a link with instructions for setting up a SQL Server Linked Server to an Oracle DB... http://support.microsoft.com/kb/280106 See also this SO post... SQL statement joing Oracle and MS SQL Server

Categories : SQL

iOS Project runs on simulator, physical device, but can't build or archive anymore for "iOS Device"
After this happening a few times, I figured out the issue. When my iPhone is hooked up to my Mac and tethering is on, this problem occurs. When I turn tethering off, or disconnect the phone, I can archive again. Not sure why this, but I hope it helps someone at some point.

Categories : Iphone

Not showing my mobile device in eclipse but show in Window 8 (portable device part)
Download usb driver for samsung from here : http://developer.samsung.com/android/tools-sdks/Samsung-Andorid-USB-Driver-for-Windows

Categories : Android

why doesn't MPMoviePlayerController play in simulator but not in device if the format is valid for the device?
Solved! I am forcing it playing even if the mute is on, moviePlayer.useApplicationAudioSession = NO; [self presentMoviePlayerViewControllerAnimated:moviePlayer]; that's what itunes store does if the mute is on for the preview songs when you tap it

Categories : Iphone

The method "device.press" or "device.touch" of MonkeyRunner doesn't take effect
You could try to replace 'DOWN_AND_UP' with MonkeyDevice.DOWN_AND_UP. And you could also add some MonkeyRunner.sleep(time_in_seconds) to pause the script between the interactions. To test if the device object was properly created you could use device.wake() which lights up the device's display. If this works, the touch and press methods should work also.

Categories : Android

how to use the same image of 160ppi and 1280X800 ressolution device in 800X1280 and 214ppi device
1280 x 800 160ppi is MDPI devices 800 x 1280 214PPi us TVDPI devices //you need to supply different density Images like MDPI and HDPI images TVDPI devices will pick from HDPI image and auto scale them //you can also supply different drawable for large and xlarge drawables.

Categories : Android

Trying to retrieve previously paired bluetooth device in IOS app will not respond with failure if device is off
Two points you need to know about retrievePeripherals: and connectPeripheral: 1.) retrievePeripherals: attempts to retrieve the CBPeripheral object associated with the uuid you supply. Even if the ble device is off (or on the other side of the country) retrievePeripherals: will still return an instance of CBPeripheral that you can call connectPeripheral: on. This is done intentionally so that you can issue a call to a peripheral that is not even around and still automatically connect to it when it comes back into range. It basically creates a marker inside the system bluetooth so that when the device is actually seen, it will know it should connect to it. 2.)connectPeripheral: will not time out unless the communication channel is broken with the actual device. If the iOS device has not s

Categories : IOS

Sending image (.jpg) byte data to an iOS device from a .NET web service, then on the iOS device, encoding it to its respective file type (.jpg)
Been there, but on the iOS end. What we did to solve this problem was to have the .NET server send the image as a base64 encoded string, just as you said. In the iOS end, the dev must then use a base64 decoding class (there are plenty on the internet, this one for example: http://www.imthi.com/wp-content/uploads/2010/08/base64.zip), transform that into NSData and then create the image with that data. Should look something like this: NSString *b64string = @"string to decode"; NSData *imgData = [DecoderClass decodeBase64FromString:b64String]; UIImage *image = [UIImage imageWithData:imgData]; If the data is correct, it should work. UIImage is a high-level class and should handle image types (jpg, png, etc) automatically, as long as the data is consistent.

Categories : C#

how to record the voice from bluetooth device mic and play in device speaker
yes above concept is correct and very helpful for me(but there is little bit addition or modification done) but routing to speaker(device-speaker)required new session to create for taking input from Bluetooth we have create session like //// create and set up the audio session AVAudioSession* audioSession = [AVAudioSession sharedInstance]; [audioSession setDelegate:self]; [audioSession setCategory: AVAudioSessionCategoryRecord error: nil]; [audioSession setActive: YES error: nil]; // set up for bluetooth microphone input UInt32 allowBluetoothInput = 1; AudioSessionSetProperty (kAudioSessionProperty_OverrideCategoryEnableBluetoothInput,sizeof (allowBluetoothInput),&allowBluetoothInput); and when ever u want to paly the sound not in bluetoothdevice speaker at that time override

Categories : Iphone

Using the accelerometer in a Windows Phone 8 device to determine if device is not moving
From my point of view, it really depends where do you want to use your app. If it is an outdoor application then as Igrali mentioned using GPS would be a better option. However, if you are still sure that you want to use accelerometer one way that I tried before was save last few results of the accelerometer every time then check them with previous results. if the result was same it means the system is stopped otherwise it is moving. That may not be a good way but it works.

Categories : Windows Phone 8

How to track the device location (iOS and Android) device using Phonegap
The first thing to say is that creating a Phonegap app that receives location updates while running in the background is entirely possible, but not trivial. I've done it myself and released apps on both the Android and iOS platforms. If you need accurate and regular position updates, I'd suggest using the GPS receiver on the target devices. In Phonegap, you can do this setting the "highAccuracy" flag when requesting position updates. The watchPosition() function will deliver new position information as and when the device receives updates from the GPS receiver, so you use it something like this: navigator.geolocation.watchPosition(successCallback, errorCallback, { enableHighAccuracy: true, timeout: 10000, maximumAge: 0 }); See the Phonegap geolocation API documentation for more d

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.