Philips Bluetooth QuickStart Kit manuel d'utilisation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74

Aller à la page of

Un bon manuel d’utilisation

Les règles imposent au revendeur l'obligation de fournir à l'acheteur, avec des marchandises, le manuel d’utilisation Philips Bluetooth QuickStart Kit. Le manque du manuel d’utilisation ou les informations incorrectes fournies au consommateur sont à la base d'une plainte pour non-conformité du dispositif avec le contrat. Conformément à la loi, l’inclusion du manuel d’utilisation sous une forme autre que le papier est autorisée, ce qui est souvent utilisé récemment, en incluant la forme graphique ou électronique du manuel Philips Bluetooth QuickStart Kit ou les vidéos d'instruction pour les utilisateurs. La condition est son caractère lisible et compréhensible.

Qu'est ce que le manuel d’utilisation?

Le mot vient du latin "Instructio", à savoir organiser. Ainsi, le manuel d’utilisation Philips Bluetooth QuickStart Kit décrit les étapes de la procédure. Le but du manuel d’utilisation est d’instruire, de faciliter le démarrage, l'utilisation de l'équipement ou l'exécution des actions spécifiques. Le manuel d’utilisation est une collection d'informations sur l'objet/service, une indice.

Malheureusement, peu d'utilisateurs prennent le temps de lire le manuel d’utilisation, et un bon manuel permet non seulement d’apprendre à connaître un certain nombre de fonctionnalités supplémentaires du dispositif acheté, mais aussi éviter la majorité des défaillances.

Donc, ce qui devrait contenir le manuel parfait?

Tout d'abord, le manuel d’utilisation Philips Bluetooth QuickStart Kit devrait contenir:
- informations sur les caractéristiques techniques du dispositif Philips Bluetooth QuickStart Kit
- nom du fabricant et année de fabrication Philips Bluetooth QuickStart Kit
- instructions d'utilisation, de réglage et d’entretien de l'équipement Philips Bluetooth QuickStart Kit
- signes de sécurité et attestations confirmant la conformité avec les normes pertinentes

Pourquoi nous ne lisons pas les manuels d’utilisation?

Habituellement, cela est dû au manque de temps et de certitude quant à la fonctionnalité spécifique de l'équipement acheté. Malheureusement, la connexion et le démarrage Philips Bluetooth QuickStart Kit ne suffisent pas. Le manuel d’utilisation contient un certain nombre de lignes directrices concernant les fonctionnalités spécifiques, la sécurité, les méthodes d'entretien (même les moyens qui doivent être utilisés), les défauts possibles Philips Bluetooth QuickStart Kit et les moyens de résoudre des problèmes communs lors de l'utilisation. Enfin, le manuel contient les coordonnées du service Philips en l'absence de l'efficacité des solutions proposées. Actuellement, les manuels d’utilisation sous la forme d'animations intéressantes et de vidéos pédagogiques qui sont meilleurs que la brochure, sont très populaires. Ce type de manuel permet à l'utilisateur de voir toute la vidéo d'instruction sans sauter les spécifications et les descriptions techniques compliquées Philips Bluetooth QuickStart Kit, comme c’est le cas pour la version papier.

Pourquoi lire le manuel d’utilisation?

Tout d'abord, il contient la réponse sur la structure, les possibilités du dispositif Philips Bluetooth QuickStart Kit, l'utilisation de divers accessoires et une gamme d'informations pour profiter pleinement de toutes les fonctionnalités et commodités.

Après un achat réussi de l’équipement/dispositif, prenez un moment pour vous familiariser avec toutes les parties du manuel d'utilisation Philips Bluetooth QuickStart Kit. À l'heure actuelle, ils sont soigneusement préparés et traduits pour qu'ils soient non seulement compréhensibles pour les utilisateurs, mais pour qu’ils remplissent leur fonction de base de l'information et d’aide.

