w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Connection error, connect from Visual Studio 2010 to SQL Server 2008 with ip, port
You need to remove the Integrated Security=SSPI; from your connection string (that's saying: use Windows Authentication). Data Source=[ip],1433;Network Library=DBMSSOCN;Initial Catalog=[db];User ID=sa; Password=[pass];MultipleActiveResultSets=True If you have both the Integrated Security= and an explicit user/password in your connection string, the integrated security wins - remove it, and you should be good. PS: I would strongly recommend to NEVER use the sa account - not even in development and testing!

Categories : Visual Studio 2010

How to connect Android device to an iOS device over BLE (Bluetooth Low Energy)
I've written a simple working example, well relatively simple, and included it open-source on Github: https://github.com/GitGarage. So far it has only been tested with an Android Nexus 9 and an iPhone 5s, but I presume it would also work with a Nexus 6 and various iPhone types. So far it is set up explicitly to communicate between one Android and one iPhone, but I presume it is tweakable to do much more.

Categories : Android

Smart Device Support in Visual Studio 2012
a) Never. Microsoft has no intention of ever supporting anything but WEC 2013 (and later if they exist) in the newer versions of Visual Studio (2012 and beyond). For WEC7 your option is, and will remain Studio 2008. b) WEC7 is not supported now is Studio 2012, so there's no "still" to be continued. So what that means is that for development you use: CE 6.0R3 --> Studio 2008 WEC 7 --> Studio 2008 WEC 2013 --> Studio 2012

Categories : Visual Studio

Connecting to MindWave through COM port?
If you connect to the serial port directly you will have to parse binary data which, actually, ThinkGear Connect socket protocol is for (all related is here) TGSP is JSON-based protocol so dealing with it in Ruby is piece of cake (below is an extract from documentation at the link above) ThinkGear Socket Protocol (TGSP) is a JSON-based protocol for the transmission and receipt of ThinkGear brainwave data between a client and a server. TGSP was designed to allow languages and/or frameworks without a standard serial port API (e.g. Flash and most scripting languages) to easily integrate brainwave-sensing functionality through socket APIs. So I'd suggest you deal with TG socket protocol (I assume you don't run Ruby on an embedded device, for if you do, you will definitely need

Categories : Ruby

Visual Studio 2012 / WP8 SDK: "Connection to Windows Phone Device or Emulator Failed"
I have very similar problem, but in my case the simulation does not work on actual device (it used to, but now suddenly it doesn't). It does work with emulator. Deploying and debugging works fine on both. This would suggest that it might be more general problem. Not tied to target device type in particular.

Categories : Windows Phone 8

Wrong build being deployed on Android device using Visual Studio 2012 Xamarin.Android
I have no idea why it does this, I had this issue before. I also noticed that the device log was somewhat behind (ie, at 3.30pm, the last record on the device log was 11.00am). Uninstalling the app from the device and re-deploying it seems to correct it. Note: I had this issue in VS, didn't check with XS. I would look at the difference in your deployment settings in VS and XS (I think it may have something to do with the Fast Deployment option).

Categories : Visual Studio 2012

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++

How can I get Python to watch a USB port for any device?
What about polling? Create a Python app that enumerates a list of attached USB devices every couple of seconds or so. Keep a list/dictionary of your initially detected devices, and compare to that to determine what was attached/detached since your last polling iteration. This isn't the best approach, and enumerating all the devices takes a short while, so not too sure this would be the most CPU efficient method.

Categories : Python

send raw command to lpt or com port without installing the device
You don't have to install a driver for COM or LPT peripheral device if it has a real COM or LPT. You have to have just installed drivers for COM or LPT in your PC. If you have a USB 2 COM adapter, you have to install drivers for it. But as soon as you have a working COM alias like COM1 or COM10, COM11... you can send or recieve characters with no problem if you use a right configuration for transmission. Check out SerialPort class. For parallel port check out this question.

Categories : C#

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#

How to make the Android Device listen to a particular port number
Nobody has expressed an opinion yet. May be the question is not clear, at least I found it very difficult to understand what you are trying to do. You say you have a server (laptop) listening on port 9070 and you want a device to connect to this server thru this port? Is that right? Have you try, from your device, launch the navigator and connect to that address? http://abc:9070 Anyway, the java code to make a socket connection is something similar to this: try { Socket clientSocket = new Socket("YOUR_LAPTOP_IP", 9070); // 1024 is an arbitrary number, could be 512, 65535, etc byte[] buffer = new byte[1024]; int ret=0; while ((ret=clientSocket.getInputStream().read(buffer)) > 0) { // from now on it's up to you what to do with the data you read

Categories : Android

Device::SerialPort not sending my data unless I cat the serial port
Adding < makes the file handle read, whereas you probably want it to be for write. You would therefore want to open it for write > or for append >>. Furthermore, since the OS caches file buffers, you have to flush it. See here in the perdoc on how to do it.

Categories : Linux

How do I detect when a serial port has been closed by the device in java?
I have the same problem: I was trying to know when the device was unplugged from the USB port. Then, I found out that every time I unplugged the device from the USB port, it gets a java.io.IOException from the serialEvent. Take a look at my serialEvent code below: @Override public void serialEvent(SerialPortEvent evt) { if(this.getConectado()){ if (evt.getEventType() == SerialPortEvent.DATA_AVAILABLE) { try { byte singleData = (byte)input.read(); if (singleData == START_DELIMITER) { singleData = (byte)input.read(); if(singleData == (byte)0x00) { singleData = (byte)input.read(); //get the length

Categories : Java

How do I communicate with a RS232 serial port on a remote device using TCP/IP?
You must use hardware solution. Something like this. Given it's quite expensive, you may consider looking at Rasperry PI or even Arduino-based solution.

Categories : Java

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 port address of a android device for socket programing
You can use any port you want above 1024 (the OS reserves those top 1025 on Linux for official services). Your problem will be that if you're on cellular networks you won't be able to connect to the phone, the cellular network is very unlikely to let incoming connections through. And if you're on wifi you're almost certainly firewalled as well. Its only likely to work if both the server and the device are on the same wifi network.

Categories : PHP

Checking device status, while receiving data from serial port c#
Listen to the WM_DEVICECHANGE event that will be fired when a device is removed or inserted. Here is an example of a implementation and some more information: Detect serial port insertion/removal http://www.codemiles.com/download/file.php?id=719 (USB Sample) http://msdn.microsoft.com/en-us/library/windows/desktop/aa363480(v=vs.85).aspx

Categories : C#

How to detect if the HDMI port on an Android device has HDCP enabled?
You can try to check the Display flags: http://developer.android.com/reference/android/view/Display.html#getFlags() FLAG_SECURE or FLAG_SUPPORTS_PROTECTED_BUFFERS (http://developer.android.com/reference/android/view/Display.html#FLAG_SECURE and http://developer.android.com/reference/android/view/Display.html#FLAG_SUPPORTS_PROTECTED_BUFFERS)

Categories : Android

Web service can connect in IE, but can't connect by Visual studio
May be your corporate environment will block the Web Service. Can you please try the following? Add the Firewall outbound rule to allow to access the web service Add the web service as trusted URL in your anti-virus (or just pause the protection of anti virus to identify the cause of issue) Add the domain/ip address as trusted in your IE

Categories : Web Services

can not connect my device to eclipse
I keep getting 11-13 09:35:51.999: E/DataRouter(95): Opening of the USB File failed fd is -1 & errno is 2 as well, however this doesnt stop me from attaching my device to my computer. One of these may work for you Restart your phone Restart eclipse Update eclipse to the latest version Download the latest APIs (currently API 19) Download latest drivers (this may be needed if you have upgraded your phone/device software recently)

Categories : Android

Connect to a bluetooth device?
You can try adding bluetooth using that Mac Address. Go to bluetooth and look for connect to device (Manual or something) and enter the address. Trying switching reboot your device as well as phone.

Categories : Android

fastboot connect remote device
You have to check your bootloader and make sure that your fastboot is correctly configred. It must be able to bring up the wifi/ethernet interface and perform a DHCP or set a static ip address before you can connect to it. If you are sure that the device could get an IP address in fastboot mode, plese try to get connected to it firstly by ping its ip address. If you got no react, try to use wireshark to capture some trace to see if there is something wrong (firewall issue?).

Categories : Android

Can I connect any android device with ubuntu?
Under linux no driver is needed for adb connectivity. Although a little setup is required to change the adb device file permissions to make it accessible by non-root users. Personally I use this universal udev rule which works for all android devices regardless of the manufacturer: ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:ff420?:*", MODE="0666" Also for some noname devices you might need to add their VendorID to the ~/.android/adb_usb.ini. Just run the following commands with the device plugged in: find -L /sys/bus/usb/devices -maxdepth 2 -path "*/modalias" -printf "%h " -exec cat {} ; | awk -F: '/icFFisc42ip01/ {print $1}' | xargs -i cat {}/idVendor | awk '{print" 0x"$1}' >>~/.android/adb_usb.ini grep ^0x ~/.android/adb_usb.ini | so

Categories : Android

Cannot connect Rockchip 3066 device to adb on mac os
I tried to do the same on several Windows machines and on a Mac with another, also very much cheap Chineese but nice device. It turns out that the main problem is in adp. If the device is listed in a device manager or system report and displays the "connected for debugging" notification, then it is recognized and there are no driver related problems. This is easy to acheive on both Mac and Windows. However, "adb devices" does not show the device. In Windows, I just followed an advice from the Net and used adb version .26 and it worked. The lack of support for Rockchip is evidently intentional. I do not know who maintains adb, but if it is Google et. allies, then they just do not like cheap devices.

Categories : Android

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

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

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

Google map only show with device connect to my computer
I assume your friend is running the code rather than an .APK you exported. This would mean that the application your friend is running will have a different SHA1 fingerprint. You will have to make sure you added your friend's SHA1 fingerprint as well, in addition to your own. Add a new line to your existing Android Key in Google's API console with the new SHA1 and the same package name. If you're using eclipse you can use go to Window > Preferences > Android > Build. Alternatively, you can also follow the instructions as posted in http://stackoverflow.com/a/5262845/2675446

Categories : Android

connect to device with Bluetooth address on String
First you will have to findout what profile the bluetooth device supports, For instance it could be a medical device that could use HDP profile or it could be using a simple RS232 over bluetooth. It is important to understand how the bluetooth connection is established for various profiles before you start writing code. Here is a good link to start with. Android SDK also comes withe some basic examples that you can start with. http://developer.android.com/guide/topics/connectivity/bluetooth.html EDIT: If your device is paired successfully,you will see the MAC address in the list of paired devices. For instance, you can do this to find the device that matches your device's MAC address : Set<BluetoothDevice> pairedDevices = mBluetoothAdapter .getBondedDevices

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

CoreBluetooth: Can you connect to a peripheral device that is not advertising
No, it cannot. To create a connection to any peripheral device, that device would have to advertise using connectable advertising. The device that wants to connect, will then have to reply to one of the advertisements with a connection request.

Categories : IOS

unable connect to server from application on device
you are getting android.os.NetworkOnMainThreadException : The exception that is thrown when an application attempts to perform a networking operation on its main thread. This is only thrown for applications targeting the Honeycomb SDK or higher. Applications targeting earlier SDK versions are allowed to do networking on their main event loop threads, but it's heavily discouraged. do your code this way in side AsyncTask

Categories : Android

Connect to a bluetooth device programmatically objective c
Yes if you use Core Bluetooth to discover all devices that are discoverable. Then if it matches a name etc then connect to it. I made a wrapper around Apple's Core Bluetooth framework to make it easier to do these things. https://github.com/steprescott/SCPCoreBluetoothManager

Categories : Objective C

how to connect an ios device to a Hotspot driven by hostapd
if the "circle by the ssid side" keeps showing ,i think your device is still trying to get ip address. could you please provide us with more detail messages? such as your hostapd configure file and your dhcpd configure file.

Categories : IOS

iOS Corebluetooth - Sometimes won't connect to a device until I do a network reset
If your device is only looking for a specific service/characteristic specified in the GATT profile, that could be the problem. For whatever reason, Apple left out of their documentation that the Bluetooth automatically caches the GATT Profile until the bluetooth is turned off and back on. So if you are changing the GATT on your LE device, and your phone is looking for something specific in the GATT, it may not be able to find your device. Unfortunately, I don't believe there is a way to clear the cache programatically, so you'll still have to manually reset bluetooth. However, if you aren't changing the GATT profile, that whole above paragraph doesn't apply to you =P What I would keep in mind is that Bluetooth LE "slaves" (or, as Apple calls them, peripherals) can only have one connecti

Categories : IOS

Connect Android Device (PhoneGap) in Eclipse to 127.0.0.1
You can use 127.0.0.1 to reach the emulator's host, if you are in the same machine. If you want to reach the development machine, you can use 10.0.2.2. Refer to How to get the Android Emulator's IP address? Hope it helps.

Categories : Javascript

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#



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