background image

ODIN-W2 series - Getting Started 

UBX-15017452 - R02 

Advance Information  

Bluetooth configuration 

 

 

Page 12 of 27

 

5

 

Bluetooth configuration 

You can configure the ODIN-W2 module according to specific customer requirements using AT commands (see 

ODIN-W2 AT Commands Manual [1]

). The easiest way to get started is to use the s-center, which is a graphical 

user interface for sending AT-commands  (see 

s-center Quick Start  Guide  [4]

). The s-center allows for easy 

configuration with the most common AT commands. 

5.1

 

Basic settings 

There are some basic commands for controlling the general Bluetooth behavior of the module. 

 

Connectable (AT+UBTCM):

 Shall other devices be able to connect to the module? This does not affect 

outgoing connections. 

 

Discoverable (AT+UBTDM):

 Shall the module be visible to remote devices making inquires? 

 

Pairable (AT+UBTPM):

 Shall another device be able to pair (authenticate) with the module? 

 

Bluetooth name (AT+UBTLN):

 The name found by remote devices making inquires. 

 

Class of device (AT+UBTLC):

 Classification of what kind of device the module is. There are standard 

settings according to the Bluetooth specification. 

If a module has been configured to connect or accept an incoming connection to/from a remote device and if 
pairing is done (needed only once), it is a good idea to disable both discoverable and pairable devices for security 
reasons and performance. 

5.2

 

Client and Server 

A client will initiate a connection and the server will accept an incoming connection. 

 

Figure 7 Client connecting to the server 

The client and server role is often mistaken for master and slave role. The master/slave role is defined at a lower 
level (master polls slave at radio level) and has nothing to do with client and server. By default, the client will 
become master and the server will become slave. However, a master/slave switch during or after connection set-
up can change this. The master/slave role is to be considered for the multipoint case only  (see  Multipoint 
section). 
To configure a client to automatically set up a connection to a server, configure the correct Bluetooth profile and 
the remote peer. The Bluetooth profile controls the type of connection that is requested (see Bluetooth profiles 
section) and the remote peer defines what server the client shall connect to. For more than one connection, see 
the Multipoint section. 

 

Default Remote Peer (AT+UDDRP):

  Configures what server (profile and address) to connect to and 

when to initiate the connection. Peer enumeration starts with id 0 and continues with id 1 and so on. 

To configure the server, consider only the Bluetooth profile and a module is configured as a Serial Port Profile 
(SPP) server by default. 

 

Server Configuration (AT+UDSC):

 Will only accept incoming connection attempts for the configured 

server profile. Some profiles can be configured in parallel.  

Содержание ODIN-W2 Series

Страница 1: ...ment describes how to set up and use the ODIN W2 series multiradio modules with Wi Fi and Bluetooth dual mode 4 0 Classic Bluetooth and Bluetooth Low Energy It also provides a technical overview of th...

Страница 2: ...s to this document and the information contained herein Products names logos and designs described herein may in whole or in part be subject to intellectual property rights Reproduction use modificati...

Страница 3: ...configuration 15 6 1 Network setup 15 6 2 Wi Fi security 15 6 3 Peer setup 15 6 4 TCP Peer 15 6 5 UDP Peer 15 7 Use case examples 16 7 1 Establish a Bluetooth Classic SPP connection between two ODIN W...

Страница 4: ...ODIN W2 series Getting Started UBX 15017452 R02 Advance Information Contents Page 4 of 27 Contact 27...

Страница 5: ...tooth Smart Ready This document describes how to set up and use the ODIN W2 series modules 1 1 Key features One of key features of the ODIN W2 series is the Wireless serial cable replacement functiona...

Страница 6: ...mmand mode and enters data mode or extended data mode using the ATO1 ATO2 command It is also possible to toggle the UART DTR pin from High to Low to enter command mode Figure 2 AT data mode In command...

Страница 7: ...It is also possible to execute AT commands as part of the extended data mode protocol Hence it is not necessary to enter command mode when in the extended data mode As it is possible to enter command...

Страница 8: ...dress and port number of the remote node For example a web server on the internet can have the following address http www u blox com This tells the browser to use the HTTP protocol and connect to the...