Table des matières du manuel d’utilisation

  • Page 1

    Bluetooth QuickStart Kit Version 1.0 - User’s Guide Copyright 2004-20 05 © Embedded Ar tists AB EA2-USG-0402 Rev A Bluetooth QuickStart Kit User’s Guide A Quick Way to Start Using and Integrate Bluetooth in YOUR Application… Builds on InfraBed™ technology[...]

  • Page 2

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 2 Copyright 2004-20 05 © Embedded Ar tists AB Embedded Artists AB Friisgatan 33 SE-214 21 Malmö Sweden info@EmbeddedArtists.com http://www.EmbeddedArtists.com Copyright 2004-2005 © Embedded Artists AB. All rights reserved. No part of this publication may be reproduced, transmitted, tran[...]

  • Page 3

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 3 Copyright 2004-20 05 © Embedded Ar tists AB Table of Contents 1.1 Contents ......................................................................................... 4 1.2 Using Bluetooth QuickStart Kit in Products ................................ 4 1.2.1 Design and Produc tion Serv ices[...]

  • Page 4

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 4 Copyright 2004-20 05 © Embedded Ar tists AB 1 Introduction Thank you for buying Em bedded Artists’ Bluetooth QuickStart Kit based on the LPC2106 ARM7™ microcontroller from Philips and cb-OEMSPA-13i industrial Bluetooth m odule from connectBlue. The Bluetooth QuickStart Kit contains [...]

  • Page 5

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 5 Copyright 2004-20 05 © Embedded Ar tists AB Modifications to the design for OEM produc tion can easily be done. Contact Embedded Artists for further information about design and produ ction services. 1.2.1 Design and Production Services Embedded Artists provide design services for cu st[...]

  • Page 6

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 6 Copyright 2004-20 05 © Embedded Ar tists AB 2 Bluetooth QuickS t art Kit This chapter provides a description of the Bluetooth QuickStart Kit ; the platform (software and hardware aspects), features, and typical usage. 2.1 Software Platform The Bluetooth QuickStart Kit includes a pre-des[...]

  • Page 7

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 7 Copyright 2004-20 05 © Embedded Ar tists AB • Software platform code base is easily ported and extended to other hardware, including other processor families. • Many sample applications included in order to lower the threshold t o get you started. • Complete development environmen[...]

  • Page 8

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 8 Copyright 2004-20 05 © Embedded Ar tists AB PDA ANY Sy stem Applic ation Laptop WWW Stationar y Etherne t Bluetooth Qui ckStart Ki t Expo se Cont rol PDA Laptop WWW Stationar y Etherne t ANY System Appl icati on Bluetooth Qui ckStart Ki t internal parameters in the system. Communication[...]

  • Page 9

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 9 Copyright 2004-20 05 © Embedded Ar tists AB are many interesting business possibilities when integrating diagnostic functions in a system, like better maintenance and a profitable after market. Remote administration and rem ote control gives the prerequisites of lower worki ng expenses,[...]

  • Page 10

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 10 Copyright 2004-20 05 © Embedded Ar tists AB 3 Bluetooth Use-Cases This chapter provides a description of typical use-cases when using Bluetooth in industrial applications. 3.1 Typical Industrial Bluetooth Use-Cases There are basically two different use-cas es for industrial Bluetooth a[...]

  • Page 11

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 11 Copyright 2004-20 05 © Embedded Ar tists AB 3.3 Remote Control Remote control is almost the same as remote acces s. The only difference is the direction of the information. In remote access the informa tion mainly flows from the remote sy stem to (typically) a central place. In remote [...]

  • Page 12

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 12 Copyright 2004-20 05 © Embedded Ar tists AB decisions must be made quickly. Trends can be discovered when analyzing the data, for example that a bearing is about to break down bu t will hold for another two m onths. Maintenance can in such cases be planned in advance to minimize the op[...]

  • Page 13

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 13 Copyright 2004-20 05 © Embedded Ar tists AB A field engineer, or similar, can then easily access all relevant documents directly on site. The system becomes more self-contained since all relevant documents “follow” the sy stem. The benefits are also in this case numerous: • Easy [...]

  • Page 14

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 14 Copyright 2004-20 05 © Embedded Ar tists AB incoming connection requests to the LAN Access Profile, the LAP role must be enabled in that specific device. It is possible to enable several instances of the LAP role in order to allow several parallel connections through the LA P. A device[...]

  • Page 15

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 15 Copyright 2004-20 05 © Embedded Ar tists AB 4 Compiling and Running Application Programs This chapter provides a description of how to develop, com pile, and download applications into the Bluetooth QuickStart Board . 4.1 File Structure The pre-designed software platform is delivered a[...]

  • Page 16

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 16 Copyright 2004-20 05 © Embedded Ar tists AB application and a makefile. The makefile contains directives of how to com pile and link the complete application. A typical makefile is listed in Figure 11 below. /* * Example makefile that creates a program called ‘mySampleApp’ */ # nam[...]

  • Page 17

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 17 Copyright 2004-20 05 © Embedded Ar tists AB • Keil uVision (DKARM version) This is another complete development e nvironment, but from Keil. It includes an editor, project manager, a complete compiler build environment, and a debugge r. An evaluation version can be downloaded from Ke[...]

  • Page 18

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 18 Copyright 2004-20 05 © Embedded Ar tists AB The installation files for both programs can be found on the accompanying CD- ROM. • JTAG For specific information about program download (i. e., Flash programming) with a JTAG interface, consult the manual for the specific JTAG interface t[...]

  • Page 19

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 19 Copyright 2004-20 05 © Embedded Ar tists AB Figure 13 – LPC21ISP Portable Command Line ISP Screensh ot A typical program download sequence may look like in Figure 14 below. As seen, the first part is the actual program download phase. Then this is done, the program switches to being [...]

  • Page 20

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 20 Copyright 2004-20 05 © Embedded Ar tists AB 5 Schematic and Measurement s The chapter describes the Bluetooth QuickStart Kit board schematic and m easurements. 5.1 Schematic The Bluetooth QuickStart Kit board schematic is drawn in Figure 15 and Fi gure 16 below. Figure 15 – Bluetooth[...]

  • Page 21

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 21 Copyright 2004-20 05 © Embedded Ar tists AB Figure 16 – Bluetooth QuickStart Board Sche matic Drawing Page 2[...]

  • Page 22

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 22 Copyright 2004-20 05 © Embedded Ar tists AB 5.2 Board Interfaces The Bluetooth QuickStart Kit board has a number of external interfaces as illustrated in Figure 17 below. Figure 17 – Bluetooth QuickStart Board Interfa ce Description Table 1 below explains each board interface in more[...]

  • Page 23

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 23 Copyright 2004-20 05 © Embedded Ar tists AB Power jack 4-6 V DC, at least 150 mA. The power input is protected against reverse polarity, but the board may still be damaged if reverse polarity is applied. Also, never exceed +6V DC because the on-board voltage regulator will then be dama[...]

  • Page 24

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 24 Copyright 2004-20 05 © Embedded Ar tists AB OEMSPA-13i datasheet for details about functionality. This push-button should norm ally never be used, and it is only active during power-up of the Bluetooth module. RGB LED #1 This RGB LED is controlled from the Bluetooth module and indicate[...]

  • Page 25

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 25 Copyright 2004-20 05 © Embedded Ar tists AB 5.4 Board Jumpers There are six jumpers and one switch on the board. These are illustrated in Figure 18 and explained in Table 3 below. Figure 18 – Jumper Descripti on The table below explains the different jumpers. J3 – DBGSEL Enable or [...]

  • Page 26

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 26 Copyright 2004-20 05 © Embedded Ar tists AB J6 – CTS The application program has the option of controlling the RTS/CTS signals on the RS232 serial channel, if needed. If used, signal P0.22 is the CTS signal and P0.22 must be an output. Jumper shorted = Pin P0.22 act as RS232-CTS sign[...]

  • Page 27

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 27 Copyright 2004-20 05 © Embedded Ar tists AB 5.5 Board Measurements The board is 108 x 58 mm and Figure 19 below illustrates the mounting hole positions. The four mounting holes are 3.5 mm wide and 50 x 100 mm apart. Figure 19 – Mounting Hole Posi tions 100 m m 50 m m[...]

  • Page 28

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 28 Copyright 2004-20 05 © Embedded Ar tists AB 6 Further Information The Bluetooth module from connectBlue and the LPC2106 m icrocontroller from Philips are complex products and there exist a number of document with a lot o f information. The following documents are recommended as a compl[...]

  • Page 29

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 29 Copyright 2004-20 05 © Embedded Ar tists AB [17] Em bedded Artists’ Reference Document ation: TCP/IP Protocol Stack http://www.embeddedartists.com/download/pdf/refDoc_tcpip.pdf [18] Em bedded Artists’ Reference Docume ntation: Embedded Web Server http://www.embeddedartists.com/down[...]

  • Page 30

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 30 Copyright 2004-20 05 © Embedded Ar tists AB A connectBlue’s Serial Port Adapter Wizard The Bluetooth QuickStart Board is designed to work with connectBlue’s Serial Port Adapter Wizard program – a program that helps you to configure the Bluetooth m odule for your specific needs. N[...]

  • Page 31

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 31 Copyright 2004-20 05 © Embedded Ar tists AB B Application Program Interface (API) This appendix describes the QuickStart library API in detail. The description is divided into functional sections. Please refer to appendix C for sample applications that illustrate how the API can be use[...]

  • Page 32

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 32 Copyright 2004-20 05 © Embedded Ar tists AB Returns: TRUE if semaphore was taken and FALSE if timeout or error. Possible error situations (what can be identified in an error code): OS_OK - The function completed successfully. OS_ERROR_ISR - The function was called from an interrupt ser[...]

  • Page 33

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 33 Copyright 2004-20 05 © Embedded Ar tists AB B.1.7 osPid tU8 osPid( void ) This function returns the process identifi cation descriptor for the running process. Returns: The process identification descriptor of the currently running process. Possible error situations (what can be identi[...]

  • Page 34

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 34 Copyright 2004-20 05 © Embedded Ar tists AB [in] pProc - The process entry function. [in] pStk - A pointer to the stack area to use. The stack area must be allocated before the process is created. [in] stkSize - The size of the stack area in bytes. [out] pPid - The returned process id [...]

  • Page 35

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 35 Copyright 2004-20 05 © Embedded Ar tists AB void osSuspend( void ) This function suspends the currently runni ng process. Another process can resume it by a call to osResume. B.1.15 osResume void osResume( tU8 pid ) This function resumes a suspended process. It is valid to do resume on[...]

  • Page 36

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 36 Copyright 2004-20 05 © Embedded Ar tists AB Parameters: [in] pSem - A pointer to an initialized semaphore structure. [in] timeout - After timeout ticks the operation will timeout. If a timeout of zero is specified the function will never timeout. Returns: TRUE if semaphore was taken an[...]

  • Page 37

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 37 Copyright 2004-20 05 © Embedded Ar tists AB void m_os_ena_int( void ) This macro enables interrupts. B.1.22 m_os_dis_int void m_os_dis_int( void ) This macro disables interrupts.[...]

  • Page 38

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 38 Copyright 2004-20 05 © Embedded Ar tists AB B.2 TCP/IP API B.2.1 m_buf_get_data The macro m_buf_get_data is defined as: #define m_buf_get_data( pBuf ) func( pBuf ) Where func is a function with the following prototype: void* func( tBuf* pBuf ) This is a macro that retrieves a pointer t[...]

  • Page 39

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 39 Copyright 2004-20 05 © Embedded Ar tists AB B.2.4 tcpListen tS8 tcpListen( tTcpTcb* pTcb ) Set the control block in listen mode (i.e. server) Parameters: [in] pTcb - an allocated and bound TCB Returns: One of the error codes specified below. Possible error situations (what can be ident[...]

  • Page 40

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 40 Copyright 2004-20 05 © Embedded Ar tists AB Parameters to (*pRecv): [in] pTcb - control block for the connection. [in] pBuf - pointer to the buffer containing da ta. A pointer to the actual data can be retrieved by using the m _buf_get_data f unction. [in] len - length of data in bytes[...]

  • Page 41

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 41 Copyright 2004-20 05 © Embedded Ar tists AB Parameters: [in] pTcb - control block for an established connection. [in] pData - data to send [in] len - length of data Returns: One of the following error codes: Possible error situations (what can be identified in an error code): TCP_OK - [...]

  • Page 42

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 42 Copyright 2004-20 05 © Embedded Ar tists AB This function allocates a new control block. Returns NULL if there are no more control blocks available. Returns: An allocated TCB or NULL if none available. B.2.13 udpBind tS8 udpBind( tUdpTcb* pTcb, tIPAddr* pIPAddr, tU16 port ) Bind a TCB [...]

  • Page 43

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 43 Copyright 2004-20 05 © Embedded Ar tists AB This function must be called when received da ta has been processed. If this function is not called the received buffer will not be de-allocated. Parameters: [in] pTcb - control block for an established connection. [in] pBuf - processed buffe[...]

  • Page 44

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 44 Copyright 2004-20 05 © Embedded Ar tists AB B.3 Web Server API B.3.1 m_get_request_method The macro m_get_request_method is defined as: #define m_get_request_method( pConn ) func( pConn ) Where func is a function with the following prototype: tU8* func( tConnect* pConn ) Get the reques[...]

  • Page 45

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 45 Copyright 2004-20 05 © Embedded Ar tists AB #define m_get_query_string( pConn ) func( pConn ) Where func is a function with the following prototype: tU8* func( tConnect* pConn ) Get the query string (e.g. "x=10&y=34") for a specific connection and request. Parameters: [in[...]

  • Page 46

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 46 Copyright 2004-20 05 © Embedded Ar tists AB Parameters: [in] pConn - control block for the connection. Returns: The EGI state. B.3.8 m_set_egi_state The macro m_set_egi_state is defined as: #define m_set_egi_state( pConn ) func( pConn ) Where func is a function with the following proto[...]

  • Page 47

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 47 Copyright 2004-20 05 © Embedded Ar tists AB Parameters: [in] pConn - Control block for the conne ction. [in] intVal - Integer value to print. Returns: TRUE if the string version of the integer could be copied to the o utput buffer; otherwise FALSE. B.3.12 comPrintChar tBool comPrintCha[...]

  • Page 48

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 48 Copyright 2004-20 05 © Embedded Ar tists AB [in] value - An integer header value. This parameter is only used when pHeaderStr does not end with CRLF and pValue == NULL. Returns: TRUE if the headers was sent; otherwise FALSE B.3.15 comEndHeaders void comEndHeaders( tConnect* pConn ) End[...]

  • Page 49

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 49 Copyright 2004-20 05 © Embedded Ar tists AB Parameters: [in] pPath - The directory path to the command hook. [in] pHandler - The EGI function. Parameters to (*pHandler): [in] pConn - Control block for the conne ction. Return value of (*pHandler): EGI_DONE, EGI_ERROR or EGI_SUSPEND. Ret[...]

  • Page 50

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 50 Copyright 2004-20 05 © Embedded Ar tists AB Parameters to (*pFreeName): [in] pName - Memory to release. Parameters to (*pFreeAddr): [in] pAddr - Memory to release. Parameters to (*pAccess): [in] pName - Name of the variable [in] pAddr - Address of the variable. Returns: TRUE if the var[...]

  • Page 51

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 51 Copyright 2004-20 05 © Embedded Ar tists AB [out] ppSym - The symbol name . [out] ppAddr - The address of the symbol value (pointer to pointer). [out] pType - The type of the symbol [out] pState - The current state identifier. Returns: TRUE if there was a symbol in the table; otherwise[...]

  • Page 52

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 52 Copyright 2004-20 05 © Embedded Ar tists AB B.4 File System API B.4.1 fatOpen tFatResult fatOpen( const tU8* pPath, const tU8* pMode, tFatHandle* pHandle ) This function attempts to open the file with the specified absolute path. If successful, the pHandle will hold the handle to the o[...]

  • Page 53

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 53 Copyright 2004-20 05 © Embedded Ar tists AB B.4.3 fatIsDir tFatResult fatIsDir( const tFatHandle handle, tBool* pIsDir ) Tests if the specified handle represents a file or folder. Parameters: [in] handle – A handle to the file. [out] pIsDir – TRUE if the entry is a directory, other[...]

  • Page 54

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 54 Copyright 2004-20 05 © Embedded Ar tists AB This function attempts to write size bytes to the file pointed to by the handle. The offset to where the bytes will be written is specifie d in the handle and the offset will be updated with the number of bytes that are written. Parameters: [[...]

  • Page 55

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 55 Copyright 2004-20 05 © Embedded Ar tists AB FAT_ERROR_A_FOLDER – The path points to a folder and not a file FAT_ERROR_FS_NOT_INITIALIZED – The file system has not been initialized FAT_ERROR_READ_ONLY – The file system is read-only B.4.8 fatReadDirEntry tFatResult fatReadDirEntry([...]

  • Page 56

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 56 Copyright 2004-20 05 © Embedded Ar tists AB Possible error situations (what can be identified in an error code): FAT_OK - The function completed successfully. FAT_ERROR_A_FOLDER – The entry did not point to a file. B.4.11 fatGetEntryName tFatResult fatGetEntryName( tFatDirEntry* pFat[...]

  • Page 57

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 57 Copyright 2004-20 05 © Embedded Ar tists AB Possible error situations (what can be identified in an error code): FAT_OK - The function completed successfully. FAT_ERROR_NOT_EXISTS - There is no folder matching the pPath FAT_ERROR_A_FILE - There is a file matching the pPath FAT_ERROR_FS[...]

  • Page 58

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 58 Copyright 2004-20 05 © Embedded Ar tists AB B.5 PPP API B.5.1 Link Layer (with script engine) The link layer is used between PPP and the harware device driver (e.g. a UART). This layer includes a script engine that can be used to c ontrol the link. Command strings (ini t, start and clo[...]

  • Page 59

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 59 Copyright 2004-20 05 © Embedded Ar tists AB void linkSetStart( tPppDev* pDev, tU8* pStartStr ) Assign the start command string to the device. This command string will be executed when the 'linkStart' function is called. The 'linkStart' function will be called from L[...]

  • Page 60

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 60 Copyright 2004-20 05 © Embedded Ar tists AB tBool linkClose( tPppDev* pDev ) Execute the close command string. If the cl ose command string contains timeouts (@w or @r) this function will return before the command string has been completely processed. This function will be called by LC[...]

  • Page 61

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 61 Copyright 2004-20 05 © Embedded Ar tists AB B.5.11 pppReqAuth void pppReqAuth( tPppDev* pDev, tBool on ) Enable/disable request authentication. It is disabled by default. A request for authentication is normally done by a server. A client must send a valid user ID and password in order[...]

  • Page 62

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 62 Copyright 2004-20 05 © Embedded Ar tists AB B.6 UART API B.6.1 uartPppBlock void uartPppBlock( void ) This function will block PPP from accessi ng the UART connected to the Bluetooth module. Before PPP is blocked pppClose will be called. The default behaviour is to have PPP monito ring[...]

  • Page 63

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 63 Copyright 2004-20 05 © Embedded Ar tists AB B.7 Registry API B.7.1 regErase void regErase( void ) Erase the entire registry. B.7.2 regSetValue tRegResult regSetValue( tU8* pKey, tU8 keyLen, tU8* pValue, tU16 valueLen ) Set a value in the registry. This function is used when a new value[...]

  • Page 64

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 64 Copyright 2004-20 05 © Embedded Ar tists AB REG_RESULT_VAL_TRUNC – There was not enough space in the output buffer for the complete value. It has been truncated. B.7.4 regRemove tRegResult regRemove( tU8* pKey, tU8 keyLen ) Remove a symbol from the registry. Both key and value will b[...]

  • Page 65

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 65 Copyright 2004-20 05 © Embedded Ar tists AB B.8 I 2 C API B.8.1 i2cCheckStatus tS8 i2cCheckStatus( void ) Checks the I2C status. Returns: 00h Bus error 08h START condition transmitted 10h Repeated START condition transmitted 18h SLA + W transmitted, ACK received 20h SLA + W transmitted[...]

  • Page 66

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 66 Copyright 2004-20 05 © Embedded Ar tists AB tS8 i2cRepeatStart( void ) Generates a start condition on I2C when bus is free. Master mode will also automatically be entered. Note: After a stop condition, you may need a bus free time before you can generate a new start condition. Returns:[...]

  • Page 67

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 67 Copyright 2004-20 05 © Embedded Ar tists AB I2C_CODE_OK – The function completed successfully I2C_CODE_ERROR – an error occurred B.8.7 i2cWaitTransmit tS8 i2cWaitTransmit( void ) Wait until data has been transmitted. Parameters: [in] addr – the address to write to [in] pData – [...]

  • Page 68

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 68 Copyright 2004-20 05 © Embedded Ar tists AB B.9 EEPROM API B.9.1 eepromPageRead tS8 eepromPageRead( tU16 addr, tU8* pBuf, tU16 len ) Read data from the eeprom. Parameters: [in] addr – the address to read from [in] pBuf – the read data is stored in this buffer [in] len – number of[...]

  • Page 69

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 69 Copyright 2004-20 05 © Embedded Ar tists AB B.10 Time API B.10.1 clockMs tU32 clockMs( void ) Returns number of milliseconds since start-up Returns: Number of milliseconds since start-up.[...]

  • Page 70

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 70 Copyright 2004-20 05 © Embedded Ar tists AB C Getting Started This appendix contains inform ation about how to quickly get up and running with your application development and describes the many sample applications that are included. The Bluetooth QuickStart Kit comes shipped with a de[...]

  • Page 71

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 71 Copyright 2004-20 05 © Embedded Ar tists AB Files • sample_applet/led.c – this file contains code that controls the LED • sample_applet/led.h – header file with prototypes and constants needed to control the LED. • sample_applet/sample.c – this file contains the server code[...]

  • Page 72

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 72 Copyright 2004-20 05 © Embedded Ar tists AB C.2.4 Registry This sample application illustrates how to use th e Registry, that is, persistent storage in the eeprom. The example will start by trying to read a speci fied key from the registry. If the key is found the value associated with[...]

  • Page 73

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 73 Copyright 2004-20 05 © Embedded Ar tists AB The functionality can be tested by using, for example, a Telnet client to connect to the server. 1. In Windows, open a command prompt and type telnet <IP-address> <port> , where <IP-address> could be, e.g ., 192.168.2.230 an[...]

  • Page 74

    Bluetooth QuickStart Kit Version 1.0 - User’s Guid e Page 74 Copyright 2004-20 05 © Embedded Ar tists AB • sample_web/www/post.html – this file calls the formpost.egi . • sample_web/www/registry.shtml – this file interacts with the listreg.egi, addreg.egi and the remreg.egi . • sample_web/www/ssi.shtml – this file illustrates how SSI[...]