女人被狂躁到高潮视频免费无遮挡,内射人妻骚骚骚,免费人成小说在线观看网站,九九影院午夜理论片少妇,免费av永久免费网址

當(dāng)前位置:首頁 > 通信技術(shù) > 通信技術(shù)
[導(dǎo)讀]Bluetooth to 1-Wire communication using the DS9097U Abstract: This application note explains how to enable communication between a Bluetooth® serial and Maxim® 1-Wire adapters. Topics discusse

Bluetooth to 1-Wire communication using the DS9097U

Abstract: This application note explains how to enable communication between a Bluetooth® serial and Maxim® 1-Wire adapters. Topics discussed are: selecting the proper Bluetooth adapter, setup instructions, and sample code to enable the communication. The DS9097U 1-Wire COM Port Adapter is used to receive the Bluetooth commands.

<-- ======================================================================= --><-- CONTENT: DB HTML --><-- ======================================================================= -->

Introduction

This article guides you through selecting the proper Bluetooth adapter, provides setup instructions, and presents sample code to enable communication with the Maxim 1-Wire adapter. The sample code provided is not intended as a complete solution, but rather as a starting point. The example code can be used to write a program for either a Windows® PC or a Windows Mobile® device. This example uses a Windows Mobile device.

Overview

Bluetooth is a short-range wireless technology originally intended as a cable replacement. It can send various types of information such as music, video, and data to other Bluetooth-capable devices located within 10 meters. Bluetooth has many protocols which handle the various types of data transfers.

This application note explains how to use the Bluetooth serial port protocol (SPP) to enable communication with Maxim's DS9097U 1-Wire COM Port Adapter. The DS9097U is a RS-232 to 1-Wire adapter that receives commands from a serial port and generates the appropriate signals required to communicate with 1-Wire devices. This document outlines the procedure to properly setup a third-party Bluetooth serial-port adapter. Example code is then provided for reading DS1920 temperature data from a Windows Mobile device using the Visual Basic 2008 Compact .NET programming platform and the serial-port control interface.

Required items

  • DS9097U COM Port Adapter
  • Bluetooth serial adapter (i.e., BlueSnap Standard)
  • Visual Basic 2008 Compact .NET
  • USB Bluetooth adapter for PC
  • Windows Mobile 6.1 (or 5.0)
  • Custom serial interface cable

Selecting a Bluetooth adapter

Two factors are involved in selecting a Bluetooth adapter that will be compatible with the DS9097U. First, consider the available current coming from the Bluetooth's DTR and RTS lines which powers the DS9097U (see Figure 1). Most RS-232 chips inside Bluetooth adapters should be able to supply the required current to power the DS9097U. If the adapter's specification does not have current parameters listed, then determine what RS-232 chip is used and verify its current-sourcing capabilities. Our application uses a BlueSnap Standard Bluetooth adapter from Serialio.com.


Figure 1. DS9097U schematic, DB-9 version.

Second, determine whether you can program the logic level of the RTS and DTR lines. The BlueSnap adapter did not allow this and required creating an additional cable to provide power from the 9V battery to both the RTS and DTR lines. This limitation prevented the use of 1-Wire standard libraries (OneWireLinkLayer.dll) which toggle these lines to reset the device.

Note: the Bluetooth's onboard firmware automatically toggles the RTS and DTR lines if handshaking is used. While usually convenient, it is detrimental in this application since these lines are the power pins for the 1-Wire adapter. If the Bluetooth adapter supports RTS and DTR control, the OneWireLinkLayer.dll can speed the programming development time.

Setup procedure

The following procedure outlines the required steps for hardware configuring.

