Lanescape Inter Access Point Protocol (Liapp) Specification V0.3 Draft
Introduction .. 3
2. General Description .. 3
2. Relationships Between Services. 3
2.2. Connection Service. 4
2.3. Service. 4
3. Frame Formats. 5
3.1. General Frame Format. 5
3.1.1. Protocol ID Field. 5
3.1.2. Control Field. 5
3.1.3. Length Field. 5
3.1.4. Frame ID Field. 5
3.1.5. Frame Body. 6
3.1.6. FCS Field. 6
3.2. Format of Individual Frame Types. 6
3.2.1. Browse Request Frame Format 7
3.2.2. Browse Response Frame Format 7
3.2.3. Inquiry Request Frame Format 7
3.2.4. Inquiry Response Frame Format 8
3.2.5. Configuration Request Frame Format 8
3.2.6. Configuration Response Frame Format 8
3.2.7. Connection Frame Format 8
3.2.8. File Open Request Frame Format 9
3.2.9. File Open Response Frame Format 9
3.2.10. FILE Close Request Frame Format 10
3.2.11. File Close Response Frame Format 10
3.2.12. File Write Request Frame Format 10
3.2.13. File Write Response Frame Format 10
3.2.14. File Read Request Frame Format 11
3.2.15. File Read Response Frame Format 11
3.2.16. User Defined Request Frame Format 11
3.2.17. User Defined Response Frame Format 12
3.3. Frame Body Components. 12
3.3.1. User ID FIELD. 12
3.3.2. Status Code Field. 12
3.3.3. Manufacturer Element 13
3.3.4. Product Name Element 13
3.3.5. Model Name ELEMENT 13
3.3.6. Element IDS. 13
4. Routines and variables. 14
4.1. Support routines provided by the liapp. 14
4.2. Support routines provided by utility interface. 14
4.3. Variables provided by liapp. 144.4. Variables provided by utility interface. 15
Tables
Table 1 Frames Permitted in State. 3
Table 2 Liapp General Frame Format 5
Table 3 LIAPP Control Field. 5
Table 4 Frame ID Descriptions. 5
Table 5 Frame Body of Browse Request 7
Table 6 Frame Body of Browse Response. 7
Table 7 Frame Body Of Inquiry Request 7
Table 8 Frame Body of Inquiry Response. 8
Table 9 Frame Body Of Configuration Request 8
Table 10 Frame Body Of Configuration Response. 8
Table 11 Frame Body Of Connect Request 8
Table 12 Presence of User Name Information. 9
Table 13 Frame Body Of File Open Request 9
Table 14 Frame Body of File Open Response. 9
Table 15 Frame Body Of File Close Request 10
Table 16 Frame Body of File Close Response. 10
Table 16 Frame Body Of File Write Request 10
Table 16 Frame Body of File Write Response. 10
Table 16 Frame Body of File Read Request 11
Table 16 Frame Body of File Read Response. 11
Table 17 Status Codes. 12
Table 18 Manufacturer Element Format 13
Table 19 Element Id Field Description. 13
Table 20 Element Class Description. 13
INTRODUCTION
The LaneScape Inter Access Point Protocol is developed on top of utility interface.
2. General Description
2. Relationships Between Services
The Relationships Between Thase Server State Variables and Services Are Given By
In State 1, Only Class 1 Frames Are Allowed. In State 2, Either Class 1 Or Class 2 Frames Are Allowed.
Table 1 Frames Permitted in State
State Variable
ALLOWED FRAMES
State 1: No Connection Class 1 State 2: Connected Class 1 and Class 2
The Frame Classes Are Defined As Follows:
a) Class 1 frames (permitted from within States 1, 2) 1) Browse Request / Response2) Connection: Successful connection enables a station to exchange Class 2 frames Unsuccessful connection leaves the STA in State 1.3) Disconnection:. Disconnection notification when in State 2 changes the station's state to State 1.b) Class 2 frames (allowed from within States 2, 3, and 4) 1) Inquiry Request / Response2) Configuration Request / ResponseIf a station A receives a Class 2 frame from station B within State 1, The Station a Shall Send a Dischanection Frame To Station B.
2.2. Connection Service
2.3. Service
3. Frame Formats
3.1. General Frame Format
Table 2 Liapp General Frame Format
Protocol ID Control Length Sequence Frame ID Frame Body FCS 2 bytes 1 Byte 2 Bytes 2 bytes n bytes 2 bytes
3.1.1. Protocol ID FIELD
The Protocol ID Field In a Liapp Frame Should BE 0xF557. The Stations Will Ignore The Frame with Invalid Protocol ID Value.
3.1.2. Control Field
Table 3 Liapp Control Field
Bit 7 - Bit 6 Bit 5 - Bit 0 Protocol Version Reserved
3.1.3. Length Field
The Length Field Contains The Number of Bytes of Sequence, Frame ID, Frame Body and CRC16 Field.
3.1.4. Frame ID Field
Table 4 Frame ID Descriptions
Frame ID
Description
0x0000 Browse Request 0x0001 Browse Response 0x0002 Inquiry Request 0x0003 Inquiry Response 0x0004 Connection 0x0005 Disconnection 0x0006 Configuration Request 0x0007 Configuration Response 0x0008 File Open Request 0x0009 File Open Response 0x000A File Close Request 0x000B File Close Response 0x000C File Read Request 0x000D File Read Response 0x000E File Write Request 0x000f File Write Response 0x0010 Dir Request 0x0011 Dir Response 0x0012 File Seek Request 0x0013 File Seek Response 0x0014 User Defined Request 0x0015 User Defined Response3.1.5. Frame Body
The length of Frame body field can be arbitrary value but limited by the value of global variable LIAPP_MAXFRAMESIZE. The value of global variable LIAPP_MAXFRAMESIZE defines the maximum frame size of a LIAPP frame. The value of LIAPP_MAXFRAMESIZE can be preset by issuing InitLIAPP routine.
3.1.6. FCS Field
. The Sequence, Frame Id and Frame body fields should be protected with a CCITT CRC-16 FCS (frame check sequence) The CCITT CRC-16 FCS shall be the remainder generated by the modulo 2 division of the fields by the polynomial:
.................. ..
3.2. Format of Individual Frame Types
3.2.1. Browse Request Frame Format
The Frame Body Of Browse Request Contains The Information Shown in Following Table:
Table 5 Frame Body of Browse Request
ORDER
Information
1 Manufacturer ID 2 Product ID 3 Model Name
3.2.2. Browse Response Frame Format
The Frame Body of Browse Request Contains The Information Shown in
Table 6 Frame Body of Browse Response
ORDER
Information
1 Manufacturer ID 2 Product ID 3 Model Name 4 Device Name 5 Device Description
3.2.3. Inquiry Request Frame Formatthe Frame Body Of Inquiry Request Contains Element IDs. The element id terminates by an end element id.
Table 7 Frame Body Of Inquiry Request
ORDER
Information
Note
1 User ID The User ID Is Given from Server In Connection Frame with connection sequence 2. 2 Element ID 1
3 Element ID 2
...
N Element ID N
N 1 Element ID: END
3.2.4. Inquiry Response Frame Format
Table 8 Frame Body Of Inquiry Response
ORDER
Information
Note
1 User ID The User ID IS Given from Server In Connection Frame with connection sequence 2. 2 STATUS CODE
3 Element 1 THE ELEments ONLY AND IF Only Present When Status Code Is Success 4 Element 2 ... N Element N 1 ELEMENT END
3.2.5. Configuration Request Frame Format
The Frame Body of Configuration Request Frame Contains The Information Components for Configuration.
Table 9 Frame Body Of Configuration Request
ORDER
Information
1 User ID 2 Element 1 3 Element 2 ... ... n Element N 1 ELEMENT END
3.2.6. Configuration Response Frame Format
Table 10 Frame Body Of Configuration Response
ORDER
Information
Note
1 User ID 2 bytes Octets 2 Status Code 2 bytes OcTes
3.2.7. Connection Frame Format
Table 11 Frame Body Of Connect Request
ORDER
Information
Note
1 Connection Transaction Sequence Number 2 Bytes Octets 2 Status Code The Information Frames As Defined in Following Table. 3 User ID 4 User Name 5 Password
Table 12 Presence of User Name Information
Connection Transaction Sequence Number
Status Code
User ID
User name
Password
1 reserved 0 Reserved 0 Present Present 2 Status Present Not Present Not Present 3 Reserved 0 Present Not Present 4 Status Present Not Present Not Present3.2.8. File Open Request Frame Format
Table 13 Frame Body of File Open Request
ORDER
Information
Note
1 User ID 2 BYTES OCTS 2 Attribute a Character 'W' For Reading 'R' for Writing 3 File Name A Null End String n bytes OcTes
3.2.9. File Open Response Frame Format
Table 14 Frame Body Of File Open Response
ORDER
Information
Note
1 User ID 2 BYtes Octets 2 Status Code 2 Bytes Octets 2 File ID 2 BYTES OCTES 3 Size Meaning The File Size When Reading Or Meaning The Limited Maximum File Size Wen Writing 4 Bytes Octets
3.2.10. FILE Close Request Frame Format
Table 15 Frame Body Of File Close Request
ORDER
Information
Note
1 User ID 2 BYTES OCTES 2 File ID 2 bytes OcTes
3.2.11. File Close Response Frame Format
Table 16 Frame Body Of File Close Response
ORDER
Information
Note
1 User ID 2 BYTES OCTETS 2 File ID 2 BYTES OCTETS 3 Status Code 2 bytes OcTes
3.2.12. File Write Request Frame Format
Table 17 Frame Body Of File Write Request
ORDER
Information
Note
1 User Id 2 bytes octets 2 File Id 2 bytes octets 3 Bytes to write 2 bytes octets 4 Byte Offset Byte offset from the first byte of file 4 bytes octets 5 Data to write Length of data define in Bytes to write field. N bytes octets
3.2.13. File Write Response Frame Format
Table 18 Frame Body of File Write Response
ORDER
Information
Note
1 User ID 2 BYTES 7 File ID 2 BYTES OCTES 3 Status Code 2 bytes Octets 4 bytes Written 2 Bytes Octets 5 Bytes Offset 4 Bytes Octets
3.2.14. File Read Request Frame Format
Table 19 Frame Body of File Read Request
ORDER
Information
Note
1 User ID 2 bytes actens 2 file ID 2 bytes actens 3 bytes to read 2 bytes actens 4 byte offset byte offset from the first byte of file 4 bytes actes
3.2.15. File Read Response Frame Format
Table 20 Frame Body Of File Read Response
ORDER
Information
Note
1 User Id 2 bytes octets 2 File Id 2 bytes octets 3 Status Code 2 bytes octets 4 Bytes to Read 2 bytes octets 5 Byte Offset Byte offset from the first byte of file 4 bytes octets 6 Data Length of data define in Bytes to read field . N bytes actets
3.2.16. User Defined Request Frame Format
Table 21 Frame Body Of File Read Response
ORDER
Information
Note
1 User ID 2 BYtes Octets 2 Body Length 2 Bytes Octets 3 Body User Defined n bytes Octets
3.2.17. User Defined Response Frame Format
Table 22 Frame Body Of File Read Response
ORDER
Information
Note
1 User ID 2 BYTES OCTES 2 Status 2 Bytes Octets 3 Return Length 2 Bytes Octets 4 Return Buffer n bytes OcTes
3.3. Frame Body Components
3.3.1. User ID FIELD
The user ID information is a 2 bytes Number Given from Server.
3.3.2. Status Code Field
The Status Code Is A 2 Bytes Octets. The Failure Cause Codes Are Defined in Following Table:
Table 23 STATUS CODES
Status Code
Meaning
0 Successful 1 Unspecified failure 2 Timeout 3 Busy 4 Invalid user in connection request frame 5 The connection request is rejected from server. 6 Disconnection 7 Invalid request parameter 8 Failure cause by buffer overflow 9
3.3.3. Manufacturer Element
Table 24 Manufacturer Element Format
Element ID Element length 2 bytes 1 Byte n bytes
3.3.4. Product Name Element
3.3.5. Model Name ELEMENT
3.3.6. Element IDS
Table 25 Element ID Field DescriptionElement Class
ELEMENT NUMBER
Bit 15 - Bit 12 Bit 11 - bit 0
Table 26 Element Class Description
ELEMENT CLASS
Description
0 general information 1 Wireless Lan1 Information
The Set of Valid Elements is defined in Following Table:
4. Routines and variables
4.1. Support routines provided by the liapp
STATUS LIAPP_INITIALIZE (CHAR * DeviceID,);
STATUS LIAPP_Indication (Char * DeviceID, Char * Frame, INT Length);
Status liapp_browse (char * manufacturer, char * produter, char * model, int todayout);
Status Liapp_inquiry (Char * ElementIdlist, Int Timeout);
Status Liapp_Configuration (Char * ElementList, Int Timeout);
STATUS LIAPP_STARTUPLOAD (VOID);
Status Liapp_UPLOAD (Char Buffer2UPload, Long Timeout);
STATUS LIAPP_SENDENDUPLOAD (VOID);
Status liapp_startdownload (void);
Status Liapp_Download (Char Buffer2Download, Long Bytes2Download, Short Timeout);
STATUS LIAPP_SENDENDDDOWNLOAD (VOID);
Status Liapp_Action (int actionID, short timeout);
4.2. Support Routines Provided by Utility Interface
Timerid SetTimer (Void * TimeoutCall, INT TIMEOUT);
Boolean StopTimer (Timerid Timerid);
Boolean LiApp_validuser (Char * UserName, Char * Password);
Boolean Liupp_send (Char * DeviceID, Char * Frame, INT Length);
Boolean Liupp_write (Char * Username, Char * Destination, Char * Source, INT Length);
Boolean Liapp_read (Char * Username, Char * Destination, Char * Source, INT Length);
Boolean LiApp_selection (int ElementID, Int ElementLength); CHAR * ElementValue;
Boolaen Liapp_getlement (int ElementID, int MaxElementLength), Char * ElementValue
Void Liupp_notifyEndupload (Void);
Void Liupp_notifyEnddownload (Void);
4.3. Variables provided by liapp
CHAR LIAPP_MYDEVICEID [16];
Char LiApp_state; char liapp_prestate;
Char liapp_retrylimit;
Char liapp_username;
Char liapp_deviceidofconnection;
4.4. Variables provided by Utility Interface
Macro Liapp_waitevent (Event, TIMEOUT)
Event liapp_inquirycompleteevent
EVENT LIAPP_CONFIGURATIONCOMPLETEEVENT
Event liapp_startuploadCompleteEvent
Event LIAPP_STARTDOWNLOADCOMPLETEEVENT
Event liapp_uploadcompleteevent
Event liapp_downloadcompleteevent
EVENT LIAPP_EnduploadCompleteEvent
EVENT LIAPP_ENDDDOWNLOADCOMPLETEEVENT