Home

Bluetooth I2C Bus Adapter™

image

Contents

1. an ACK NAK for a write request MSB LSB Tag Value 1 byte 1 byte 1 byte The response to the tag request is 11 MSB LSB ACK 0xA8 Data Tag Value Stop NAK 0xA9 Length 1 byte 1 byte 1 byte 1 byte The returned tag value has the same value as the tag in the request The Data Length byte is 1 for a tag response 2 3 5 Combined Requests Instead of transmitting a separate e g write or read request it is possible to combine different packets into one packet over air The Bluetooth I2C Bus Adapter will perform repeated read and write operations on the I2C bus for a combined read write request To create combined requests the stop byte of the previous packet is left out and instead the start byte of the next packet acts as both the stop byte and start byte It is only the last request in a combined request that has a stop byte For example assume that a combined request with a tag I2C write I2C read and time request shall be created It then looks like MSB Tag Value Write IC Slave OxAS OxAl Address 1 byte 1 byte 1 byte 1 byte 1 byte LSB Read DC Slave Data Time Stop OxA2 Address Length OxA4 OxA3 1 byte 1 byte 1 byte 1 byte 1 byte The response to the above combined packet will be MSB LSB ACK 0xA8 Data Tag Read Time Stop NAK 0xA9 Length Value Data OxA3 1 byte 1 byte 1 byte Data 4 bytes 1 byte Length from read packe
2. sensor to initialize the sensor 2 Bluetooth connection is setup The request writes to the control register of the sensor to make the sensor leave sleep mode and enter online mode 3 Bluetooth connection is terminated The request writes to the control register of the sensor to make the sensor leave online mode and enter sleep mode 4 Periodic The request that is periodically being executed reads the sensor value which is then sent back to the remote device currently connected Hence by using the I2C events it is possible to pre configure the Bluetooth I2C Bus Adapter to completely control an I2C slave without the need for the host device to send a lot of requests 13 AT Commands Reference This section describes only the differences in AT commands compared to the standard serial port adapter 2 5 Miscellaneous Commands 2 5 1 Read_12C_Setttings AT AMIS AT Command Description Responses lt CR gt lt LF gt AMIS lt bit_rate gt lt enable_time gt AT AMIS lt CR gt This command reads the 2 settings Description Successful response lt disable_on_disconnect gt lt CR gt lt LF gt OK lt CR gt lt LF gt lt CR gt lt LF gt ERROR lt CR gt lt LF gt Response Type Parameters enable_time Enumerator disable_on_disconnect Enumerator Error response Value 1 Bit rate on I2C bus of 100 kbits s 2 Bit rate on 12C bus of 400 kbits s default Enables the Bluetooth 12
3. C Bus Adapter to track time since power on 0 Disabled Returns time 0 default 1 Enabled Returns milliseconds since power on Please note that when enabled a timer is running in the module This means that the module will never enter stop mode when there is an active Bluetooth connection 0 Always let the 12C interface be enabled de fault 1 Disable 12C interface if there is no Bluetooth connection 14 2 5 2 Write_12C_Setttings AT AMIS Description Writes the 12C bus interface configuration AT Command AT AMIS lt bit_rate gt lt enable_time gt lt disable_on_disconnect gt lt CR gt Note that the configuration is always stored in the startup database Command Parameters bit_rate Enumerator enable_time Enumerator disable_on_disconnect Enumerator Responses lt CR gt lt LF gt OK lt CR gt lt LF gt lt CR gt lt LF gt ERROR lt CR gt lt LF gt Value 1 Bit rate on 12C bus of 100 kbits s 2 Bit rate on 12C bus of 400 kbits s default Enables the Bluetooth I2C Bus Adapter to track time since power on 0 Disabled gt Returns time of 0 default 1 Enabled gt Returns milliseconds since power on Please note that when enabled a timer is running in the module This means that the module will never enter stop mode when there is an active Bluetooth connection 0 The I2C bus is always enabled default 1 Disable 12C interface if there is no Bluetooth connec
4. Hex Coded 3 bytes 0x5C 0x5C 0x35 0x43 5C 0x08 0x5C 0x30 0x38 08 Ox0A 0x5C 0x30 0x41 0x0D 0x5C 0x30 0x44 10D 2C 0x2C 0 5 0x32 0x43 42 For example OxA1 0x08 0x01 0x15 OxA3 must be coded to OxA1 0x5C 0x30 0x38 0x01 0x15 OxA3 Please note that the lt i2c_request gt of the read command AT AMRIE is not coded This will change in future versions of the 2C adapter Description Successful response Error response 17
5. INDUSTRIAL BLUETOOTHTM C3 Bluetooth Bluetooth I2C Bus Adapter User Manual 3 0 connectBlue Bluetooth I2C Bus Adapter User Manual 3 0 Copyright O 2003 connectBlue AB The contents of this document can be changed by connectBlue AB without prior notice and do not constitute any binding undertakings from connectBlue AB connectBlue AB is not responsible under any circumstances for direct indirect unexpected damage or consequent damage that is caused by this document All rights reserved Release 0711 Document version 3 0 Document number cBProduct 07 10 09 5 Printed in Sweden Trademarks Registered trademarks from other companies are Bluetooth is a trademark owned by the Bluetooth SIG Inc Microsoft Windows Windows NT Windows 2000 Windows CE Windows ME Windows XP are registered trademarks from Microsoft Corporation Contents L INTRODUCTION 7 JRELATED DOCUMENTS itte tai 7 2 FUNCTIONAL DESCRIPTION 222000000000000000000000000000000000000000000 0000000 8 2 1 SERTAL INTBEREPAGCE cin vice 9 IN 9 2 37 PROTOCOTAOVER AIR ctas 9 2 3 1 Write Request iene ad ed ted eee 10 2 3 2 Read REQUEST sede iet re recibe end 10 77 2 9 77 2 35 Combined Requests 222m a ei eden 12 24 EVENTS cti ls 13 AT COMMANDS REFERENCE see 14 2 5 MISCELLANEOUS COMMANDS pp 14 2 5 1 Read I2C Setttings 4734AHI1 7 14 2 5 2 Write I2C S
6. etttings AT AMISz essen 15 2 5 3 Read I2C Events 15 2 5 4 Write Event AT AMWIET ccce 16 1 Introduction This document describes the functionality of the Bluetooth I2C Bus Adapter The Bluetooth 12C Bus Adapter is a variant of the standard Serial Port Adapter SPA that implements the master side of the I2C bus interface It is configured using AT commands in exactly the same way as the standard Serial Port Adapter The Bluetooth I2C Bus Adapter firmware is available for the following products e CB OEMSPA311 e 1 1 1 Related Documents e Serial Port Adapter AT Commands document contains a description of the AT commands supported in the standard Serial Port Adapter It also contains information on how to use the AT commands to create Bluetooth applications The command line format and data types used for the AT commands are defined in this document e Serial Port Adapter Electrical amp Mechanical Datasheet e 12C Bus Specification version 2 1 January 2000 2 Functional Description The Bluetooth I2C Bus Adapter is a variant of the standard SPA that implements the master side of the I2C interface t provides functionality to Bluetooth enable a number of slaves on 2 bus Instead of connecting the I2C master device directly to the I2C bus the Bluetooth I2C Bus Adapter is connected If the pr
7. evious master device supports Bluetooth and a simple I2C look ali ke protocol over air the previous master device can access all I2C slaves available on the I2C bus over Bluetooth The Bluetooth I2C Bus Adapter is configured using the same AT commands as for the standard Serial Port Adap additions described later i er see Serial Port Adapter AT Commands document with some n this document Typically it is pre configured once using a toolbox or AT commands and then mounted and used for reading and writing data to from the slaves on the I2C bus Of course it is also possible to use it more dy Device with Bluetooth DC Bus SPP or DUN Adapter Profile Simple I2C look alike protocol over air namically and or to re configure it over air Bluetooth Bluetooth PC Bus RC RC Slave Slave Figure 1 The Bluetooth I2C Bus Adapter is connected to the I2C bus The remote device supports either the SPP or DUN profile and implements the simple I2C look alike protocol over air The host can then access all the I2C slaves on the I2C bus 2 1 Serial Interface The serial port of the Bluetooth I2C Bus Adapter is only used to execute AT commands Hence it is not possible to transmit data transparently over air as with the normal serial port adapter Please note that HW flow control is not supported The CTS pin is instead used as an external trig signal 2 2 lO Pins T
8. he following pins differ from the normal serial port adapter e Serial Select 12C Serial Data SDA The SDA pin has a 47kQ internal pull up to VCC 2 9 3 1V Normally a 2 2kQ is more common in I2C applications and a 2 2kQ external pull up could be used if necessary e Serial Select 7 2 clock SCL The SCL pin has a 47k internal pull up to VCC 2 9 3 1V Normally a 2 2kQ is more common in I2C applications and a 2 2kQ external pull up could be used if necessary e UART CTS External trig input e UART RTS Not used See Electrical and Mechanical data sheet for details 2 3 Protocol over air To communicate with the Bluetooth I2C Bus Adapter over air a simple I2C look alike protocol must be used The following request packets are defined e Write Writes data to I2C bus e Read Reads data from I2C bus e Time Special packet to timestamp response packets e 7 9 Special packet to set an identifier to a request packet The identifier is included in the response packet Hence it is possible to identify what response that is associated with what request Each packet consists of a start byte and a stop byte The start byte is also used as the request packet identifier Hence there are several actual values of a start byte depending on what packet type it is The stop byte can be replaced by the start byte of a new packet A combined packet is then created Typically for I2C this means a repeated write or a repeated
9. is request is MSB LSB ACK 0xA8 NAK 0xA9 1 byte 1 byte 1 byte 10 The Data Length byte is the number of bytes in Data 2 3 3 Time Request The time packet does not execute any I2C operations at all Instead an ACK NAK packet is sent back with the time read by the Bluetooth I2C Bus Adapter Normally this is only useful if the packet is part of a combined packet with I2C read and or write operations MSB LSB 1 byte 1 byte To measure time the Bluetooth I2C Bus Adapter must continuously keep a timer running This affects the stop mode and may not be desirable Therefore the time tracking is by default disabled If a time request is sent to the module when the time tracking is disabled it will return four bytes set to zero The response to the time request is MSB LSB ACK 0xA8 NAK 0xA9 1 byte 1 byte 4 bytes 1 byte The time is represented as four bytes Big Endian and the measured time is the number of milliseconds since power on The Data Length byte is 4 for a time response The timer will reset after 1 week 2 3 4 Tag Request The tag packet does not execute any I2C operations at all Instead an ACK NAK packet is sent back with the included tag value Normally this is only useful if the packet is part of a combined packet with I2C read and or write operations It provides a way to identify what request that a received response is associated with Also it is a way to always get
10. ons of the 2C adapter See lt i2c_request gt of the write command AT AMWIE 2 5 4 Write_I2C Event AT Command AT AMWIE lt event gt lt period gt lt i2c_request_length gt lt i2c_request gt lt CR gt Response Parameters AT AMWIE This command configures an I2C request If a pre configured event is triggered the associated 12C request is executed Note that the configuration is always stored in the startup database 16 event Enumerator period Enumerator 2 request length Enumerator I2c request Enumerator Responses lt CR gt lt LF gt OK lt CR gt lt LF gt lt CR gt lt LF gt ERROR lt CR gt lt LF gt 1 Power On 2 Bluetooth connection up 3 Bluetooth connection down 4 Timer periodic 5 External Trig CTS pin activated 6 Best effort continuously executed as quickly as possible if no other I2C commands are avail able Note that the Timer and External Trig events are only executed if there is an active Bluetooth connection or if the Bluetooth I2C Bus Adapter is configured for 12C interface always enabled The Timer event is periodically executed if con figured with this period in milliseconds Number of bytes of the 12C request 12C request where the byte code must apply to the protocol specified in Section 2 3 Since the 12C request is a byte stream which may contain control characters part of the AT command some bytes need to be coded Symbol
11. read There are also two types of response packets defined e Response to a successfully performed request e Response to an unsuccessfully performed request Note that these packets are only received if there is some data to transmit from e g a read request If the request only contained an I2C write no response is sent One way to always get a response is to create a combined packet with a tag in it At least the tag will then be sent back 2 3 1 Write Request The write packet executes an I2C write operation MSB LSB Write DC Slave Data Data Stop OxAl Address Length OxA3 1 byte 1 byte 1 byte 1 byte The data length is specified by the Data Length byte When the Bluetooth I2C Bus Adapter gets the packet it writes the included data to the addressed I2C slave There is no response to this packet If a response is needed the request should be combined with a tag request 2 3 2 Read Request The read packet executes an I2C read operation MSB LSB Read DC Slave Data Stop OxA2 Address Length 0x43 1 byte 1 byte 1 byte 1 byte The data length specifies how many bytes the Bluetooth I2C Bus Adapter should expect when performing the read operation When the Bluetooth I2C Bus Adapter gets the packet it reads the specified number of bytes and sends an ACK or NAK packet back with the included data Note that the application must keep track on what the data is The response to th
12. t 12 The response Data Length is the added number of bytes of the tag value read data and the time Please note that the device that made the request must keep track on what the response must look like 2 4 Events It is possible to store request packets in the Bluetooth I2C Bus Adapter associated with specific events A request is then executed when its associated event occurs Possible events are e Power on e Bluetooth connection is setup e Bluetooth connection is terminated e Periodic only executed if there is an active Bluetooth connection or if the Bluetooth I2C Bus Adapter is configured for I2C interface always enabled e External Trig CTS pin only executed if there is an active Bluetooth connection or if the Bluetooth I2C Bus Adapter is configured for I2C interface always enabled e Best Effort continuously executed if there is no other events or data available Hence the event will execute as fast as possible with the shortest possible time in between as long as there are no other events or incoming I2C data over air When an event is triggered e g a Bluetooth connection is setup the associated request is executed The request is a number of bytes that complies to the protocol over air see Section 2 3 For example assume that a Bluetooth I2C Bus Adapter is connected to a sensor on an I2C bus One configuration could then be 1 Power on event The request writes to the control register of the
13. tion Description Successful response Error response 2 5 3 Read 2 Events AT AMRIE AT Command Description AT AMRIE event CR This command reads a pre configured I2C request associated with an event If a pre configured event is triggered the associated 12C re quest is executed Responses Description 15 lt CR gt lt LF gt AMRIE lt period gt lt i2c_request_length gt Successful response lt i2c_request gt lt CR gt lt LF gt OK lt CR gt lt LF gt lt CR gt lt LF gt ERROR lt CR gt lt LF gt Error response Response Type Value Parameters event Enumerator 1 Power On 2 Bluetooth connection up 3 Bluetooth connection down 4 Timer periodic 5 External Trig CTS pin activated 6 Best effort continuously executed as quickly as possible if no other I2C commands are avail able Note that the Timer and External Trig events are only executed if there is an active Bluetooth connection or if the Bluetooth I2C Bus Adapter is configured for 12C interface always enabled period Enumerator The Timer event is periodically executed if con figured with this period in milliseconds I2c_request_length Number of bytes of the I2C request I2c_request Enumerator 12C request where the byte code must apply to the protocol specified in Section 2 3 Please note that the lt i2c_request gt ofthe read command AT AMRIE is not coded This will change in future versi

Download Pdf Manuals

image

Related Search

Related Contents

User Manual Stainless Steel 4 Slice Toaster Notice d`emploi Grille  Therma-Stor Products Group TS-285 User's Manual  Tripp Lite DisplayPort to HDMI Converter Video Adapter, 1920x1200/1080p (M/F)  químicasquimxel  LabelManager® Wireless PnP  CentreCOM FS808TP V1ユーザーマニュアル  PRIZM PRIZM USER MANUAL February 2007  7320 Interfacility Link Installation and User's Guide  BETRIEBSANLEITUNG DH-Trockenbehälter 30-4000 Liter  

Copyright © All rights reserved.
Failed to retrieve file