Страница 9: ...ork setup Page 9 of 27 3 Wi Fi network setup To use TCP and UDP peers at least one Wi Fi network must be defined and connected This is done using the AT UWSC and AT UWSCA commands To define a network...

Страница 10: ...estore to factory default with serial settings if pressed for 10 seconds during power up The button function will be External connect when ODIN W2 is in normal mode Green The current mode is data mode...

Страница 11: ...to the default values Default serial settings is 115 2 kbps 8N1 and HW flow control enabled Default escape sequence is Default escape sequence timing is 1s silence before and after escape sequence 4 3...

Страница 12: ...nd pairable devices for security reasons and performance 5 2 Client and Server A client will initiate a connection and the server will accept an incoming connection Figure 7 Client connecting to the s...

Страница 13: ...e SPP profile work for iPhone and Android smartphones More information about this will be available soon 5 4 Multipoint It is possible to configure a module to support up to 7 parallel Bluetooth conne...

Страница 14: ...rver becomes the slave If a server wants to support multiple channels and it wants to have a piconet for best performance the server must request a master slave switch for every incoming connection Th...

Страница 15: ...odes The matrix below shows valid security combinations for the module Unencrypted WEP64 WEP128 TKIP AES CCMP Open Valid Valid Valid Shared WPA Valid Valid WPA2 Valid Valid LEAP Valid Valid Valid Vali...

Страница 16: ...inquiry to find the other device UBTI 112233445566 52 000000 Bluetooth Device o Use this address when creating the connection AT UDCP spp 112233445566 o ODIN W2 will now try to Bluetooth Serial Port P...

Страница 17: ...h SPP connection that connects at power up AT UDDRP 0 spp 0012f3000001 4 o Set default remote peer always connected AT UMSM 1 o Select startup mode startup in data mode AT W0 o Store configuration in...

Страница 18: ...0 5 2 Use WPA2 as authentication type o AT UWSC 0 8 my password The secret WPA2 Password o AT UWSCA 0 1 Store Wi Fi configuration TCP and data part o AT UDDRP 0 tcp 192 168 0 100 8080 2 Set default r...

Страница 19: ...ODIN W2 series Getting Started UBX 15017452 R02 Advance Information Use case examples Page 19 of 27 Figure 12 ODIN W2 Wi Fi Connection...

Страница 20: ...8 my password The secret WPA2 Password o AT UWSCA 0 1 Store Wi Fi configuration TCP and data part o AT UDDRP 0 tcp 192 168 0 100 8080 2 Set default remote peer id 0 using tcp and always connected o A...

Страница 21: ...immediately Wait for the Wi Fi link and network to go up o UUWLE 0 F2A637C90E9E 11 Mac address received and connected on Channel 11 o UUNU 0 Network is up it is now possible to read the IP Address Rea...

Страница 22: ...console for iOS and TCP UDP Terminal for Android https itunes apple com se app tcp console id642104251 mt 8 https play google com store apps details id nextprototypes tcpudpterminal TCP and data part...

Страница 23: ...ODIN W2 series Getting Started UBX 15017452 R02 Advance Information Use case examples Page 23 of 27 Figure 14 ODIN W2 Wi Fi Connection to iPhone...

Страница 24: ...ice A AT UBTLE 1 o Enable Central Role AT UDSC 1 1 o Set server config id 1 to Serial Port Service AT UMSM 1 o Boot ODIN W2 in data mode AT W o Store config AT CPWROFF o Restart ODIN W2 To set up seco...

Страница 25: ...al Ready EDM Extended Data Mode HTTP Hypertext Transfer Protocol LED Light Emitting Diode RSSI Received signal strength indication SPP Serial Port Profile SPS Serial Port Service SSID Service Set Iden...

Страница 26: ...UBX 14044127 2 u blox Extended Data Mode Protocol Specification Document No UBX 14044126 3 ODIN W2 series Data Sheet Document No UBX 14039949 4 EVK W262U Quick Start Guide Document No UBX 15016340 Re...

Страница 27: ...ox com Regional Office China Beijing Phone 86 10 68 133 545 E mail info_cn u blox com Support support_cn u blox com Regional Office China Chongqing Phone 86 23 6815 1588 E mail info_cn u blox com Supp...

Отзывы: