Can PeerFinder class of .NET communicate with mobile phone devices through laptop via bluetooth? - c#-4.0

I doubt the limitation of PeerFinder class in .NET. Can it make connection only with other laptops when implemented on laptop and phone to same phone when implemented on phone? Is it limited only to communicate with Windows OS devices, or is it able to communicate with any bluetooth device irrespective of OS?
Kindly, help me if you are sure of this class capabilities. I have seen the implementation of 32Feet.NET but my question is limited about PeerFinder class and its limitations.

Start from this link, in which you can find several useful links for WinRT communication (the suggested protocol to use from Windows Phone 8 to communicate using NFC or Bluetooth)
http://blogs.ugidotnet.org/Nick60/archive/2012/12/30/win-rt-proximity-communication.aspx
You have two possible scenarios:
App to Device: you can connect a Windows Phone 8 device to third party devices (for example a LEGO robot or car audio systems) Bluetooth/RFCOMM (that is serial port profile, for the emulation of RS232 serial connections).
App to App: for communications between Windows Phone 8 devices and also Windows 8/Windows RT devices!
The PeerFinder class is the base class for discover another instance of your app on a nearby device and create a socket connection between the peer apps by using a tap gesture or by browsing:
http://msdn.microsoft.com/en-us/library/windows/apps/br241203.aspx
Hope this helps!

Unfortunately, it seems that the only way to stablish a socket connection using Bluetooth between a WP8 app and a Windows 8 app is by triggering the connection using NFC tap gesture. Although the PeerFinder documentation suggests that you might be able to specify AlternateIdentities to advertise peers running on both devices, it seems that Windows 8 relies on WiFi Direct, while WP8 uses Bluetooth.
So, if you are not able to use the NFC tap gesture between both devices to trigger the connection, you might not be able to pair both apps running on the different devices.
See this thread for more info.

Related

How to communicate with an Arduino circuit using a web app?

I have recently made a Arduino circuit as shown in the link below:
http://www.instructables.com/id/DC-Motor-Control-With-Bluetooth/
As you can see, the person in the video of the above link used a bluetooth controller app to control and send signals to the Arduino board via HC-05 bluetooth board.
Here's the question. How can I use a web app/ web instead of a native app(like the video) to control and send signals to the Arduino board?
It would require the use of additional hardware. It is for connection to the network or broadly web.
Once we consider this we have several options infront of us :
We can use a gsm module. In this hardware we would insert a sim and use its network for connecting to web. But when you buy a GSM module be sure that it got http services as some modules support only message services. ( I would suggest GSM sim 900A module).
We can use a wifi hardware. This would act just same way as wifi on our mobile or laptop. But it requires some hotspot in its range thus restricts portability.
We can connect an ethernet cable to the arduino module and use the network. But thus restricts portability more than wifi. But you can go for that to if that satisfies your need.
Once you get the network for connecting to the web, now comes the point where your device must listen on the web for the requests that come to the device and must act as the inputs. We call it creating a server. The server listens on web and respond to them. As for a beginning you can follow this article.

Does the Universal Windows Application infrastructure support any Serial Port communications?

I have a WPF desktop application that would make a good candidate as a Universal Windows App. The application has a must-have dependence on USB or Bluetooth devices that act as a Serial Port.
In all my reading I've yet to discover whether there is any access to a SerialPort API in a UWA.
I suspect the answer is 'No support'. If so, does anyone know of a USB or Bluetooth GPS that supports whatever APIs the UWA has for that sort of thing. I have to be able to read things like ground speed, elevation, rate of climb, etc.
If the answer is 'Supported', could you point me to some documentation.
For the "Bluetooth devices that act as a Serial Port", I assume you mean the RFCOMM. They are both supported on Windows Runtime since Windows 8.1 and you can also use them in the Universal Windows Application.
namespace: Windows.Devices.Usb and Windows.Devices.Bluetooth.Rfcomm.
About the Bluetooth GPS, I'm not sure if it uses RFCOMM or not (it depends on the devices), and it is also possible to use the GATT.
Code Sample: Custom USB device access sample