Windows XP® SP3 setup procedure

  1. Insert a USB-to-Bluetooth adapter into the USB port of a PC and configure that adapter. Note: this is not the BlueSnap device, but rather a USB-to-Bluetooth device which will configure the BlueSnap adapter.
  2. Right click on My Computer and select Properties from the popup menu.
  3. Select the Hardware tab and click on Device Manager.



  4. Find the virtual ports (COM & LPT) created and expand the tree (circled items in figure below).



  5. Verify that you have at least one Bluetooth communication port and close all windows.
  6. Double click the My Bluetooth Places desktop icon.
  7. Click on Add a Bluetooth Device from the left menu.



  8. Click Next on the Bluetooth Setup dialog box.



  9. A Bluetooth Device Selection dialog box appears and begins scanning for devices.
  10. Ensure that the BlueSnap dipswitches 1 through 3 are in the OFF position and dipswitch 4 is ON. Switch 4 defaults the baud rate to 9600. Connect a 9V battery to the BlueSnap adapter, which causes the LED on the adapter to flash rapidly for 60 seconds. A connection must be made during this time or the adapter will timeout and the battery will have to be disconnected and reconnected. Depress the Search Again button in the dialog box to begin the search.
  11. The device shows up as BlueSnap.



  12. Double click the BlueSnap icon to begin the pairing process.
  13. Press Skip on the Bluetooth Security Setup dialog box.



  14. Check the SPP on the Bluetooth Service Selection dialog box.



  15. Press the Configure button to select the Bluetooth COM port that you will be using on the PC.
  16. Uncheck the Secure Connection check box, select a Bluetooth COM port (from step 5), and press OK.



  17. Press the Next button on the Bluetooth Service Selection dialog (step 14).
  18. If prompted with the following, simply press OK.



  19. On the Bluetooth Setup Wizard Completion Page (step 8), the default name for this connection can be modified if desired. Press the Finish button to establish the Bluetooth connection.
  20. The green LED on the adapter should be a solid green.
  21. If the connection is lost, return to My Bluetooth Places (step 6) and double click the BlueSnap icon created in step 19.
  22. If prompted for a security code, try entering 0000 or 1234. See the BlueSnap instruction manual for the adapter's default password.
  23. After establishing the connection, the BlueSnap icon in My Bluetooth Places can be double clicked to view the adapter's status.
  24. Launch the preinstalled Windows HyperTerminal from: Start Programs Accessories Communications.
  25. Enter a name for the connection in the New Connection dialog box and press OK.



  26. From the Connect To dialog, select the COM port configured in step 16 and press OK.



  27. From the COM# Properties dialog select the following options and press OK.



  28. HyperTerminal may show as connected even when the adapter connection has not been established. If the adapter's green light is flashing slowly, disconnect and reconnect the battery. Reestablish the Bluetooth connection by double clicking the BlueSnap icon in My Bluetooth Places (step 6). Once the connection has been established, disconnect and reconnect using the phone icons in the HyperTerminal tool bar.
  29. From the HyperTerminal File menu, select BlueSnap Properties.
  30. From the properties dialog, click the ASCII Setup...button.



  31. Make the following ASCII setup selections.



  32. Close all dialog boxes by clicking OK.
  33. In the HyperTerminal window type $$$; the device will respond with CMD. The CMD confirms that you are now in command mode. The BlueSnap LED changes from a solid green to flashing quickly.
  34. In the terminal type ST,255. This changes the timeout for discovery from 60 seconds to infinity. The adapter responds with <AOK>.
  35. To launch, the newly created HyperTerminal connection can be found at: Start Programs Accessories Communications HyperTerminal BlueSnap.ht.
  36. The device is now configured to stay in discovery mode once power is applied without any timeout.

Windows Mobile pairing procedure

  1. Use the Connection Wizard to search for the BlueSnap Bluetooth adapter.



  2. Select the BlueSnap device.



  3. Select the SPP service.



  4. Enter the device pin number (0000 or 1234) and press the green checkmark.



  5. When prompted to register a Bluetooth serial port, select Yes.



  6. Select Bluetooth serial-port name BTS from the Name dropdown box. Input an index number of zero. The index is similar to a COM port. Press the green check to accept changes. If an index number other than zero is used, the example code will need this portion of code modified in order to open the appropriate port.



  7. The Bluetooth Manager confirms that the port successfully registered.



  8. The available COM ports are listed in the manager.



  9. The BlueSnap adapter has successfully paired. Upon opening the BTS0 port, a connection between the mobile device and the BlueSnap device is established.

Windows application

Because the BlueSnap adapter cannot toggle the RTS and DTR lines, the OneWireLinkLayer.dll is not used in this example. Instead, the DS9097U 1-Wire COM Port Adapter (see Figure 1) is accessed directly with serial commands.

Download (ZIP) the sample project. Figure 2 shows the application running on a Windows Mobile device. The project contains a simple class with calls to commonly-used functions (including Search ROM).


Figure 2. Application running on Windows Mobile.

