IT Community - Software Programming, Web Development and Technical Support

How to write Bluetooth Connection program in c# for Windows mobile 5.0 ?

This is a discussion on How to write Bluetooth Connection program in c# for Windows mobile 5.0 ? within the Windows Mobile forums, part of the Mobile Software Development category; In Compact framework 1.0, we don't have any managed class which handles bluetooth socket connections. InTheHand is a ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Mobile Software Development > Windows Mobile

Register FAQ Members List Calendar Mark Forums Read
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-15-2007, 11:16 PM
theone theone is offline
D-Web Sr.Programmer
 
Join Date: Jun 2007
Posts: 129
theone is on a distinguished road
Default How to write Bluetooth Connection program in c# for Windows mobile 5.0 ?

In Compact framework 1.0, we don't have any managed class which handles bluetooth socket connections.

InTheHand is a third party component which gives the functionalities of bluetooth services for windows mobile. You can download the InTheHand from here

here URL : Download 32feet.NET 2.0.60828 for Windows Mobile PocketPC - Softpedia

Using the code
In this article the source code available for download. There have been the devices are displaying in a combobox when click the first button name of Search devices. Then we can connect the selected device from the combobox by clicking the button named Connect.

The code is noted in below which is used in the project.

//// Directives.
using InTheHand.Net;
using InTheHand.Net.Bluetooth;
using InTheHand.Net.Sockets;
////Declaration//
private BluetoothClient bluetoothClient;
private Guid service = BluetoothService.DialupNetworking;
////Search the devices and displaying in combobox.//
BluetoothRadio.PrimaryRadio.Mode = RadioMode.Discoverable;
bluetoothClient = new BluetoothClient();
Cursor.Current = Cursors.WaitCursor;
BluetoothDeviceInfo[] bluetoothDeviceInfo = { };
bluetoothDeviceInfo = bluetoothClient.DiscoverDevices(10);
comboBox1.DataSource = bluetoothDeviceInfo;
comboBox1.DisplayMember = "DeviceName";
comboBox1.ValueMember = "DeviceAddress";
comboBox1.Focus();
Cursor.Current = Cursors.Default;
////Connect the selected device.//
bluetoothClient.Connect(new BluetoothEndPoint((BluetoothAddress)
_comboBox1.SelectedValue, service));


you can download the sample code from here: URL : The Code Project - Member Logon - Free Source Code and Tutorials
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/windows-mobile/1738-how-write-bluetooth-connection-program-c-windows-mobile-5-0-a.html
Posted By For Type Date
How to write Bluetooth Connection program in c# for Windows mobile ... | Web Hosting This thread Refback 01-13-2008 08:36 AM
The Code Project - Member Logon - Free Source Code and Tutorials This thread Refback 11-01-2007 05:10 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
can we write a c program for a elctronics product? saravanan C and C++ Programming 3 03-31-2008 09:42 PM
How do I write a clock program in JavaScript? itbarota HTML, CSS and Javascript Coding Techniques 2 10-12-2007 09:55 PM
How Can we search Bluetooth Devices using C# for windows mobile? mobilegeek Windows Mobile 2 08-17-2007 07:07 AM
What is the difference between internet connection and GPRS or mobile net connection? sathishkumar Computer Hardware 2 08-11-2007 03:16 AM
Windows Mobile 5.0 PocketPC v2.0 emulator Bluetooth peripheral serial port mapping pr theone Mobile Software Development 1 07-25-2007 02:04 AM


All times are GMT -7. The time now is 04:21 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0