Bluetooth services on Google glass

Has anyone tried SPP service (RFCOMM) on Google glass? I couldn't find any documentation anywhere listing what kind of Bluetooth protocol or profile that Google glass supports.
I have run an OBEX service search on the glass, and it seemed like Google glass doesn't support OBEX. Other than OBEX, what other BT profile is known to work properly on the glass?
So for SPP service (RFCOMM) you can use the UUID "00001101-0000-1000-8000-00805F9B34FB" as you might already know, I'm using this and it works fine at 115.2K of baudrate.
Then in a separate thread you manage the connection, if you go to the developers portal of Android they have an explained example and good info of the protocol.
Using the Bluetooth APIs, an Android application can perform the following:
-Scan for other Bluetooth devices
-Query the local Bluetooth adapter for paired Bluetooth devices
-Establish RFCOMM channels
-Connect to other devices through service discovery
-Transfer data to and from other devices
-Manage multiple connections
Hope this helps!

Bluetooth LE - PAN1720 BlueRadios Serial Port Profile with Windows

I am using a Single-Mode Bluetooth Low Energy PAN1720BR BLE dongle which is loaded with the firmware "BlueRadios nBlue 1.2.1.3.1.0-PAN1720" (latest). When plugged to a computer, I can control and configure this PAN1720BR module with AT Commands through a terminal application on the computer.
With a second computer equipped with a standard BLE dongle, I can pair and connect to the PAN1720BR. See configuration below:
PC1 + PAN1720BR <---- BT 4.0 ----> PC2 + Standard BLE dongle + App running on PC2
The problem is that BLE does not have an SPP profile, so to establish a communication between the two PCs, I need to write an application on PC2. The PAN1720BR has a proprietary profile called BlueRadios Serial Port (BRPS) which is not a standard.
BlueRadios provides libraries for iOS and Android so that we can connect a cellphone to a PAN1720BR and communicate wih it. But they are silent about how to connect a PC (Windows) to a PAN1720BR. When establishing the connection, the Battery service (standard) installs properly on PC2, but the service corresponding to BRSP does not install, driver is missing. What is going on here is not very clear to me.
My goal is to write an application to be run on PC2 to enable communication between the two PCs. My question is, how can I access the Bluetooth with my application? Please correct me if I'm wrong, but I believe my app needs to access the ATT/GATT layer in order to read/write data.
Do you have any sample code that would help, in Java (prefered), C/C++, C# or anything else that would help on Windows?
Thank you
For an App with BLE Module from BlueRadios you must use the ATT/GATT Profile or you use the library from BlueRadios with there BRSP Profile.

How to connect to Bluetooth OBD II with visual C++ and for PC

I'm trying to use a Bluetooth OBDII (on-board diagnosis) to connect with a Bluetooth dongle connected to my computer (My OS is windows 7). The dongle connects to the device and assigns it 2 virtual com ports (COM4 for incoming and COM5 for outgoing), But unfortunately I couldn't communicate with this device over the virtual com port. I also attempted to work with winsock library but I didn't find any example for working with Bluetooth OBD and send and receive the instruments. I just found one Bluetooth API for android but it's not useful for me because I want to implement it inside the visual C++ and for PC. and right now I have 2 questions about that :
1. which method is better, Virtual com port or winsock and how ?
2. Do you have any sample code for working with Bluetooth OBD ?
1: Has your device a ELM327 chip? If so, you can setup a serial port over bluetooth, and communicate with that port. I don't know winsock very much, but I think a serial port is better suited for this job.
To set it up, have a look here: http://windows.microsoft.com/en-us/windows7/choose-a-com-port-for-a-bluetooth-enabled-device
Maybe if you can pair with the device, windows 7 will automagically set it up?
2:
You might want to have a look at: http://icculus.org/obdgpslogger/
It's open-source, so you can have a peek how it works. There's also a simulator in the package, which could help you developing/testing. Mostly is Linux based, but it should give you hints where to go. There are also windows installers available for the simulator.

Resources