How do I connect a Windows Phone device with an Arduino? - windows-phone-7

I want to capture distances from sensors, using an Arduino and a Windows Phone device. How can I do that?

The Windows Phone 7 SDK does not give access to the USB port or Bluetooth on the phone, so you can't use that. So I think the best way (and probably only way on Windows Phone 7) would be to communcate over Internet or local network with the Arduino acting as a server which the Windows Phone 7 app connects too.
Here are some examples of an Arduino web server and TCP server.
For the Windows Phone client I would check out either WebClient or sockets.

Windows Phone 8 SDK:
Consider establishing an App to Device communication through Bluetooth API which became available for developers in the release. Bluetooth App to Device application sample, available on MSDN, is the way to go.
There is another option in Windows Phone 8, using Proximity (a set of classes which works with NFC), which is more applicable for a short range communication.
As for Arduino, there is certainly a Bluetooth module.
Windows Phone 7 SDK:
No way to establish a peer-to-peer communication with a third party device. A workaround would be to connect them through a network, as was proposed by Johan.

I have actually made a Windows Phone 8 App that connects to an Arduino using the Sparkfun Bluetooth Silver Modem. Issues is, even after I get them connected, I can't get either the Arduino to receive the input OR I can't get the WP8 App to successfully send to the Arduino...
My GitHub for the project is: https://github.com/lanceseidman/Arduino-Bluetooth-WinPhone8
Hoping everyone can try and help on the project.
My Breadboard photos will be up soon and my Arduino Code.

Related

Need the URL of windows phone activesync

I have searched for hours. I am developing an activesync client in order to send sms from PC to a phone that will send it. Specifically a windows phone. Previously I have used Jeyo mobile comp. I have all documentation I need but I can't find the default http address of the activesync server on the Windows phone when it is connected through USB. I should mention that I have a disability and can't access Windows phone itself. The OS is 6 but the whole point of creating the software is so I can upgrade. Many thanks!
alternatively if I am barking up the wrong tree, i need to know what tree to bark. for example serial ports. i would only need code to connect and read/write. otherwise is there a way to detect the information with csharp, ipconfig definitely isn't detecting windows mobile and activesync definitely works.
The question is a bit unclear. But Jeyo Mobile Comp is a remote control software for Windows Mobile (6.x, not Windows Phone 8 or 10).
Another free remote control software you my look at is Sparus EveryWan Remote personal edition (free). It can show the screen of Windows Mobile on your Windows PC and you can use the device remotely using the USB ActiveSync connection.
Another option is MyMobiler (also free).
The ActiveSync connection is made using the IP addresses 169.254.1.1 and 169.254.1.2 or 192.168.55.101/102, depends on Connection Setting:USB:Enhanced Network on device. You will find the IP when the device is connected to your PC, ActiveSync is connected and you start a Windows CMD prompt on the PC; then type "ipconfig" to get a list of IP addresses used by the PC. There will be your IP connected to the LAN/WAN and the one connected to Windows Mobile.
There is NO default http access to the Windows Mobile device.
If you are looking for a programming API, see RAPI at Microsoft (https://msdn.microsoft.com/en-us/library/aa513321.aspx) or OpenNetCF Desktop Communication (https://rapi.codeplex.com/) support.

Is it possible to share USB port hooked by libusb-win32 among several applications?

To make my program could communicate with Nokia phone I have setup libusb-win32 library. But after I have this library installed any standard Nokia soft like PC Suite refuses not only to communicate but even to detect my phone! The phone is still available only to my program through libusb-win32 now. Removal of the libusb0.sys driver helps and phone becomes again accessible through Nokia PC Suite, but then it is no more visible to my app via libusb-win32 library. Whether it is somehow possible to get the phone accessible as through libusb-win32 for my application as for standard Nokia phone programs (Nokia PC Suite, NSU, NSS, etc.)?
I run Windows 7 Enterprise and libusb-win32 1.2.6.0
Answer to myself. Yes, it is possible. The driver libusb-win32 should be installed in the filter drive option, not in the device file option.

Windows 8.1 Bluetooth Low Energy Behavior

I'm looking into programming Bluetooh Low Energy on Windows 8.1 and have a few questions about its behavior on auto-reconnecting to BLE devices after the connection is termiated:
How long will this auto-reconnect feature timed out? Or is it as long as you subscribe to BLE notifications and attempt to read/write data to it?
Will it reconnect if I restart Windows and my application?
How many devices can Windows remember to reconnect? Is it as many as the number of devices my app can connect to?
Where did you read about auto-connecting algorithm for Bluetooth devices in Windows 8.1. As far as I know, it is not possible to perform any kind of auto-connection, so all connection establishment has to be done manually in Windows 8.1 Bluetooth settings.
If your device is in connected state and you restart your PC for some reason, it will still show your device in the list but as "Not Connected" state. So you manually have to remove the device, and then pair it again.
I made a test, where I connected to two devices and read notifications from them both at the same time. What do you mean by app ?. A Smartphone application or ?.
All in all there is a lack of efficiency using Windows 8.1 for BLE applications, since all scanning and connection establishment functionalities have to be done in Windows 8.1 settings rather than in your Windows application, which restricts some important algorithms like auto-connection based on RSSI values and so on.

Maintaining a Windows Bluetooth Connection

I'm manufacturing a device that connects to my computer using Bluetooth and then a desktop Java app uses the Bluetooth connection to send serial data to the device which is then displayed.
When I try to connect my device to windows 7 it successfully finds and pairs with it creating a Bluetooth link on a COM port. This link can then be used by a serial prompt (used for testing) or my Java application. It works initially however soon after windows drops the connection and the only way to reconnect is to delete the device within devices and printers and then reconnect.
This seems to be a known problem with windows bluetooth so I decieded to use a third party Bluetooth application. I downloaded and tried Toshiba's Bluetooth Stack and it was able to add a Bluetooth device and keep a stable connection which works great however this only works for Toshiba computers without getting a cracked version.
This device is commercial and can't be sold with cracked versions of software. Has anybody experienced the same problems or not in other operating systems and has any solutions of advice as that would be a tremendous help.
This is not a good idea/method to use the COM ports generated by Windows, it's not working fine and not reliable in any scenario ; you should use Bluetooth Sockets instead.
Using Toshiba or Widcomm or BleuSoleil won't help: under Win7, all dongles are now trying to use the Microsoft Stack, not their own implementation.

Can I debug/deploy my app on Window RT tablet through USB?

I know I can remote debug my winRT app through wifi, but is it possible to debug/deploy app via USB? I'm asking this, since USB would be faster than the wifi alternative.
This is possible via a USB to USB (Easy transfer cable). The cables just simulate a network connection, so it will work like wifi.
You will need to ensure the drivers are compatible with the arm device, but they should be. This device is made by Microsoft for windows 8 so should work:

Resources