spp_dev_a_debug

所属分类:单片机开发
开发工具:C/C++
文件大小:18KB
下载次数:26
上传日期:2010-01-15 11:51:55
上 传 者305112
说明:  Bluelab3.6.2 在原有spp_dev_a(device master)例子加上了用SPP接收和发送数据功能,内置debug log。打开有message 输出信息 要定义DEBUG_ENABLED即可。可以移植其他项目中
(Bluelab3.6.2 in the original spp_dev_a (device master) plus an example of using SPP to receive and send data capabilities, built-in debug log. Open a message can be output to define DEBUG_ENABLED. Can be transferred to other projects)

文件列表:
spp_dev_init.h (589, 2006-12-12)
spp_dev_inquire.c (2405, 2006-12-12)
spp_dev_inquire.h (1155, 2006-12-12)
spp_dev_led.c (1790, 2010-01-14)
spp_dev_led.h (789, 2006-12-12)
spp_dev_private.h (1295, 2006-12-12)
spp_dev_store.c (1251, 2010-01-14)
spp_dev_store.h (569, 2006-12-12)
main.c (15207, 2010-01-15)
spp_dev_a.release.mak (1223, 2010-01-15)
spp_dev_a.xip (1443, 2010-01-15)
spp_dev_a.xiw (62, 2006-12-12)
spp_dev_a_ori.dsp (5116, 2010-01-14)
spp_dev_a_ori.dsw (549, 2010-01-13)
spp_dev_a_ori.opt (48640, 2010-01-15)
spp_dev_auth.c (2325, 2006-12-12)
spp_dev_auth.h (1522, 2006-12-12)
spp_dev_connect.c (663, 2006-12-12)
spp_dev_connect.h (612, 2006-12-12)
spp_dev_init.c (794, 2006-12-12)
spp_dev_a_Log.TXT (1094, 2010-01-15)

