C# Code for Bluetooth

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2009
Posts: 6
Reputation: something78 is an unknown quantity at this point 
Solved Threads: 0
something78 something78 is offline Offline
Newbie Poster

C# Code for Bluetooth

 
0
  #1
Mar 24th, 2009
Hi, I am a student doing my Final Term Project.

I am suppose to create a GUI using C# that can control and interact with a Robot call Robonova-1. The robot will be connected to the PC via Bluetooth.

I was thinking to have a connection button in my GUI to allow it to establish the connection between the GUI and the robot, but I have no idea how I should go about working on it. Because I have never learn C# before.

Could any of the expert out there help me?
Reply With Quote Quick reply to this message  
Join Date: Dec 2003
Posts: 2,414
Reputation: alc6379 has a spectacular aura about alc6379 has a spectacular aura about alc6379 has a spectacular aura about 
Solved Threads: 123
Team Colleague
alc6379's Avatar
alc6379 alc6379 is offline Offline
Cookie... That's it

Re: C# Code for Bluetooth

 
0
  #2
Mar 24th, 2009
check this out, see if it provides any guidance:
http://blogs.msdn.com/codejunkie/arc...t-using-c.aspx
Alex Cavnar, aka alc6379
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 6
Reputation: something78 is an unknown quantity at this point 
Solved Threads: 0
something78 something78 is offline Offline
Newbie Poster

Re: C# Code for Bluetooth

 
0
  #3
Mar 24th, 2009
Originally Posted by alc6379 View Post
check this out, see if it provides any guidance:
http://blogs.msdn.com/codejunkie/arc...t-using-c.aspx

hi there,

thanks for the reply. is there any other site that i can visit? cant seems to be able to go into the site you given...
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 3
Reputation: jammmie999 is an unknown quantity at this point 
Solved Threads: 0
jammmie999 jammmie999 is offline Offline
Newbie Poster

Re: C# Code for Bluetooth

 
0
  #4
Apr 27th, 2009
Originally Posted by something78 View Post
hi there,

thanks for the reply. is there any other site that i can visit? cant seems to be able to go into the site you given...
Why cant you access it. Heres the site content



As they say Necessity is mother of invention, I recently got a Jabra BT3030 Bluetooth headset. I paired it to my Windows Mobile phone. When I wanted to turn on the Bluetooth, I had to go to wireless manager and turn it on. I am a little bit lazy and had an idea why not map a button on the phone to toggle the bluetooh radio. But, this is not possible by default, so started working on a program to map to the button.

Fortunately it is very simple to interact with Bluetooth radio and devices on the phone using Windows Embedded Source Tools for Bluetooth Technology. This download contains bunch of C# files which you can directly use in your code. You will get classes such as BluetoothDevice and BluetoothRadio which allow you to control the device and paired devices.
  1. 1: using System;
  2.  
  3. 2: using System.Collections.Generic;
  4.  
  5. 3: using System.Text;
  6.  
  7. 4: using Microsoft.WindowsMobile.SharedSource.Bluetooth;
  8.  
  9. 5:
  10.  
  11. 6: namespace ToggleBluetooth
  12.  
  13. 7: {
  14.  
  15. 8: class Program
  16.  
  17. 9: {
  18.  
  19. 10: static void Main(string[] args)
  20.  
  21. 11: {
  22.  
  23. 12: BluetoothRadio brad = new BluetoothRadio();
  24.  
  25. 13: if (brad.BluetoothRadioMode == BluetoothRadioMode.Off)
  26.  
  27. 14: brad.BluetoothRadioMode = BluetoothRadioMode.On;
  28.  
  29. 15: else
  30.  
  31. 16: brad.BluetoothRadioMode = BluetoothRadioMode.Off;
  32.  
  33. 17: }
  34.  
  35. 18: }
  36.  
  37. 19: }

After that, I added a setup project and made sure that a shortcut for the application is under Programs folder, so that I can map it using the Buttons applet of Settings panel. After the install on the device, you should be able to see the program in the "Assign a program" list.

As usual, here are some links and blog post.

Windows Embedded Source Tools for Bluetooth Technology - http://msdn.microsoft.com/en-us/embedded/aa714533.aspx
Channel 9 Wiki (has a good Q&A) - http://channel9.msdn.com/wiki/bluetoothdevelopment/
MSDN Code Samples page - http://msdn.microsoft.com/en-us/library/bb158662.aspx

NOTE: I did not write this. - http://blogs.msdn.com/codejunkie/arc...t-using-c.aspx
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 1
Reputation: martin_dev is an unknown quantity at this point 
Solved Threads: 0
martin_dev martin_dev is offline Offline
Newbie Poster

Re: C# Code for Bluetooth

 
0
  #5
Sep 23rd, 2009
Hi there!
It's a very different things: Mobile Bluetooth API and Win32 (desktop) Bluetooth API. Moreover, there are at least 3 drivers more in addition to MS BT drivers.
I used Wireless Communication Library in my projects and it shown very good results for me.
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC