QLib.h
资源名称:DownLoad.rar [点击查看]
上传用户:jyxlt00
上传日期:2008-01-30
资源大小:369k
文件大小:540k
源码类别:
网络编程
开发平台:
Visual C++
- /******************************************************************************/
- /**
- Program: QLib
- file
- SourceQLib.h
- code
- - Defines the "C" interface for all Factory Library functions.
- - Table of contents (text search can be done for the following sections)
- - General Information
- - Related Documents
- - Version History
- - Callback function definitions
- - Connection/Disconnection Functions
- - Text Logging
- - GSM Diag
- - Streaming Download Diag
- - Diagnostic commands
- - Phone async Logging
- - Phone sync (command) Logging
- - Keypad Diag
- - Handset Diag
- - MediaFLO Diag
- - Commands for multiple FTM modes
- - Dual RX Chain FTM RF Commands
- - FTM CDMA RF Calibration API V2
- - GSM FTM
- - GSM Polar Tx Cal FTM
- - GSM External Tx Polar Calibration FTM
- - WCDMA FTM
- - PMIC FTM
- - cdma2000 FTM
- - cdma2000 FTM non-signaling
- - EVDO Non-signaling FTM
- - Bluetooth FTM
- - Audio FTM
- - Camera FTM
- - FTM Log
- - WCDMA BER FTM
- - HSDPA BER FTM
- - GSM BER FTM
- - EGPRS BER FTM
- - GSDI Diag
- - AGPS FTM
- - Common RF FTM
- - MediaFLO FTM
- - Software Download
- - EFS Functions
- ------------------------------------------------------
- ----------------------
- General Information
- ----------------------
- - All data types used in this interface are ANSI C compatible.
- - All returns that indicate "true if succeed, false if fail" are defined
- as: 1 = true = Success , 0 = false = failure
- Functions that are not entirely upper case do not correspond directly to
- an FTM or diagnostic command.
- For example, QLIB_ConnectServer() is not mapped directly to a diagnostic
- command.
- - Variable Names
- Variable names are prefixed in lower case to indicate the data type.
- The following are defined:
- p = Pointer
- i = Integer type, either char, short, or long
- d = Double or floating point
- e = Enumeration (possibly stored as a short, but representing
- a fixed list of possibilities)
- b = unsigned char, 0=false, 1=true
- ----------------------
- Related Documents
- ----------------------
- - The function name convention used in this document is as follows:
- QLIB_ indicates that this function corresponds to library function
- in the QLib project.
- From there, all diagnostic and FTM functions are named exactly as
- the command identifiers are defined in the QLib_Defines.h,
- which are also the same as the following documents:
- CDMA diagnostic = 80-V1294-1
- = CDMA Dual-Mode Subscriber Station Serial Data Interface Control Document
- Call Manager Subsystem = 80-V1294-7
- = Call Manager Subsystem Interface Control Document
- UMTS Diagnostic = 80-V4083-1
- = Serial Interface Control Document for UMTS
- WCDMA Diagnostic = 80-V2708-1
- = Serial Interface Control Document for WCDMA
- GSM Diagnostic = 80-V5295-1
- = Serial Interface Control Document for GSM and GPRS
- GSM FTM = CL93-V5370-1
- = Factory Test Mode GSM RF Commands, Application Note
- GSM Polar Commands = 80-V9539-1
- = Factory Test Mode Polar Commands, Application Note
- GSM External Polar = 80-V9774-11
- = MSM6275 Polar Calibration Using Test Equipment, Application Note
- WCDMA FTM = CL93-V5368-1
- = Factory Test Mode WCDMA Commands, Application Note
- Bluetooth = 80-V7804-1 = Factory Test Mode Bluetooth API
- PMIC = 80-V8942-1 = Factory Test Mode PMIC API
- Aync-GPS = CL93-V7319-1 = Factory Test Mode AGPS Commands
- Factory Test Mode Production API (Customer Extention) = 80-V9047-1
- Audio = 80-V9048-1 - Factory Test Mode Audio API
- Camera = 80-V9027-1 - Factory Test Mode Camera API
- FTM Logging = 80-V9147-1 - Factory Test Mode Logging API
- WCDMA BER = 80-V9698-1 = Factory Test Mode WCDMA BER API
- GSM BER = 80-V3951-1 = Factory Test Mode GSM BER API
- HSDPA BER = 80-V5504-1 = Factory Test Mode HSDPA BLER API
- EGPRS BER = 80-V5529-1 = Factory Test Mode EGPRS BER API
- CDMA FTM RF Commands = CL93-V4168-1 = Factory Test Mode RF Commands (MSM6000/6025/6050) (Command 59)
- CDMA FTM 1x RF Commands = CL93-V5419-1 = Factory Test Mode 1x RF Commands (MSM6100/6300) (Command 75)
- Diversity Path Calibration = CL93-V5864-1 = Factory Test Mode Dual Rx Chain CDMA 1x RF Commands (MSM6500/6550)
- CDMA2000/1xEV-DO Non-Signaling = CL93-V1974-1 = Factory Test Mode (MSM 5000/5105/5100/5500, 6000/6025/6050)
- CDMA2000 Non-Signaling Commands = 80-V5849-1 = Factory Test Mode cdma2000 Commands
- 1xEV-DO Non-Signaling Commands = CL93-V7429-1 = Factory Test Mode 1xEV-DO Commands
- IntelliCeiver Calibration = 80-V2376-1 = FTM CDMA RF Calibration API V2 (MSM 6550)
- File System Subsystem Interface Control Document = 80-V1294-11
- DMSS Download Protocol Interface Specification and Operational Description = 80-39912-1
- File System Subsystem Interface Control Document = 80-V1294-11
- Handset Subsystem Interface Control Document = 80-V1294-8
- Streaming Download Protocol Specification = 80-V5348-1
- MediaFLO FTM = 80-V2166-14 = Factory Test Mode MediaFLO RF Calibration API
- Factory Test Mode 1X Logging API Interface Control Document = 80-V9151-1
- FTM Common API = 80-VA888-1 FTM Common API
- endcode
- -----------------------
- Version History
- -----------------------
- b QUALCOMM b PROPRIETARY
- This document contains propriety information, and except with written
- permission of Qualcomm INC, such information shall not be
- published, or disclosed to others, or used for any purpose, and the
- document shall not be duplicated in whole or in part.
- version
- code
- Version Author Description
- ------- ------ -----------
- 5.0.0
- For QDART 1.0.20 release
- 4.26.5
- - Modified the logic at the begining of a QLIB_FTM_WCDMA_BER_StartSession() because
- in cases when mobile the START operation fails, the STOP command was not being
- issued, followed by another START. This would cause problems if the mobile had
- been in a session previously, then the PC application is restarted but the phone
- is not reset.
- - Added MediaFLO logs and debug messages to the list of allowable async messages.
- - Fixed a problem with the status variables stored in the WCDMA_BER_State structure.
- The fields iACQUIRE_CNF_frequency and iACQUIRE_CNF_scr_code were not being reported
- correctly.
- - Changed QLIB_FTM_WCDMA_BER_Handover_V2B(), parameter iDPCCH_PowerOffset, from "unsigned short"
- to "short" so that negative numbers would be valid.
- 4.26.4
- Logging fix
- 4.26.3
- - Fixed exception in QLIB_MFLO_Start_PhyMAC().
- - Removed QLIB_MFLO_StartPhy() and QLIB_MFLO_StopPhy().
- - Removed dRSSI from mftypes_per_statistics.
- 4.26.2
- - Added QLIB_MFLO_DeactivateAllFlows function for MediaFLO.
- - Fixed bug in QLIB_MFLO_GetPER_Phy which was causing the function to get stuck in
- an infinite loop if the statistics for one or more Flow IDs are always zero.
- 4.26.1
- QLIB_FTM_CDMA2000_NS_Start added parameter to enable logging diversity AGC
- 4.26.0
- -Added version block info to DLL
- 4.25
- - Fixed linker problem with QLIB_FTM_SET_PA_STOP_DELTA()
- - Added functions that allow the user to pause and resume the library's data read
- thread when in QPHONEMS or user-defined transport communication modes.
- - QLIB_PauseDataReceive()
- - QLIB_ResumeDataReceive()
- - Fixed a delay that occurs when the COM port is being shut down in QPHONEMS mode.
- An event that signaled the acknowledge of the request was not being handled correctly,
- which resulted in the library to wait for the entire time-out period. This
- will be noticable when calling QLIB_DisconnectServer()
- - Fixed WCDMA Band Class 9, which was not being initialized correctly when calling QLIB_FTM_SET_MODE()
- - Fixed problem with QLIB_DIAG_SET_DIPSW_F() in which the wrong command code (the one for
- getting the dip-switch statew) as being sent.
- - Added functions to measure MediaFLO packet error rate:
- - QLIB_MFLO_Start_Phy()
- - QLIB_MFLO_GetPER_Phy()
- - QLIB_MFLO_Stop_Phy()
- - QLIB_MFLO_InitTAPMsgContent_PhyMAC()
- - QLIB_MFLO_Start_PhyMAC()
- - QLIB_MFLO_GetPER_PhyMAC()
- - QLIB_MFLO_Stop_PhyMAC()
- - QLIB_MFLO_FinalCleanup_PhyMAC()
- - Added QLIB_FTM_SET_PDM_signed(), which will allow a PDM value to be specified as a signed
- number, rather than the existing implementation, which is an unsigned value.
- - Fixed problem with setting the non-signaling timeout values when FTM_NONSIG_DEFAULT_TIMEOUT
- is used as a parameter to QLIB_FTM_WCDMA_BER_StartSession() or QLIB_FTM_GSM_BER_StartSession()
- - Fixed problems could happen with WCDMA and GSM non-signaling functions that wait for status.
- If the operation (such as WCDMA Acquire Pilot) had ran previously in the same sessions, then
- the library would not wait for the log message when the 2nd WCDMA Acquire Pilot was called.
- - Fixed QLIB_FTM_SET_WCDMA_SECONDARY_CHAIN() description error and bug, which primary chain is not enabled with
- (bEnableSecodaryChain == 0)
- - Added the timeout enumeration value QMSL_Timeout_WriteData to be with QLIB_ConfigureTimeOut().
- This timeout value is used when writing data to a physical layer in QPHONEMS mode.
- - Added functions to query/change FTM mode
- - QLIB_IsFTM_Mode()
- - QLIB_ChangeFTM_BootMode()
- - QLIB_ChangeFTM_ModeRuntime()
- - Fixed a bug in QLIB_DIAG_NV_READ_F, entire user buffer was not passed to embedded side,
- which caused problem with certain NV items.
- - FTM_SET_WCDMA_SECONARY_CHAIN command ID should be 121 instead of 120
- - Removed FTM_TEST_GET_DVGA_LNA, this API doesn't exist on embedded side
- - Changed Rx_AGC data type in CDMA Intelliceiver Calibration API from "unsigned short" to "short"
- - Updated the QLIB_FTM_TX_RX_FREQ_CAL_SWEEP() to include two new additional parameters in the
- request/response structure, FTM_Tx_Rx_Freq_Cal_Sweep_Request_Response
- - Added restrictions so that only certain logs and extended messages could be
- enabled. The following functions are affected:
- - QLIB_DIAG_SetExtendedLogMask()
- - QLIB_DIAG_SetMessageFilter()
- - QLIB_DIAG_GetMultipleLogs()
- - QLIB_DIAG_GetSingleLog()
- - QLIB_DIAG_AddExtendedLogCodes()
- - QLIB_DIAG_AddExtendedLogCode()
- - QLIB_DIAG_SetExtendedLogCode()
- Documentation about the affected extended messages can be found in the comments for QLIB_DIAG_SetMessageFilter()
- Documentation about the affected log messages canbe found in the comments for QLIB_DIAG_SetExtendedLogCode()
- -Removed 2 extra reserved word from the packet definition for FTM_SET_WCDMA_SECONARY_CHAIN command
- - Added QLIB_FTM_AGPS_GET_CTON(), a function to return the C/N value for AGPS. This function protocol
- is slightly different from the WCDMA and CDMA C/N function, so it is placed into its own function.
- 4.24
- - Fixed bug in QLIB_FTM_DETECT_COMMAND_CODE(), in which the underlying
- function was being called only when the resrouces were not properly
- allocated. Changed so that underlying function is called when resources are OK.
- - Changed all callback configuration functions to accept a
- NULL argument for the text callback, in which case the callback would be
- disabled. This is done to fix a problem that occurs when the application
- is shutting down and the call back function activates resources on the
- client that are not available during shutdown. Affected functions:
- - QLIB_ConfigureCallBacks()
- - QLIB_ConfigureEfs2CallBacks()
- - QLIB_ConfigureLibraryTextLogCallBack()
- - Changed FTM_WCDMA_BER_Handover() to fix a bug with the logic.
- - Released all changes made in 4.23. There were so many engineering builds
- that it makes sense to move to a new version in order to distinguish
- the final release.
- 4.23
- - Moved all documentation into the help file, Help/QMSL_Help.chm. The .DOC file is now
- obsolete. Release notes are only posted in the QLb.h header file.
- - Added QLIB_FTM_LOAD_RF_NV()
- - In QPST mode, the command response message queue was not being cleared after each send sync.
- In other words, the command response queue would build up to its maximum size over time because
- each response message was not moved from the queue. This shouldn't cause problems, but it would
- consume more memory than is necessary.
- - Added some extra debug messages to the GSDI Send and Wait function, which is used to handle
- multiple-response commands for security operations such as writing the root key.
- - Added EVDO Rev A Non-signaling commands,
- - _FTM_EVDO_DEMOD_FWD_WITH_NO_REV()
- - _FTM_EVDO_SET_IDLE()
- - _FTM_EVDO_REV_A_CONF_MAC_FOR_FWD_CC_MAC_FTC()
- - _FTM_EVDO_REV_A_MOD_ACC()
- - _FTM_EVDO_REV_A_MOD_TRA()
- - _FTM_EVDO_REV_A_DEMOD_FWD_WITH_NO_REV()
- - Implmemented QLIB_FTM_EVDO_NS_SetStatisticsState in QLib.cpp to resolve linkage problem
- - Added MediaFLO diag functions:
- - QLIB_MFLO_RST_PLP_STATS()
- - QLIB_MFLO_GET_FLO_STATE()
- - QLIB_MFLO_START_FLO()
- - QLIB_MFLO_GET_FLO_VERSION_INFO()
- - QLIB_MFLO_ACTIVATE_FLOW()
- - QLIB_MFLO_DEACTIVATE_FLOW()
- - QLIB_MFLO_GET_BOUND_FLOW_COUNT()
- - QLIB_MFLO_GET_BOUND_FLOW_LIST()
- - QLIB_MFLO_GET_MLC_INFO()
- - QLIB_MFLO_GET_RSSI_VALUE()
- - QLIB_MFLO_GET_MLC_PLP_STAT_DYN_PARAMS()
- - QLIB_MFLO_SET_RF_CHNL()
- - QLIB_MFLO_GET_RF_CHNL()
- - QLIB_MFLO_RST_MLC_PLP_STATS()
- - QLIB_MFLO_GET_MLC_DYN_PARAMS()
- - QLIB_MFLO_GET_OIS_PLP_STAT()
- - QLIB_MFLO_RST_OIS_PLP_STATv
- - QLIB_MFLO_GET_FLO_SUBSTATE()
- - QLIB_MFLO_GET_ACTIVE_MLC_COUNT()
- - QLIB_MFLO_GET_ACTIVE_MLC_LIST()
- - QLIB_MFLO_GET_FLO_PLP_DYN_PARAMS()
- - QLIB_MFLO_ENABLE_FTAP_PLP_DATA()
- - QLIB_MFLO_ENABLE_FTAP_OIS()
- - QLIB_MFLO_ENABLE_WIC_LIC()
- - Modified the COM port write time out to have 1 MS write time out per byte and a 50ms total timeout
- in the QPHONEMS mode. This was required to perform download operations over USB.
- - Added QLIB_EfsWriteMem() for writing EFS using a memory pointer instead of a file
- - Added functions for sending AT commands to the phone:
- - QLIB_SendRAW
- - QLIB_SetPacketMode
- - Added QLIB_FTM_GSM_BER_IsTrafficValid(), a function for getting the traffic status durin a GSM
- non-signaling session.
- - Added QLIB_FTM_GSM_ConfigLoopbackType(), a function for configuring the GSM loopback type.
- - Added a mutex to the internal sync and async message queues, to guarantee only one thread is
- accessing the queue at a time.
- - Added QLIB_FTM_LOAD_RF_NV(), a new function in the FTM Common API, which will load RF Cal NV data
- from NV storage into the RF Driver. This is to be used after performing calibration and before
- a non-signaling session is started while the phone has remained powered on and not reset
- after RF Calibration.
- - Added code to allow the return of the AT command response when QLIB_SendRAW() is called.
- - Removed a call to QLIB_FTM_GSM_BER_ClearStatus(), which was embedded in FTM_GSM_BER_GetRxMetrics()
- - Added Changed the logic of QLIB_FTM_GSM_BER_IsTrafficValid() so that call status is modeled after
- the 3GPP document 45.008, which specifies a SACCH accumulator that starts at a value of 40 and
- is decremented by 1 for each invalid SACCH CRC and incremented by 2 for each valid SACCH CRC.
- - Added function QLIB_FTM_GSM_BER_SetSACCH_AccumulatorMax() to set the SACCH accumulator maximum
- value, which controls the time-out duration for detecting a failed traffic channel.
- - Disabled wait for LOG_FTM2_STOP_GSM_MODE_CNF event (GSM BER stop service) when QLIB_FTM_GSM_BER_Handover()
- is called
- - Fixed linking problem with QLIB_FTM_EGPRS_BER_StartIdleMode(). Internaly 2 extra parameters were being used
- for the .cpp, relative to the prototype declared in QLib.h
- - When QLIB_GetLibraryCapabilities() is called, the EFS is now enabled for both QPST and QPHONEMS modes
- - Added the function QLIB_ConnectServer_UserDefinedTransport(), which allows a connection to be created with
- a user-defined transport layer. The user defined layer is specified by certain callback functions that
- are used to send and receive data.
- - Fixed the "response size" field sent for QLIB_FTM_TX_RX_FREQ_CAL_SWEEP(), the size should have been 12, but
- it was being specified as 16 bytes. In addition, the PA Range list was being sent as 16-bit numbers instead
- of 8-bit numbers.
- - Added text log types, LOG_C_HIGH_LEVEL_START and LOG_C_HIGH_LEVEL_STOP, which will be used to indicate the
- beginning and end of high level C functions (functions that in turn call other functions). This will make
- it possible to parse the text logs in a more effective manner and give users an idea of exactly what functions
- represent a direct call to QMSL.
- As part of this change, LOG_ERR_AHDLC was merged with LOG_INF_AHDLC, and LOG_ERR_DEV was merged with LOG_INF_DEV.
- - Removed call to QLIB_FTM_WCDMA_BER_ClearStatus() for all functions, except QLIB_WCDMA_BER_StartSession
- - Removed call to QLIB_FTM_EGPRS_BER_ClearStatus() for all functions, except FTM_EGPRS_BER_AssignBCCH
- - Added QLIB_FTM_SET_PA_START_DELTA and QLIB_FTM_SET_PA_STOP_DELTA, functions that previously
- where not enabled for GSM FTM.
- - Fixed problem with user defined transport layer, which could occur if the COM port is closed before
- the QLib_DisconnectServer() is called.
- 4.22
- - Added code to support CDMA450, CDMA450_EXT, WCDMA_BC4, WCDMA_BC8 in QLIB_FTM_SET_MODE
- - Added code to clean up some small memory leaks when reporting the list of available COM ports.
- - Changed the connection timout to not include the word QPST, because the timeout
- can be used for both QPST and QPHONE modes.
- - In QLib_Defines.h: changed QMSL_Timeout_QPST_Connect to QMSL_Timeout_Connect
- - Changed QLIB_ConnectServerWithWait() to look for a phone only every 100ms, in order to
- avoid increased CPU consumption and for debugging of a possible memory leak for some
- data structures used iwht QPST, to get the phone port configurations
- - Added QLIB_DIAG_READ_ESN_F(), a function to read the ESN NV item.
- - Changed the definition for LOG_DEFAULT to include LOG_FN. This value is used when auto
- starting the text log file.
- - Fixed the prototype for QLIB_FTM_PMIC_CONFIG_PWR_CTRL_LIMIT(), which did not have a resource
- context handle input
- - Added the mode id for FTM_MODE_WCDMA_RX1, to be used with QLIB_FTM_SET_MODE_ID() to select
- the diversity receiver for subsequent FTM commands.
- - Added QLIB_FTM_SET_WCDMA_SECONDARY_CHAIN() for enabling/disabling the 2nd WCDMA receiver
- - Fixed a situation in which QLIB_StopLogging() would only reset the text log file, not actually
- stop the text logging to the file.
- - Added the parameter bIgnore1stRDA to QLIB_FTM_CDMA2000_NS_ClearStatus(), which is an option to force the
- first RDA log to be ignored.
- - Changed all EFS functions, most EFS functions to use the internal diagnostic HDLC path
- (either QPST or QPHONEMS), instead of using the EFS interface via QPST. This means that
- almost all EFS functions will work in the QPHONEMS mode, but the downside is that only EFS2 operations
- are supported. The functions that will work only with QPST are:
- QLIB_DownloadPRL()
- QLIB_UploadPRL()
- QLIB_DownloadCEFS_File()
- - Added a function to support aborting of EFS operations
- - Changed the size of the internally maintained "asynchronous queue" to 4096 items instead of 512. This
- will allow for capture of a larger list of asynchronous messages.
- - Added a warning that the GSM BER traffic loopback should be disabled before releasing the
- channel or stopping the GSM BER service, in cases where further GSM BER testing will be
- performed before the mobile is turned off or reset.
- 4.21
- - Added a millisecond timer to the structure QMSL_TextLog_struct, which is used to relay logging
- information to a callback function. This timer indicates the # of milliseconds that have passed
- since the beginning of the log file.
- - Added a method to get and set timeout values for diagnostic and software download operations
- - QLIB_ConfigureTimeOut() = set a timeout value
- - QLIB_GetTimeOut() = get a timeout vlaue
- - QMSL_TimeOutType_Enum = enumeration of timeout values
- - Added a method to stop text logging: QLIB_StopLogging()
- - Added software download debug messages to the text logging
- 4.19
- - Fixed problems with SW Download pointers not being NULLed out, which caused the reference counters for
- certain objects to not reach zero and free up threads and handles after SW Download operations.
- - Fixed definitions file to be completely "C" compatible. There were two places where the syntax
- was in the C++ format.
- 4.18
- - Made some changes to the text logging, to print the logging level at the beginning of each line,
- and to not print the time stamp or logging level to the string buffer that is sent to the asynchronous
- message call back handler.
- - Fixed problem with QLIB_FTM_SET_PATH_DELAY(), which would cause problems with negative numbers.
- The embedded code is using a 32-bit number for the path delay, even though the documentation shows
- that it should be a 16-bit number. The decision is to keep the 32-bit number because so much of the
- embedded code has already been released.
- - Added QLIB_FTM_LOG_StartFTM_Log(), a function to start logging a specific FTM2 log code.
- - Added QLIB_FTM_LOG_StopFTM_Log(), a function disable logging of a specific FTM2 log code
- - Added QLIB_FTM_LOG_GetNext_Log(), a function to returnly received FTM log report, or
- wait until the next log report occurs.
- - Added QLIB_FTM_TX_RX_FREQ_CAL_SWEEP(), which performs the CDMA & WCDMA TX RX Frequency Sweep.
- - Changed the structure of FTM2LogMessage, so that the data element would be an array, instead of
- a single byte.
- - Removed definitions for 2 NV identifiers: NV_FTM_MODE_I and NV_ESN_I.
- - Fixed the error reporting for the Software Download functions. Since version 4.15, they have
- been reporting a pass, even if the function failed.
- - Fixed CDMA2000 Non-signaling function. The functions do not work before due to wrong header.
- - Added functions for managing extended log messages:
- - QLIB_DIAG_AddExtendedLogCode
- - QLIB_DIAG_AddExtendedLogCodes
- - QLIB_DIAG_ClearAllLogCodes
- - QLIB_DIAG_GetSingleLog
- - QLIB_DIAG_GetMultipleLogs
- - Added functions for managing dipswitch settings:
- - QLIB_DIAG_GET_DIPSW_F
- - QLIB_DIAG_SET_DIPSW_F
- - Added EVDO non-signaling functions:
- - QLIB_FTM_EVDO_NS_Start
- - QLIB_FTM_EVDO_NS_Stop
- - QLIB_FTM_EVDO_NS_ClearStatus
- - QLIB_FTM_EVDO_NS_GetStatus
- - QLIB_FTM_EVDO_NS_GetPER
- - Fixed a bug with QLIB_FTM_ENABLE_POLAR_REF_CAL
- - Fixed but with QLIB_DIAG_NV_WRITE_FlushBatchQueue(), in which only the first group of items
- fitting into 1500 bytes would be written. Also added text log information for better
- debugging.
- - Added QLIB_ConfigureLibraryTextLogCallBack(), which is used to configure a call back function for
- text messages generated by the QMSL. After being registered, this function will be called
- each time a text message is being added to the the text log file.
- - Added QLIB_FTM_HSDPA_BLER_Configure_HS_DSCH_HSET(), a function to simplify the HSET setup for
- HSDPA non-signaling.
- - Made a change to the way that QPHONEMS copies data into the user buffer when QLIB_SendSync is called.
- Ensured that the user buffer will not be overrun, by using the "response buffer size" parameter as
- the maximum size of data that will be copied.
- - Fixed a problem with the formation of the diagnostic header in QLIB_EFS2_DIAG_CREATE_LINK()
- - Added QLIB_EFS2_DIAG_EXTENDED_INFO(), a function for querying EFS characteristics
- - Fixed a problem with QLIB_FTM_GSM_BER_GetStatus(), which would result in a memory exception
- - Added QLIB_DIAG_NV_WRITE_BatchQueue_SetRO_List(), a function for setting a list of NV items
- that can be read-only, when the function QLIB_DIAG_NV_WRITE_FlushBatchQueue() processes the
- "multiple NV Write" queue
- - Changed some of the data types for FTM_DO_GSM_AUTOCAL() from unsigned to signed values. This
- affects the max_power, min_power, and power targets.
- - Added QLIB_FTM_DO_GSM_AUTOCAL_GetResults(), a function to return the logged results of the
- function QLIB_FTM_DO_GSM_AUTOCAL().
- - Removed low level WCDMA BER functions, but kept the high level ones
- - QLIB_FTM_WCDMA_START_MODE_REQ
- - QLIB_FTM_WCDMA_STOP_MODE_REQ
- - QLIB_FTM_WCDMA_START_IDLE_MODE_REQ
- - QLIB_FTM_WCDMA_ACQUIRE_REQ
- - QLIB_FTM_WCDMA_RMC_DCH_SETUP_REQ
- - Removed low level GSM BER functions, but kept the high level ones
- - QLIB_FTM_GSM_START_MODE_REQ
- - QLIB_FTM_GSM_SELECT_SPECIFIC_BCCH_REQ
- - QLIB_FTM_GSM_START_IDLE_MODE_REQ
- - QLIB_FTM_GSM_CONFIG_LOOPBACK_TYPE_REQ
- - QLIB_FTM_GSM_CHANNEL_ASSIGN_REQ
- - QLIB_FTM_GSM_BER_CHANNEL_ASSIGN_V2_REQ
- - QLIB_FTM_GSM_CHANNEL_RELEASE_REQ
- - QLIB_FTM_GSM_STOP_GSM_MODE_REQ
- - Added QLIB_FTM_WCDMA_BER_GetEventStatus(), an alternative to QLIB_FTM_WCDMA_BER_GetStatus(), which
- returns only status for a single event, rather than the entire WCDMA BER Status structure.
- - Added QLIB_FTM_GSM_BER_GetEventStatus(), an alternative to QLIB_FTM_GSM_BER_GetStatus(), which
- returns only status for a single event, rather than the entire GSM BER Status structure.
- - Fixed a bug with, QLIB_ConnectServerWithWait(), so that now if a valid phone is not found within the
- specified time-out then the return value of the resource context is NULL.
- - Added MediaFLO commands:
- - QLIB_FTM_MF_GET_RSSI_CAL_POINT
- - QLIB_FTM_MF_GET_RX_RSSI
- - QLIB_FTM_MF_GET_AGC_STATE
- - QLIB_FTM_MF_WRITE_CAL_DATA
- - QLIB_FTM_MF_LNA_SELECT
- - QLIB_FTM_MF_RF_SWITCH_CONFIG
- - QLIB_FTM_MF_SYNTH_LOCK
- - QLIB_FTM_MF_SET_GAIN_STATE
- - QLIB_FTM_MF_TUNE_PLL
- - QLIB_FTM_MF_GET_IM2
- - Changed the maximum number of simultaneous QMSL connections to 50.
- - Added QLIB_FTM_CDMA2000_NS_Get_FCH_SER_FER(), a function for getting cdma2000 FCH Symbols errors and
- frame errors.
- - Fixed QLIB_FTM_GET_ALL_HDET_FROM_TX_SWEEP_CAL() bug
- - Added BC14 in QLib_Defines.h for calibration support
- - Changed QLIB_FTM_DETECT_COMMAND_CODE header, command code will be returned in parameter list
- 4.17
- - Fixed 3 problems with the SW Download Upload QCN file function:
- 1. The ignoreModelNumber flag was not being followed correctly. If the flag was set,
- the function would still fail if the QCN model did not match the current phone model.
- 2. If a callback function was not regsitered for download events, a crash would occur
- because the callback pointer was not initialized to NULL.
- 3. If the autoRestore flag was set to false, the final completion event would not be detected.
- - Added implementation back in for QLIB_FTM_EGPRS_BER_StartIdleMode(). It had been removed
- because functionality was merged with QLIB_FTM_EGPRS_BER_AssignBCCH(). After further
- review, decided that it should be made available anyways.
- - Changed the FTM Command ID for QLIB_FTM_SET_DVGA_OFFSET, from 112 to 111. This problem resulted
- as an incorrect value in an older version of the cdma2000 FTM commands, CL93-V4168-1.
- - Changed the event handler for extended messages to not prepare the text log string, unless
- logging is enabled
- - Fixed some spellings for the text log messages for QLIB_DIAG_MEMORY_PEEK_F, QLIB_DIAG_MEMORY_PEEK_F,
- and QLIB_DIAG_SetMessageFilter.
- - Changed the data type for the iDelay parameter in QLIB_FTM_SET_PATH_DELAY to be a signed
- "short," instead of an "unsigned short"
- - Added 2 functions for transferring PRL files:
- - QLIB_DownloadPRL() to copy PRL from phone to PC
- - QLIB_UploadPRL() to copy PRL from PC to phone
- - Changed the path for all binaries to be HTECommonQLibBIN
- - Changed the name of the binaries as follows:
- MSVC 6.0 Release DLL
- ----------------------
- QMSL_MSVC6R.Lib
- QMSL_MSVC6R.DLL
- QMSL_Demo_MSVC6R.exe
- MSVC 6.0 Debug DLL
- ----------------------
- QMSL_MSVC6D.Lib
- QMSL_MSVC6D.DLL
- QMSL_Demo_MSVC6D.exe
- MSVC 7.0 (.NET) Release DLL
- ----------------------
- QMSL_MSVC7R.Lib
- QMSL_MSVC7R.DLL
- QMSL_Demo_MSVC7R.exe
- MSVC 7.0 (.NET) Debug DLL
- ----------------------
- QMSL_MSVC7D.Lib
- QMSL_MSVC7D.DLL
- QMSL_Demo_MSVC7D.exe
- MSVC 7.0 (.NET) Release Static Library
- ----------------------
- QMSL_MSVC7R-Static.Lib
- MSVC 7.0 (.NET) Debug Static Library
- ----------------------
- QMSL_MSVC7D-Static.Lib
- 4.16
- - Changed the iDelay parameter of QLIB_FTM_SET_PATH_DELAY, from "unsigned short*"
- to "unsigned short"
- - Changed the iRSB_A and iRSB_B parameters in QLIB_FTM_DO_CALPATH_RSB from "unsigned short"
- to "unsigned short*"
- - Increased the timout value for error checking of send function, from 200ms to 300ms. This
- does not change the timeout of the UART, only the amount of time that is allowed the pass
- when writing data to the UART, before an error is triggered. The change was needed
- because testing of the HP USB/UART converter shows that some write commands took more than
- 200ms to execute.
- - Implemented QLIB_FTM_SET_RF_POWER_MODE for 1x Intelliceiver Calibration
- - Fixed EVDO Non-signaling command bugs
- - Completed testing of External Polar Calibration Support:
- - QLIB_FTM_BASEBAND_BW_CAL
- - QLIB_FTM_SET_OPLL_BW
- - QLIB_FTM_SET_TWOTONE_FREQ_OFFSET
- - QLIB_FTM_SET_PATH_DELAY
- - Added and tested EGPRS non-signaling commands:
- - QLIB_FTM_EGPRS_BER_AssignBCCH
- - QLIB_FTM_EGPRS_BER_StartIdleMode
- - QLIB_FTM_EGPRS_BER_Configure_DL_TBF
- - QLIB_FTM_EGPRS_BER_Configure_UL_TBF
- - QLIB_FTM_EGPRS_BER_Establish_SRB_LOOPBACK
- - QLIB_FTM_EGPRS_BER_Release_All_TBF
- - QLIB_FTM_EGPRS_BER_ClearStatus
- - QLIB_FTM_EGPRS_BER_GetStatus
- - QLIB_FTM_EGPRS_BER_GetRxMetrics
- - Added HSDPA non-signaling commands, but have not tested yet:
- - QLIB_FTM_HSDPA_BER_StartSession
- - QLIB_FTM_HSDPA_BLER_Reconfigure_HS
- - QLIB_FTM_HSDPA_BLER_Configure_PDSCH
- - QLIB_FTM_HSDPA_BLER_Configure_HS_SCCH
- - QLIB_FTM_HSDPA_BLER_Configure_HS_DSCH
- - QLIB_FTM_HSDPA_BLER_Configure_HS_DPCCH
- - QLIB_FTM_HSDPA_BER_ClearStatus
- - QLIB_FTM_HSDPA_BER_GetStatus
- - QLIB_FTM_HSDPA_BER_StopSession
- - Made extended messages be automatically printed to the QMSL text log, at the LOG_FN level.
- - Added an enumeration to QLib_Defines.h, for the GSM Tx data source type: FTM_GSM_TX_DataSources_Enum
- - Fixed problem with DIAG_NV_WRITE_FlushBatchQueue() and QLIB_DIAG_NV_WRITE_SetBatchMode().
- After the batch queue is flushed, the NV mode should go back to single instead of batch,
- but it was not doing that.
- - Added feature so that the async call-back will be called when a debug text message is
- generated by the library. The async messsage will look like a log messsage (CMD_CODE=16)
- with a log_item value of QLIB_TEXT_LOG_CODE (0xFFFF). The structure for the log
- data is defined by QMSL_TextLog_struct, in QLib_Defines.h
- - Fixed a bug, which could happen while parsing extended messages and the text size is less than the
- file name size.
- - Added support for QLIB_FTM_CAMERA_SET_SENSOR_ID(), the method for switching between cameras.
- - Added QLIB_FTM_WCDMA_BER_Handover_V2B, a function which handles all of the parameters for the
- handover. The existing function QLIB_FTM_WCDMA_BER_Handover_V2 does not allow a couple of the
- more obscure values to be changed.
- - Completed testing of the HSDPA BER functions.
- 4.15
- - Added the new FTM audio devices for the function QLIB_FTM_AUDIO_SET_PATH()
- 16 = SND_DEVICE_FTM_HANDSET
- 17 = SND_DEVICE_FTM_HEADSET
- 18 = SND_DEVICE_FTM_SPEAKER
- 19 = SND_DEVICE_FTM_CARKIT
- - Added QLIB_UploadCEFS_File2(), a function to upload a CEFS file when the phone
- is in download mode, by specifying the ARMPROG ID to be used.
- - Added QLIB_DownloadCEFS_File(), a function to create a CEFS file on the PC, based
- on the mobile's EFS system.
- - Implemented polar calibration commands, but have not finished testing them yet:
- QLIB_FTM_DO_GSM_AUTOCAL
- QLIB_FTM_SET_PATH_DELAY
- QLIB_FTM_ENABLE_POLAR_REF_CAL
- QLIB_FTM_SET_TWOTONE_FREQ_OFFSET
- QLIB_FTM_DO_CALPATH_RSB
- QLIB_FTM_SET_OPLL_BW
- QLIB_FTM_BASEBAND_BW_CAL
- - Completed addition of 1x-EVDO RF commands for RF Cal.
- 4.13
- - Included changes made by Robert Tomaszewski for improved support for
- sending Start/Stop bytes requires for Download Mode
- - added additional argument bStartFlag to QLIB_SendAsync()
- 0 - send data as it is,
- 1 - add start/stop bytes to the original data package,
- - added function QLIB_SetStartFlag() to tell SendAsync() and others functions which send data
- if it has to add or not start/stop bytes
- That functionality works only in QPhoneMS mode.
- - Added support for other RF modes:
- - WCDMA800A, WCDMA1800, MediaFlo
- - Added a feature to automatically create a log file when a file named "QMSL_auto_start_log.txt",
- exists in the executable folder. If the file exists, then text data will automatically be logged
- to the file "QMSL_Log.txt" in the same folder using the log flags of 0x03 (LOG_FN and LOG_IO).
- 4.12
- - Migrated QLIB into QMSL. Archived the version comments and removed them from this file.
- endcode
- note
- Compiler: Microsoft Visual C++ v6.0 SP4
- *******************************************************************************/
- #if !defined(_QLIB_H)
- #define _QLIB_H
- #include "windows.h"
- /**
- Establish whether the library is being compiled into a DLL (exporting),
- or being included from a client (importing)
- When the DLL is built, then QLIB_EXPORTS should be defined
- */
- #ifdef QLIB_EXPORTS
- #define QLIB_API __declspec(dllexport)
- #else
- #define QLIB_API __declspec(dllimport)
- #endif
- #if defined(QLIB_STATIC)
- #undef QLIB_API
- #define QLIB_API
- //#define QLIB_API __cdecl
- #endif
- #ifdef __cplusplus
- extern "C" {
- #endif
- /******************************************************************************
- Callback function definitions
- *******************************************************************************/
- #if !defined(DIAG_FS_MAX_FILENAME_LEN)
- #define DIAG_FS_MAX_FILENAME_LEN 80 /* Specified by EFS2 */
- #define DIAG_FS_MAX_PATHNAME_LEN 128 /* Specified by EFS2 */
- #endif
- #define QLIB_EFS_MAX_FILENAME_LEN DIAG_FS_MAX_PATHNAME_LEN
- //! Call back for an EFS directory element
- typedef unsigned char( *EfsDirCB )
- (
- char name[QLIB_EFS_MAX_FILENAME_LEN], //defined in DiagEfsPkt.h
- unsigned char isFile,
- //attributes follow below
- unsigned short iAttributeMask,
- unsigned char iBufferingOption,
- unsigned char iCleanupOption,
- unsigned long iCreateDate,
- unsigned long iFileSize,
- HANDLE hContextID
- );
- /**
- Call back for EFS functions
- */
- typedef unsigned char (*EfsFileTransferCB)
- (
- char srcname[512],
- char dstname[512],
- int oper,
- int suboper,
- unsigned long bytestransferred,
- unsigned long filesize,
- HANDLE hContextID
- );
- /**
- Call back for general SW Download event( replaces the other non-EFS call backs)
- Optional for NV backup/restore and normal download. Must be used for boot loader and
- multimage download
- */
- typedef unsigned char( *generalSWDownloadCB )
- (
- unsigned char* pEventStructure // type union generalSwDownloadEvent_union, as defined in SoftwareDownload.h
- // Not declared explicitly here because general users do not need to
- // include the SWDownload.h file.
- );
- /**
- Call back for receipt of async messages
- Optional for NV backup/restore and normal download. Must be used for boot loader and
- multimage download
- param iMessageSize = number of bytes in the message
- param pMessageBuffer = pointer to a buffer of memory with the message. This must be copied by the
- user because after the call back is called, the buffer can be changed at
- any time
- param hContextID = the same context ID used for function calls on a certain COM port.
- */
- typedef void( *asyncMessageCB )
- (
- unsigned short iMessageSize,
- unsigned char* iMessageBuffer,
- HANDLE hContextID
- );
- /**
- Call back for user-defined send (PC to mobile) function.
- To be used with QLIB_ConnectServer_UserDefinedTransport()
- param hQMSL_ContextID = the QMSL that is associated with the connection.
- param hUserContextID = the context ID that was passed to QLIB_ConnectServer_UserDefinedTransport()
- param iRequestSize = Number of bytes to be sent in the request packet.
- param piRequestBytes = Pointer to a buffer of request packet contents.
- param piActualWriteSize = to be updated by the user function, the actual # of bytes that were written
- return 0 if successful (ERROR_SUCCESS) otherwise, an error code as defined by WINERR.H error codes,
- usually the value of ::GetLastError
- http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/system_error_codes__0-499_.asp
- */
- typedef unsigned long( *userDefinedSend )
- (
- HANDLE hQMSL_ContextID,
- HANDLE hUserContextID,
- unsigned long iRequestSize,
- unsigned char* piRequestBytes,
- unsigned long* piActualWriteSize
- );
- /**
- Call back for user-defined receive (from mobile to PC) function.
- To be used with QLIB_ConnectServer_UserDefinedTransport()
- param hQMSL_ContextID = the QMSL that is associated with the connection.
- param hUserContextID = the context ID that was passed to QLIB_ConnectServer_UserDefinedTransport()
- param iRequestSize = Number of bytes to be sent in the request packet.
- param piRequestBytes = Pointer to a buffer of request packet contents.
- param piResponseSize = Pointer to number of bytes received in the response packet
- NOTE: when calling this function, the value must be equal to the
- maximum size of the receive buffer. When the function returns, the
- value will be the actual number of bytes filled into the receive buffer.
- param iResponseBytes = Pointer to a buffer to store the response packet contents.
- return 0 if successful (ERROR_SUCCESS) otherwise, an error code as defined by WINERR.H error codes,
- usually the value of ::GetLastError
- http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/system_error_codes__0-499_.asp
- */
- typedef unsigned long( *userDefinedReceive )
- (
- HANDLE hQMSL_ContextID,
- HANDLE hUserContextID,
- unsigned long* piResponseSize,
- unsigned char* piResponseBytes
- );
- /**
- Call back for user-defined function to flush Tx and Rx buffers.
- param hQMSL_ContextID = the QMSL that is associated with the connection.
- param hUserContextID = the context ID that was passed to QLIB_ConnectServer_UserDefinedTransport()
- return 0 if successful (ERROR_SUCCESS) otherwise, an error code as defined by WINERR.H error codes,
- usually the value of ::GetLastError
- http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/system_error_codes__0-499_.asp
- */
- typedef unsigned long( *userDefinedFlushTxRx )
- (
- HANDLE hQMSL_ContextID,
- HANDLE hUserContextID
- );
- /******************************************************************************
- Connection/Disconnection Functions
- *******************************************************************************/
- /******************************************************************************/
- /**
- Connect the server to a certain COM port number
- param iComPort = COM port number to use for communication with phone.
- This does not open the COM port at the operating system
- level until a call is made to the embedded target.
- For auto detection, the COM port passed in can be
- QLIB_COM_AUTO_DETECT, and the first attached phone will
- be used automatically.
- return HANDLE to use for all subsequent QLIB calls that require a handle.
- If NULL, then no valid phone was found.
- *******************************************************************************/
- QLIB_API HANDLE QLIB_ConnectServer( unsigned int iComPort );
- /******************************************************************************/
- /**
- Connect the server to a certain COM port number
- param iComPort = COM port number to use for communication with phone.
- This does not open the COM port at the operating system
- level until a call is made to the embedded target.
- For auto detection, the COM port passed in can be
- QLIB_COM_AUTO_DETECT, and the first attached phone will
- be used automatically.
- param iWait_ms = # of milliseconds to wait before an error is considered.
- return HANDLE to use for all subsequent QLIB calls that require a handle.
- If NULL, then no valid phone was found.
- *******************************************************************************/
- QLIB_API HANDLE QLIB_ConnectServerWithWait( unsigned int iComPort, unsigned long iWait_ms );
- /******************************************************************************/
- /**
- Connect to a specified logical port number. Before this function is called,
- a logical<-->physical mapping must be created using the function: QLIB_AddPortAliasEntry()
- param iLogicalPort = Logical number to create a connection for.
- return void
- *******************************************************************************/
- QLIB_API HANDLE QLIB_ConnectServer_LogicalPort( unsigned int iLogicalPort );
- /******************************************************************************/
- /**
- Setup a connection using a user-defined transport layer. The user defined transport
- consists of three functions--one to send data, another to receive data, and the last
- to flush the Rx buffer.
- These functions will be called by QMSL when QMSL needs to access the physical layer.
- The user also has the option of having QMSL to handle the HDLC formatting (including CRC)
- seperately for the send and receive packets.
- Before calling this function, the communication channel should be already established
- so that QMSL can make calls to the user functions immediately.
- Until DisconnectServer() is called, a background thread will be running to continually
- read the COM port and check for received data.
- This function will automatically set the library into 'QPHONEMS' mode by calling
- QLIB_SetLibraryMode() with a parameter of FALSE. The user-defined mode is a sub
- mode of the the internal engine, QPHONEMS.
- param hUserHandle = User defined handle, to be passed when the send or receive functions are called.
- This value can be any number except for -1 (0xFFFF). When QLIB_GetComPortNumber()
- is called, this value will be returned.
- param pUserDefinedSend = User send function, to be called when QMSL will send data to the mobile
- param pUserDefinedReceive = User defined receive function, to be called when QMSL will receive data
- from the mobile
- param pUserDefinedFlushRx = user defined function to flush the rx buffer
- param bQMSL_HandlesTxHDLC = TRUE if QMSL is to handle the HDLC tasks when sending a packet,
- including escape sequences, CRC, and trailing flag.
- param bQMSL_HandlesRxHDLC = TRUE if QMSL is to handle the HDLC tasks when receiving a packet,
- including escape sequences, CRC, and trailing flag.
- return void
- *******************************************************************************/
- QLIB_API HANDLE QLIB_ConnectServer_UserDefinedTransport(
- HANDLE hUserHandle,
- userDefinedSend pUserDefinedSend,
- userDefinedReceive pUserDefinedReceive,
- userDefinedFlushTxRx pUserDefinedFlushRx,
- unsigned char bQMSL_HandlesTxHDLC,
- unsigned char bQMSL_HandlesRxHDLC
- );
- /******************************************************************************/
- /**
- Pause the receive thread for a specific device context. This can only be used
- when the library is in the QPHONEMS mode, and the sub-mode of user
- defined transport layer mode.
- This function can be used to prevent QMSL from accessing the COM port during the
- time that the operation is paused.
- Call QLIB_ResumeDataReceive() to resume operation
- param hResourceContext = Resource context that was returned from the call to QLIB_ConnectServer()
- return true if successful, false if failure.
- *******************************************************************************/
- QLIB_API unsigned char QLIB_PauseDataReceive( HANDLE hResourceContext );
- /******************************************************************************/
- /**
- Resumes receive operations that were paused by calling QLIB_PauseDataReceive().
- This can only be used when the library is in the QPHONEMS mode, and the sub-mode,
- of user defined transport layer mode.
- param hResourceContext = Resource context that was returned from the call to QLIB_ConnectServer()
- return true if successful, false if failure.
- *******************************************************************************/
- QLIB_API unsigned char QLIB_ResumeDataReceive( HANDLE hResourceContext );
- /******************************************************************************/
- /**
- Disconnect the server and close the COM port associated with the server.
- param hResourceContext = Resource context that was returned from the call to QLIB_ConnectServer()
- return void
- *******************************************************************************/
- QLIB_API void QLIB_DisconnectServer( HANDLE hResourceContext );
- /******************************************************************************/
- /**
- Disconnects all servers and closes the COM ports associated with those server.
- Normally, this function does not need to be called, because a call to
- QLIB_DisconnectServer() can be done for each reasource that is opened.
- This function is to be used for cases when multiple connections are made to different
- COM ports during the lifetime of the application, or in the case of emergency/exception
- shut down.
- return void
- warning All handles will be invalid after this function is called.
- *******************************************************************************/
- QLIB_API void QLIB_DisconnectAllServers( void );
- /******************************************************************************/
- /**
- Uses the port list in the system registry to determine which COM ports are available
- on the PC and returns the information via iNumPorts and pPortList. This function
- is only tested on Windows XP.
- param iNumPorts = input/output, The input value is the maximum number of entries that
- can be added to the pPortList array. The output value is updated to
- reflect how many valid ports were found on the system.
- param pPortList = output, byte array. Each byte indicates a COM port number that is
- available on the system.
- return true if operation was able to complete successfully and at least one
- valid port is found.
- *******************************************************************************/
- QLIB_API unsigned char QLIB_GetAllPortList( unsigned short* iNumPorts, unsigned short* pPortList );
- /******************************************************************************/
- /**
- Uses GetAllPortList() to determine which ports have phones available, then uses
- attempts a connection on each of the ports returned.
- param iNumPorts = input/output, The input value is the maximum number of entries that
- can be added to the pPortList array. The output value is updated to
- reflect how many valid ports were found on the system.
- param pPortList = output, unsigned char array. Each unsigned char indicates a COM port number that is
- available on the system.
- param iNumIgnorePorts = # of ports in the "ignore port list." Zero to check all ports
- param pIgnorePortList = a list of port numbers that are to be ignored. This can speed up
- the auto detection of ports.
- return true if operation was able to complete successfully and at least one
- valid port is found.
- warning 1) this function will take about 1 second for each port that is on the system
- 2) All connections will be closed before searching begins.
- *******************************************************************************/
- QLIB_API unsigned char QLIB_GetAvailablePhonesPortList(
- unsigned short* iNumPorts, unsigned short* pPortList,
- unsigned short iNumIgnorePorts, unsigned short* pIgnorePortList );
- /******************************************************************************/
- /**
- Returns the COM port number associated with a specific resource context. This
- can be used to determine the COM port number for a phone that was connected
- to automatically.
- param hResourceContext = Resource context that was returned from the call to QLIB_ConnectServer()
- param piPhysicalPort = output, physical port number, such as a 6 for COM6
- return true if COM port could be determined successfully
- *******************************************************************************/
- QLIB_API unsigned char QLIB_GetComPortNumber(HANDLE hResourceContext , unsigned short* piPhysicalPort );
- /******************************************************************************/
- /**
- Clears the port alias list.
- The port alias list is a method for mapping a logical port number to a physical
- port number. This allows users to respond to a situation in which USB ports
- are mapped to unique numbers, depending on which devices have been installed in
- the past.
- An example of a port alias list:
- Logical Physical
- Port Port
- ------- --------
- 1 COM7
- 2 COM19
- 3 COM6
- 4 COM30
- The port mapping process can be facilitated by the GetAvailablePhonesPortList()
- function, which returns a list of which ports have a phone installed. A "calibration"
- procedure could be setup, which tells the user to plug one phone into a port, then
- records which port the phone is in, then instructs them to plug the phone into the
- next USB port, and so on.
- During this procedure, the user software would create a logical list of ports
- (like 1,2,3,4) and remember which physical COM port number is associated with
- each logical port. It is the user's (user of QLIB) responsibility to store this
- association in a persistant way (such as the registry or INI file), then when
- their software starts up the software would first call ClearPortAliasList(),
- then call AddPortAliasEntry() for each logical/physical port association.
- NOTE: It is not necessary to ClearPortAliasList(), if not alias have been created
- in the current run-time session. In other words, the alias list is empty
- by default, and is only filled in by users of QLIB.
- After that, they could call the QLIB_ConnectServer_LogicalPort() function, to
- connect to a logical port number that has been configured.
- return true if port alias list is successfully cleared.
- *******************************************************************************/
- QLIB_API unsigned char QLIB_ClearPortAliasList( void );
- /******************************************************************************/
- /**
- Add an entry to the port alias list. This function should be called once for
- each logical/physical port association.
- See ClearPortAliasList() for more information about port aliasing
- param iLogicalPort = logical port number, user defined number
- param iPhysicalPort = physical port number, such as a 6 for COM6
- return true if port alias is successfully updated.
- *******************************************************************************/
- QLIB_API unsigned char QLIB_AddPortAliasEntry(unsigned short iLogicalPort, unsigned short iPhysicalPort );
- /******************************************************************************/
- /**
- Configures call back functions.
- If one of the pointers is NULL, then the call back will be disabled for
- that call back type.
- param hResourceContext = Resource context that was returned from the call to QLIB_ConnectServer()
- param pEfsDirCallback = Callback for the EfsDirectory() operation
- param pGeneralSwDownloadCB = Callback for download events
- param pAsyncMessageCB = Callback for filtering async messages
- return None
- *******************************************************************************/
- QLIB_API void QLIB_ConfigureCallBacks
- (
- HANDLE hResourceContext,
- EfsDirCB pEfsDirCallback,
- generalSWDownloadCB pGeneralSwDownloadCB,
- asyncMessageCB pAsyncMessageCB
- );
- /******************************************************************************/
- /**
- Configures EFS2 call back functions.
- If one of the pointers is NULL, then the call back will be disabled for
- that call back type.
- param hResourceContext = Resource context that was returned from the call to QLIB_ConnectServer()
- param pEfsCallback = Callback for general EFS2 operations
- param EfsDirCB = Callback for EFS Directory operations
- return None
- *******************************************************************************/
- QLIB_API void QLIB_ConfigureEfs2CallBacks
- (
- HANDLE hResourceContext,
- EfsFileTransferCB pEfsCallback,
- EfsDirCB pEfsDirCB
- );
- /******************************************************************************/
- /**
- Configure Library Text Message call back function.
- The library text message call back is called each time a text message is printed
- to the log file. The call back structure will contain the message level (e.g. LOG_IO
- or LOG_FN), and the NULL-terminated string containing the message text.
- param hResourceContext = Resource context that was returned from the call to QLIB_ConnectServer()
- param pAsyncMessageCB = Callback for library generated text messages. The "unsigned char*" pointer
- will be of the structure type: QMSL_TextLog_struct, defined in QLib_Defines.h
- Specify a NULL value to disable this callback.
- return None
- *******************************************************************************/
- QLIB_API void QLIB_ConfigureLibraryTextLogCallBack
- (
- HANDLE hResourceContext,
- asyncMessageCB pAsyncMessageCB
- );
- /******************************************************************************/
- /**
- Configures a specific timeout value.
- param hResourceContext = Resource context that was returned from the call to QLIB_ConnectServer()
- param eTimeOutId = Identifier index of timeout to change, index defined by
- QMSL_TimeOutType_Enum in QLibDefines.h
- param iNewValue_ms = number of millseconds for timeout value
- return None
- *******************************************************************************/
- QLIB_API unsigned char QLIB_ConfigureTimeOut
- (
- HANDLE hResourceContext,
- unsigned long eTimeOutId,
- unsigned long iNewValue_ms
- );
- /******************************************************************************/
- /**
- Get a specific timeout value.
- param hResourceContext = Resource context that was returned from the call to QLIB_ConnectServer()
- param eTimeOutId = Identifier index of timeout to change, index defined by
- QMSL_TimeOutType_Enum
- return timeout value in milliseconds
- return None
- *******************************************************************************/
- QLIB_API unsigned long QLIB_GetTimeOut( HANDLE hResourceContext, unsigned long eTimeOutId );
- /******************************************************************************/
- /**
- CDMA ICD, 3.4.123 Diagnostic Protocol Loopback Request/Response
- Pings the phone using the diagnostic command DIAG_PROTOCOL_LOOPBACK_F.
- Additionally verifies the connection using the dignostic version command DIAG_VERNO_F.
- This command has a timeout value that can be checked or modified using the identifier
- QMSL_Timeout_IsPhoneConnected when calling QLIB_ConfigureTimeOut() or QLIB_GetTimeOut()
- The default timeout is 200ms, so that as little time as possible will be spent to wait
- for a phone request in the event that a phone is not present. Other diagnostic functions
- use a longer timeout, so this function is the only one that should be called until a
- phone is verified to be on a certain COM port.
- param hResourceContext = Resource context that was returned from the call to QLIB_ConnectServer()
- return Returns true if the phone is connected, false if it is not connected
- *******************************************************************************/
- QLIB_API unsigned char QLIB_IsPhoneConnected(HANDLE hResourceContext );
- /******************************************************************************/
- /**
- CDMA ICD, 2.1.2 Asynchronous data protocol
- Sends a request/response packet. This allows the user to send any diagnostic
- or FTM command that is available in the protocol documents.
- The request and response packets will be formatted properly for HDLC transmission.
- This function can also be used to send packets to access new FTM functionality
- that is added before the PC library is updated to support that new function
- directly.
- param hResourceContext = Resource context that was returned from the call to QLIB_ConnectServer()
- param iRequestSize = Number of bytes to be sent in the request packet.
- param piRequestBytes = Pointer to a buffer of request packet contents.
- param piResponseSize = Pointer to number of bytes received in the response packet
- NOTE: when calling this function, the value must be equal to the
- maximum size of the receive buffer. When the function returns, the
- value will be the actual number of bytes filled into the receive buffer.
- param iResponseBytes = Pointer to a buffer to store the response packet contents.
- param iTimeout = Number of milliseconds to wait for a timeout.
- return Returns true if the first byte of the response packet matches
- the first byte of the request packet, false if it the phone is
- not connected or the first bytes of request and response packets
- do not match.
- *******************************************************************************/
- QLIB_API unsigned char QLIB_SendSync
- (
- HANDLE hResourceContext,
- short iRequestSize,
- unsigned char* piRequestBytes,
- short* piResponseSize,
- unsigned char* piResponseBytes,
- unsigned long iTimeout
- );
- /******************************************************************************/
- /**
- Sends a asynchronous packet. Unlike SendSync, this command does not wait for a
- response packet from the phone.
- This command is only usable when the phone is in QPHONEMS mode, not QPST mode
- param hResourceContext = Resource context that was returned from the call to QLIB_ConnectServer()
- param iRequestSize = Number of bytes to be sent in the request packet.
- param piRequestBytes = Pointer to a buffer of request packet contents.
- param iTimeout = Number of milliseconds to wait for a timeout.
- param bStartFlag = 0 - SendASync will send data as it is, 1 - SendASync will add Start and Stop bytes
- return Returns true if the send operation completes successfully.
- *******************************************************************************/
- QLIB_API unsigned char QLIB_SendASync
- (
- HANDLE hResourceContext,
- unsigned short iRequestSize,
- unsigned char* piRequestBytes,
- unsigned long iTimeout,
- unsigned char bStartFlag
- );
- /******************************************************************************/
- /**
- Sets mode for Send
- This command is only usable when the phone is in QPHONEMS mode, not QPST mode
- param hResourceContext = Resource context that was returned from the call to QLIB_ConnectServer()
- param bStartFlag = 0 - Send will send data as it is, 1 - Send will add Start and Stop bytes
- return Returns last status of StartFlag
- *******************************************************************************/
- QLIB_API unsigned char QLIB_SetStartFlag
- (
- HANDLE hResourceContext,
- unsigned char bStartFlag
- );
- /******************************************************************************/
- /**
- Sends RAW data. This allows the user to send any AT
- command that is available in the protocol documents.
- The message will not be formatt in any way. The user should format message correclty.
- (i.e. AT commant finished with "r" and close string with "
English
