Use C # to develop the. net cf Bluetooth communication module
In Windows Mobile software development,. Net is playing an increasingly important role. We can see a lot of software developed with. Net CF, which involves all aspects of daily applications. In the software development of smart devices, wireless interconnection is a very important part. We can see that infrared is the standard for almost all smart devices, bluetooth is also increasingly emerging on more and more smart devices. With hardware, it is clear that there must be corresponding software-related applications.
We also know that it is quite easy to use. net cf to develop infrared communication applications, because. net cf has a namespace System. Net. IrDA, which is the communication module used for infrared communication. However, there is no module for Bluetooth communication in. net cf, so it is still difficult to develop this module. Next, let's talk about how to use C # to develop the. net cf Bluetooth communication module.
I. Key points
First of all, it is clear that the development cannot be completed only by understanding the C # development knowledge because of the driver hardware problem. We must understand the C ++ development knowledge. For the sake of simplicity, we do not want to use C ++ to write half-line code. All coding work uses C #. That is to say, only Visual Studio.net is used in the development environment, no other editor is required.
As a preparation for developing such driver hardware programs, you need to understand the basic knowledge of C ++, know what the header file is, and know how managed code interacts with non-hosted code. Because the core of this article is to illustrate how to develop the. net CF Bluetooth communication module, the above preparations are not described.
2. About Bluetooth
To develop a Bluetooth communication module, you must first know what Bluetooth communication is like. In my opinion, Bluetooth communication should be similar to the infrared communication module. Of course, from the developer's point of view, this should be the case after Abstraction. Of course, there are many differences between Bluetooth and infrared communication, in the object-oriented design, I think many people will understand it better than me. Well, this is our basic idea. I have checked articles about Bluetooth development on the Internet. net CF Development treats Bluetooth communication as a serial communication, which is also good, but I do not like it very much, because in this case, it is not developed for Bluetooth, in other words, during use, you need to manually enable Bluetooth, pairing, connection, establish a serial channel, and then enable application use. You also need to set the serial port in the application. For end users, this is very troublesome. In my opinion, this solution is simply named after Bluetooth communication ...... Let's not talk about it anymore.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.