{\rtf1\ansi\ansicpg1252\uc1\deff1\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang2057\deflangfe2057{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} {\f2\fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f38\froman\fcharset238\fprq2 Times New Roman CE;}{\f39\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f41\froman\fcharset161\fprq2 Times New Roman Greek;} {\f42\froman\fcharset162\fprq2 Times New Roman Tur;}{\f43\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f44\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f45\froman\fcharset186\fprq2 Times New Roman Baltic;} {\f46\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f48\fswiss\fcharset238\fprq2 Arial CE;}{\f49\fswiss\fcharset204\fprq2 Arial Cyr;}{\f51\fswiss\fcharset161\fprq2 Arial Greek;}{\f52\fswiss\fcharset162\fprq2 Arial Tur;} {\f53\fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f54\fswiss\fcharset178\fprq2 Arial (Arabic);}{\f55\fswiss\fcharset186\fprq2 Arial Baltic;}{\f56\fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f58\fmodern\fcharset238\fprq1 Courier New CE;} {\f59\fmodern\fcharset204\fprq1 Courier New Cyr;}{\f61\fmodern\fcharset161\fprq1 Courier New Greek;}{\f62\fmodern\fcharset162\fprq1 Courier New Tur;}{\f63\fmodern\fcharset177\fprq1 Courier New (Hebrew);} {\f***\fmodern\fcharset178\fprq1 Courier New (Arabic);}{\f65\fmodern\fcharset186\fprq1 Courier New Baltic;}{\f66\fmodern\fcharset163\fprq1 Courier New (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; \red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; \red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 \snext0 Normal;}{\s1\ql \li0\ri0\nowidctlpar\faauto\outlinelevel0\rin0\lin0\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 \sbasedon0 \snext0 heading 1;}{\s2\ql \li0\ri0\nowidctlpar\faauto\outlinelevel1\rin0\lin0\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 \sbasedon0 \snext0 heading 2;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid142152\rsid80***32 \rsid5774826\rsid5916***0\rsid***443***\rsid7765***0\rsid7868968\rsid10107208\rsid15217686}{\*\generator Microsoft Word 11.0.5604;}{\info{\author mb03}{\operator mb03}{\creatim\yr2005\mo5\dy20\hr11\min27}{\revtim\yr2005\mo6\dy3\hr11\min27}{\version8} {\edmins31}{\nofpages2}{\nofwords527}{\nofchars3006}{\*\company CSR}{\nofcharsws3526}{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1***4 \dghshow0\dgvshow3\jcompress\viewkind4\viewscale100\nolnhtadjtbl\rsidroot7765***0 \fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}} {\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (} {\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \s1\ql \fi-567\li567\ri0\sb240\sa120\keepn\nowidctlpar\tx567\faauto\outlinelevel0\rin0\lin567\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\b\fs32\cf1\insrsid7765***0 1\tab Introduction \par }\pard\plain \ql \li0\ri0\sa120\nowidctlpar\faauto\rin0\lin0\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\fs18\cf1\insrsid7765***0 This readme gives a brief guide to using the }{\f2\fs20\cf1\insrsid7765***0 spp_dev_a}{ \fs18\cf1\insrsid7765***0 example application. It is not intended to describe procedures that are covered in the xIDE user guide such as building projects in xIDE etc. \par }\pard\plain \s2\ql \fi-851\li851\ri0\sb120\sa120\keepn\nowidctlpar\tx851\faauto\outlinelevel1\rin0\lin851\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\b\cf1\insrsid7765***0 1.1\tab About the spp_dev_a example application \par }\pard\plain \ql \li0\ri0\sa120\nowidctlpar\faauto\rin0\lin0\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\fs18\cf1\insrsid7765***0 This example application implements a simple serial port emulation application. A device running }{ \f2\fs20\cf1\insrsid7765***0 spp_dev_a}{\fs18\cf1\insrsid7765***0 searches for a remote device that supports the SPP profile as a slave and attempts to pair with it. If pairing is successful an SPP connection is established with the remote device. \par During which time it will accept a request to pair from a remote device that is searching for a device that supports the SPP profile as a slave. If pairing is successful an SPP connection is established with the remote device. \par }\pard\plain \s1\ql \fi-567\li567\ri0\sb240\sa120\keepn\nowidctlpar\tx567\faauto\outlinelevel0\rin0\lin567\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\b\fs32\cf1\insrsid7765***0 2\tab Prerequisites \par }\pard\plain \ql \li0\ri0\sa120\nowidctlpar\faauto\rin0\lin0\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\fs18\cf1\insrsid7765***0 To download the application to the chip an SPI connection is required between the development hardware and the PC hosting xIDE. \par If you wish to use an application such as HyperTerminal to communicate with the chip, eg for testing purposes, a serial connection will also be required. \par }\pard\plain \s1\ql \fi-567\li567\ri0\sb240\sa120\keepn\nowidctlpar\tx567\faauto\outlinelevel0\rin0\lin567\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\b\fs32\cf1\insrsid7765***0 3\tab Running the application \par }\pard\plain \ql \li0\ri0\sa120\nowidctlpar\faauto\rin0\lin0\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\fs18\cf1\insrsid7765***0 To run the application: \par }\pard \ql \fi-360\li717\ri0\sb60\sa60\keepn\nowidctlpar\tx717\faauto\rin0\lin717\itap0 {\fs18\cf1\insrsid7765***0 1.\tab Open the }{\f2\fs20\cf1\insrsid7765***0 spp_dev_a}{\fs18\cf1\insrsid7765***0 example application (}{\f2\fs20\cf1\insrsid7765***0 spp_dev_a.xiw}{\fs18\cf1\insrsid7765***0 ) as a project in xIDE. \par }\pard \ql \fi-360\li717\ri0\sb120\sa120\nowidctlpar\tx357\tx717\faauto\rin0\lin717\itap0 {\fs18\cf1\insrsid7765***0 2.\tab Use xIDE to Build (}{\b\fs16\cf1\insrsid7765***0\charrsid7765***0 F}{\b\fs16\cf1\insrsid7765***0 7}{\fs18\cf1\insrsid7765***0 ) and Run (}{\b\fs16\cf1\insrsid7765***0\charrsid7765***0 F}{\b\fs16\cf1\insrsid7765***0 5}{\fs18\cf1\insrsid7765***0 ) the application. \par }\pard\plain \s1\ql \fi-567\li567\ri0\sb240\sa120\keepn\nowidctlpar\tx567\faauto\outlinelevel0\rin0\lin567\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\b\fs32\cf1\insrsid7765***0 4\tab Pairing and connecting to a remote device \par }\pard\plain \ql \li0\ri0\sa120\nowidctlpar\faauto\rin0\lin0\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\fs18\cf1\insrsid7765***0 When the download is complete, the device s}{\fs18\cf1\insrsid142152 earches for discoverable devices that support SPP as a client (eg a device running the }{\f2\fs20\cf1\insrsid142152\charrsid142152 spp_dev_b}{\fs18\cf1\insrsid142152 application) and tries to connect}{\fs18\cf1\insrsid7765***0 . If a device is successfully paired during this period an SPP connection is established. \par To establish a connection the PIN 1234 must be used by the remote device. \par }\pard \ql \fi-539\li1106\ri0\sb60\sa120\nowidctlpar\tx357\faauto\rin0\lin1106\itap0 {\b\fs16\cf1\insrsid7765***0 Note:}{\fs16\cf1\insrsid7765***0 If connecting to a device running }{\f2\fs18\cf1\insrsid7765***0 spp_dev_}{\f2\fs18\cf1\insrsid5916***0 b}{ \fs16\cf1\insrsid7765***0 which also has the hardcoded PIN 1234 the pairing procedure will complete automatically and a connection will be established without user intervention.}{\b\fs16\cf1\insrsid7765***0 \par }\pard \ql \li0\ri0\sa120\nowidctlpar\faauto\rin0\lin0\itap0 {\fs18\cf1\insrsid7765***0 The addresses of up to 8 devices can be stored by the application The device uses this list to ignore devices it has previously failed to connect to after the }{ \b\fs16\cf1\insrsid7765***0 Reset}{\fs18\cf1\insrsid7765***0 button is pressed. \par }\pard \ql \li567\ri0\sb60\sa120\nowidctlpar\tx357\faauto\rin0\lin567\itap0 {\b\fs16\cf1\insrsid7765***0 Note:}{\fs16\cf1\insrsid7765***0 Once 8 addresses have been stored the oldest entry will be overwritten if necessary. \par }\pard \ql \li0\ri0\sa120\nowidctlpar\faauto\rin0\lin0\itap0 {\fs18\cf1\insrsid10107208 PSKEY_USR 0}{\fs18\cf1\insrsid7765***0 is used to store the address of the device that spp_dev_a last successfully connected to. If this address is found on start up, the application will try to connect to this device. \par Pressing PIO 5 }{\fs18\cf1\insrsid142152 (}{\b\fs16\cf1\insrsid142152\charrsid142152 VOL+}{\fs18\cf1\insrsid142152 on the BlueCore3 Multimedia development board) }{\fs18\cf1\insrsid7765***0 will clear the addresses stored by the application and in PS}{ \fs18\cf1\insrsid10107208 KEY_}{\fs18\cf1\insrsid7765***0 U}{\fs18\cf1\insrsid10107208 SR}{\fs18\cf1\insrsid7765***0 0}{\fs18\cf1\insrsid7868968 (friendly name }{\b\fs16\cf1\insrsid7868968 User configuration data 10}{ \fs18\cf1\insrsid7868968\charrsid80***32 )}{\fs18\cf1\insrsid7765***0 , then start another search. \par Pressing the hardware development }{\b\fs16\cf1\insrsid7765***0 Reset}{\fs18\cf1\insrsid7765***0 button instigates a new search without clearing stored Bluetooth addresses. \par }\pard\plain \s1\ql \fi-567\li567\ri0\sb240\sa120\keepn\nowidctlpar\tx567\faauto\outlinelevel0\rin0\lin567\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\b\fs32\cf1\insrsid7765***0 Testing the connection \par }\pard\plain \ql \li0\ri0\sa120\nowidctlpar\faauto\rin0\lin0\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\fs18\cf1\insrsid7765***0 When a connection has been established one way to confirm that data can be sent over the link is to open separate HyperTerminal sessions, one with each devi ce. Then characters typed in one session will appear in the other as the data is transferred over the Bluetooth SPP link. \par }\pard \ql \fi-539\li1106\ri0\sb60\sa120\nowidctlpar\tx357\faauto\rin0\lin1106\itap0 {\b\fs16\cf1\insrsid7765***0 Note:}{\fs16\cf1\insrsid7765***0 If both HyperTerminal sessions are being run from the same PC it is important to use different COM ports for the connections. Also ensure the BAUD rates of both devices are compatible. \par }\pard\plain \s2\ql \fi-851\li851\ri0\sb180\sa120\keepn\nowidctlpar\tx851\faauto\outlinelevel1\rin0\lin851\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\b\cf1\insrsid7765***0 1.1\tab LED Status}{\b\fs18\cf1\insrsid7765***0 \par }\pard\plain \ql \li0\ri0\sa120\nowidctlpar\faauto\rin0\lin0\itap0 \f1\fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\fs18\cf1\insrsid7765***0 The development platform on which the application is being run affects the LED affected by the application:}{\b\fs18\cf1\insrsid7765***0 \par Casira \par }\pard \ql \li0\ri0\sb60\sa60\nowidctlpar\faauto\rin0\lin0\itap0 {\fs18\cf1\insrsid7765***0 Rapid blink = discoverable \par Slow blink = connecting \par }\pard \ql \li0\ri0\sb60\sa120\nowidctlpar\faauto\rin0\lin0\itap0 {\fs18\cf1\insrsid7765***0 Solid on = connected \par }\pard \ql \li0\ri0\sa120\nowidctlpar\faauto\rin0\lin0\itap0 {\b\fs18\cf1\insrsid7765***0 Multimedia board \par }\pard \ql \li0\ri0\sb60\sa120\nowidctlpar\faauto\rin0\lin0\itap0 {\fs18\cf1\insrsid7765***0 As shipped the code does not flash the LED on a multimedia board. To flash LEDs change LED = 1<<}{\fs18\cf1\insrsid15217686 7}{\fs18\cf1\insrsid7765***0 in the spp_dev_private.}{\fs18\cf1\insrsid***443*** h}{\fs18\cf1\insrsid7765***0 file to LED = 1<<1, then rebuild and run the application. \par }\pard \ql \li0\ri0\sa120\nowidctlpar\faauto\rin0\lin0\itap0 {\b\fs32\cf1\insrsid7765***0 \par }}

近期下载者

相关文件


收藏者