本站聲明: 本文章由作者或相關(guān)機(jī)構(gòu)授權(quán)發(fā)布,目的在于傳遞更多信息,并不代表本站贊同其觀點(diǎn),本站亦不保證或承諾內(nèi)容真實(shí)性等。需要轉(zhuǎn)載請(qǐng)聯(lián)系該專欄作者,如若文章內(nèi)容侵犯您的權(quán)益,請(qǐng)及時(shí)聯(lián)系本站刪除。
換一批
延伸閱讀

創(chuàng)新結(jié)構(gòu)融合多元材質(zhì) 東京 2025年5月27日 /美通社/ -- 卡西歐計(jì)算機(jī)株式會(huì)社今日宣布推出最新款G-SHOCK品牌抗震腕表MTG-B4000。這款全新腕表搭載由人類設(shè)計(jì)師與AI技術(shù)協(xié)同開發(fā)的獨(dú)特表框。MTG...

關(guān)鍵字: MT AI SHOCK BLUETOOTH

上海2024年7月30日 /美通社/ -- wire & Tube China 2024 將于9月25-28日在上海新國際博覽中心隆重開幕。自2004年創(chuàng)辦以來,wire China和Tube China深耕中國市場(chǎng),輻...

關(guān)鍵字: CHINA WIRE 電線電纜 BSP

Maplesoft數(shù)學(xué)套件有助于吸引和激勵(lì)學(xué)生,克服數(shù)學(xué)焦慮,培養(yǎng)、加強(qiáng)和評(píng)估真正的數(shù)學(xué)理解能力,并處理不同程度的學(xué)生準(zhǔn)備情況。

關(guān)鍵字: MAPLE 數(shù)學(xué)軟件 AN WIRE

倫敦, Feb. 23, 2023 (GLOBE NEWSWIRE) -- 英國一家領(lǐng)先的超級(jí)跑車租賃公司剛剛推出一種加密貨幣支付系統(tǒng),服務(wù)全球最出眾的超級(jí)跑車租賃業(yè)務(wù)。 目前,客戶可以選擇以比特幣、以太坊加密貨幣或英鎊...

關(guān)鍵字: CLASSIC 加密 AD WIRE

東京2023年1月25日 /美通社/ -- 2023年1月24日,國際科學(xué)技術(shù)財(cái)團(tuán)(The Japan Prize Foundation)公布2023年日本國際賞(Japan Prize)得主。中澤正隆(Mas...

關(guān)鍵字: RELEASE WIRE PI PS

在過去的一年公司經(jīng)歷了蓬勃發(fā)展,未來 Crurated 將尋求與法國和意大利以外的葡萄酒生產(chǎn)商進(jìn)行深度合作。

關(guān)鍵字: 區(qū)塊鏈 TE COM WIRE

倫敦, Dec. 12, 2022 (GLOBE NEWSWIRE) -- Crurated 是一個(gè)基于區(qū)塊鏈和會(huì)員制的葡萄酒社區(qū),著眼于葡萄酒行業(yè)創(chuàng)新。該社區(qū)近日推出了供客戶在此次假日季及之后挑選禮品葡萄酒的虛擬酒窖。...

關(guān)鍵字: TE COM WIRE PS

(全球TMT2022年11月9日訊)2022年11月4日,國際獨(dú)立第三方檢測(cè)、檢驗(yàn)和認(rèn)證機(jī)構(gòu)德國萊茵TUV大中華區(qū)(簡(jiǎn)稱"TUV萊茵")為全球化IoT開發(fā)平臺(tái)服務(wù)商杭州涂鴉信息技術(shù)有限公司的智能網(wǎng)關(guān)產(chǎn)品Smart Wi...

關(guān)鍵字: GATEWAY SMART WIRE 智能家居

杭州2022年11月9日 /美通社/ -- 2022年11月4日,國際獨(dú)立第三方檢測(cè)、檢驗(yàn)和認(rèn)證機(jī)構(gòu)德國萊茵TUV大中華區(qū)(簡(jiǎn)稱"TUV萊茵")為全球化I...

關(guān)鍵字: GATEWAY SMART WIRE 智能家居

(全球TMT2022年6月23日訊)德州儀器 (TI)在其連接產(chǎn)品組合中推出了全新的無線微控制器 (MCU)系列,可實(shí)現(xiàn)高品質(zhì)、低功耗的藍(lán)牙連接功能,而價(jià)格只需競(jìng)爭(zhēng)器件的一半。SimpleLink 低功耗藍(lán)牙 CC23...

關(guān)鍵字: BLUETOOTH MCU 低功耗
關(guān)閉