Main Site Documentation

Data Connection to PC via Bluetooth


#1

I need to exchange data between a NETMF device and a Laptop with builtin Bluetooth.
The customer wants to use Bluetooth because Laptop computers usually have Bluetooth and it should be wireless.
According to the description of the Bluetooth module in catalog
https://www.ghielectronics.com/catalog/product/312
this should not be a problem.

But how do I implement the PC side?
Is there something like a generic WinUSB driver for Bluetooth?

Or can I optionally use some ptp wifi connection? AdHoc network or similar?

As controller I might use a G120, but if anyone says there is a cheaper option like Carb which would work as well I would look into this as well.

In fact the device needs to measure 8 Analog inputs and send a snapshot of this data to the Laptop.


#2

I found the code at http://32feet.codeplex.com/ to be quite helpful. I installed their package and selected the example SdpBrowserDesktop.sln and it worked. It was a good starting point for communications with a FEZ Raptor and bluetooth module.
Be aware that the module will not work with iOS systems, but works well with my PC, older Sony laptop, and with several Android devices I have tried.


#3

The Bluetooth module used by GHI is very inexpensive comparatively speaking, but is 2.1 and not supported by all devices.

If you want to go 4.0BLE - here’s an option: https://www.ghielectronics.com/community/creations/entry/20

If you want to go WiFi – which I imagine would be more globally supported (just not the most inexpensive solution):

https://www.ghielectronics.com/catalog/product/444


#4

@ mhectorgato,rockybooth - Thank youo both.
I think both Bluetooth and Wifi would work.


#5

@ GHI: is it possible to use WiFi RN171 module with an external antenna?


#6

What range to you need?
Simple to do via a BLE module which would work on laptops, tablets etc.


#7

@ Justin - I need a range of only 10 or 15 meter, but I might put the module and SoM in a robust mettal housing.


#8

I have BLE modules with UFL connectors…


#9

@ Reinhard Ostermeier -
But be aware that the build in Bluetooth of elder Windows Notebooks does not support BT 4.0 and you need a special dongle that supports BT 4.0.
If you don’t want to use iOS Devices i think that still BT 2.0 and the 32feet.net library on the PC is the right choice.


#10

What I read here confirms my bad feeleng I have for Bluetooth for years now. I try to avoid it when ever possible.
I think I try to coinvice our customer that WiFi is way better.
And with RN171 no additional router or complicated Setup is needed.
Just connect to WiFi Network and go for it.
The higher Price is compensated by the easier programming on PC side, just simple Socketinig and no bluetooth Driver thingy with 3rd Party Software, …

thanks too all for the suggestions.


#11

i don’t use the bluetooth fore a long time now, so maybe the problems are coming later…
I agree to you the problem with 3rd Party Software. This is the reason why i use the bluetooth module in host mode. So its possible to use on PC side an a virtual com port for bluetooth.
Easy programming a com - no 3rd party software…


#12

Thank you for the info. Good to know that this is possible.
But still, Bluetooth is a bunch of incompatible ‘standards’.
I remember when I wanted to connect my WiiMote to my PC.
“Oh you can use this BT dongle, but don’t use the original BT stack, MS BT stack also does not work. You can use this BT Stack, but the latest version is bound to their hardware, so try to get an older installer for it, …” :wall:
Finally it worked, but I don’t think that this was in the mind of the BT inventor originally.


#13

Starting with 8.1 windows has inbuilt ble api’s
So does IOS and 4.3 android, so no 3rd code is needed for ble.


#14

The BZ/WiFi module is an add on for a device that’s already on the market with several hundred pieces. (not sure if all of them should get updated)
Also the Laptop computers are already existing.
I wouldn’t wonder if some of them are still running WinXP ::slight_smile:

A working solution for most of the devices/Laptops out there with a minimum configuration effort goes before low price.
So WiFI RN171 is currently ahead of BT.
I know you just want to sell you BT module Justin, but currently you’re behind :whistle:


#15

Actually i don’t mind either way and you need to pick the right tool for the job, and as it stands i have far too many pots on the stove to have time to sell modules and make any money :smiley:


#16

do you have a link for 8.1?


#17

http://windows.microsoft.com/en-gb/windows-8/meet ::slight_smile:

Or if you meant some code…here is a simple app from a Windows 8.1 app to a Cerbot

http://www.ingenuitymicro.com/media/1097/Cerbot.zip

GATT API


#18

@ Justin - woh… Windows 8.1 , still running windows 3.5 ;D

Tanks for the rest


#19

I think Bluetooth is not so bad. The 32feed.net library is known to work on all Windows Desktop Versions from XP to 8.1 with the normal Windows BT Stack. The Code of the 32feet.net library is open source.
If you take my Codeshare Entry FEZ/PC Bluetooth File Transfer Seerver/Client as a basis you can have a working solution in few hours.


#20

last year i had a project of two card communicating through bluetooth. I made a .net simulator running on a PC which shared the same code. I think the simplest way is to have a bluethooth wich can emulate a virtual COM port. The bluetooth driver of my laptop was able to do it. Then you just have to figure the name of the COM port (COM5 for instance) and use it like a COM port in .Net. this is the same way in µ.Net.

You can check our COM class used by both .NET on computer and FEZ Panda here :