在Windows Mobile模擬器上使用藍芽

來源:互聯網
上載者:User

   

    大家知道,Windows Mobile 6.0 SDK內建了cellular emulator和fake GPS,使得我們可以在模擬器上調試radio級的phone call和基於GPS的地理位置應用。前幾天,一位MVP Dmitry Klionsky撰寫了文章《Bluetooth for Microsoft Device Emulator》,講述了在Windows Mobile模擬器上使用藍芽的方法,我覺得這對於開發行動裝置上藍芽通訊的朋友來說,是非常有用的。

    我們來看看實現Bluetooth的架構,參考圖1(來源於Bluetooth for Microsoft Device Emulator),主要包括emulator端和PC端:

圖1:Emulator和PC上實現Bluetooth通訊的架構

1. Emulator端

Bluetooth HCI Transport Driver

Serial Port Driver

Microsoft Remote Tools Framework remote agent

2.  PC端

Microsoft Remote Tools Framework desktop plugin

FreeBT USB Driver runtime

FreeBT USB Driver

Connected Bluetooth USB device

    注意:作者採用了FreeBT這個開源的工程來控制Bluetooth的接入。

 

    在Windows Mobile模擬器上使用藍芽的必要條件有:

1. Visual studio 2005 with SP1 或者 Visual studio 2008

2. Windows Mobile 5.0 Pocket PC/Smartphone SDK and/or Windows Mobile 6 Standard/Professional SDK emulator images

3. Device Emulator 3.0

4. Microsoft Remote Tools Framework 1.00

5. 一個具有USB介面的Bluetooth dongle

 

    在Windows Mobile模擬器上使用藍芽的步驟如下(詳細請參考Bluetooth for Microsoft Device Emulator):

1.  在PC端安裝下載的FreeBT的藍牙堆疊,方法自然是通過“windows裝置管理員”,為新的硬體裝置(也就是串連的Bluetooth USB device)添加下載過來的驅動(主要是找到fbtusb.inf檔案)。

2. 在Remote Tools Framework plugin中運行BthEmulManager.cetool,將其和模擬器建立串連。

3. 串連建立以後,藍牙裝置的資訊(Address, Manufacturer, HCI Version, LMP Version)就會顯示在介面上了,2所示(來源於Bluetooth for Microsoft Device Emulator).

 

圖2:建立藍芽聯絡以後,在模擬器上的資訊

4. Microsoft Remote Tools Framework允許我們同時開啟兩個模擬器,因此,如果手頭有兩個Bluetooth USB dongle的話,我們就可以在兩個模擬器上調試藍芽的收發通訊了。

 

參考連結:

Dmitry KlionskyBluetooth for Microsoft Device Emulator

MSDN:Bluetooth HCI Transport Driver

MSDN:Serial Port Driver

Open source:FreeBT

Device Emulator 3.0

Microsoft Remote Tools Framework 1.00

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.