CN112383911A - POS Bluetooth automatic test method, system and storage medium - Google Patents

POS Bluetooth automatic test method, system and storage medium Download PDF

Info

Publication number
CN112383911A
CN112383911A CN202011545684.5A CN202011545684A CN112383911A CN 112383911 A CN112383911 A CN 112383911A CN 202011545684 A CN202011545684 A CN 202011545684A CN 112383911 A CN112383911 A CN 112383911A
Authority
CN
China
Prior art keywords
pos
bluetooth
mobile phone
test method
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011545684.5A
Other languages
Chinese (zh)
Other versions
CN112383911B (en
Inventor
江依妹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Newland Payment Technology Co ltd
Original Assignee
Fujian Newland Payment Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Newland Payment Technology Co ltd filed Critical Fujian Newland Payment Technology Co ltd
Priority to CN202011545684.5A priority Critical patent/CN112383911B/en
Publication of CN112383911A publication Critical patent/CN112383911A/en
Application granted granted Critical
Publication of CN112383911B publication Critical patent/CN112383911B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a POS Bluetooth process pressure testing method, which comprises the following steps: s1, appointing the Bluetooth communication protocol and the setting operation function of the mobile phone and the POS; s2, opening the POS Bluetooth, and initiating the pairing connection with the POS Bluetooth by the mobile phone; s3, the POS packet sends a return command and test data to the mobile phone through Bluetooth; s4, the mobile phone analyzes and transmits back the corresponding data after receiving the packet; s5, the POS Bluetooth reads the data returned by the mobile phone and intercepts specific data content to compare with the test data before sending; s6, the POS sends a response confirmation message to the mobile phone; s7, the POS disconnects the Bluetooth connection. According to the invention, by means of negotiation between the mobile phone Bluetooth tool and the POS, the mobile phone is automatically connected with the POS Bluetooth, then the mobile phone receives and transmits, then the mobile phone is disconnected, and the actions are repeated, so that the automation of Bluetooth pressure test is realized, the labor cost is saved, the test efficiency is improved, and the Bluetooth reliability of the POS is ensured.

Description

POS Bluetooth automatic test method, system and storage medium
Technical Field
The invention is applied to the field of POS automatic test, in particular to a POS Bluetooth automatic test method, a POS Bluetooth automatic test system and a storage medium.
Background
The POS is mostly communicated through Bluetooth, the reliability of Bluetooth to be tested is generally realized by data receiving and sending through connection with a mobile phone, and because the Bluetooth test of the POS is carried out, a plurality of functions need to use the subjective feeling of a tester as the basis of a test result, the manual test is dominant in the POS test work all the time, so that the test needs to spend more time to carry out the manual connection between different mobile phones and the POS and the manual operation communication pressure test, and the time and the labor are consumed.
Disclosure of Invention
The invention aims to solve the technical problem of the prior art and provides a POS Bluetooth automatic test method, a POS Bluetooth automatic test system and a storage medium.
In order to solve the technical problem, the invention provides a POS Bluetooth automatic test method, which comprises the following steps:
s1, appointing the Bluetooth communication protocol and the setting operation function of the mobile phone and the POS;
s2, opening the POS Bluetooth, and initiating the pairing connection with the POS Bluetooth by the mobile phone;
s3, the POS packet sends a return command and test data to the mobile phone through Bluetooth;
s4, the mobile phone analyzes and transmits back the corresponding data after receiving the packet;
s5, the POS Bluetooth reads the data returned by the mobile phone and intercepts specific data content to compare with the test data before sending;
s6, the POS sends a response confirmation message to the mobile phone;
s7, the POS disconnects the Bluetooth connection.
As a possible implementation manner, further, the specific manner of initiating the paired connection with the POS bluetooth by the mobile phone in step S2 is as follows: the mobile phone searches for the corresponding Bluetooth name and performs pairing connection.
As a possible implementation manner, further, the specific manner of intercepting the specific data content in step S5 is as follows: the first 12 bytes of data are deleted.
As a possible implementation manner, further, the input parameters of the POS packet of step S3 include setting operation bits, data and data length, and the output parameters are the packed data.
As a possible implementation manner, further, before executing the step S3, the POS again monitors whether the bluetooth connection state exists, if so, the step S3 is continuously executed, and if not, the step S2 is returned to.
A POS Bluetooth process pressure test method comprises the POS Bluetooth automatic test method, and specifically comprises the following steps: and circularly executing the steps S1-S7 of the POS Bluetooth automatic test method, wherein the execution time is n.
A POS Bluetooth read-write pressure test method comprises the POS Bluetooth automatic test method, and specifically comprises the following steps: the steps S7 are executed after the steps S3-S6 n times of the POS Bluetooth automatic test method are executed in a loop.
A readable storage medium comprising a stored program, wherein the program, when executed, controls a device on which the readable storage medium is located to execute the POS bluetooth automated testing method.
A POS Bluetooth automatic test system comprises and operates the readable storage medium.
By adopting the technical scheme, the invention has the following beneficial effects: according to the invention, by means of negotiation between the mobile phone Bluetooth tool and the POS, the mobile phone is automatically connected with the POS Bluetooth, then the mobile phone receives and transmits, then the mobile phone is disconnected, and the actions are repeated, so that the automation of Bluetooth pressure test is realized, the labor cost is saved, the test efficiency is improved, and the Bluetooth reliability of the POS is ensured.
Drawings
The invention is described in further detail below with reference to the following figures and embodiments:
FIG. 1 is a schematic flow chart of the principle of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be described in detail and completely with reference to the accompanying drawings.
As shown in fig. 1, the present invention provides a POS bluetooth automatic testing method, which includes the following steps:
s1, appointing the Bluetooth communication protocol and the setting operation function of the mobile phone and the POS;
the specific format of the bluetooth communication protocol is as follows:
STX (1 byte fixed 0x02) + instruction data length (2 byte BCD format: total length from instruction number to ETX) + instruction number (2 bytes fixed 0xff 0x0c) + indicator bit (1 byte) + sequence number (1 byte) + response (2 bytes) + set operation (1 byte) + data length (2 bytes) + data (datalen bytes) + end bit ETX (1 byte) + LRC check bit (1 byte).
The contract setup operation has the following functions:
setting operation 0x01 corresponding to the mobile phone is informed to set scanning time interval T1 value, unit s, BCD code (configuration, ID2 data is time interval T1, takes 2 bytes);
setting operation 0x02 informs the handset to set the scanning device to connected device time interval T2 value, unit s, BCD code (configuration, ID2 data is time interval T2, takes 2 bytes);
a setting operation 0x03 notifies the mobile phone to disconnect the current connection (action);
setting operation 0x04 informs the handset to stop the test (action);
setting operation 0x05 data return (data to be returned);
setting operation 0x06 response confirmation message to inform the mobile phone of response receipt (confirmation receipt after receiving return);
setting operation 0x07 receives the handset data and returns the data (ID 2 is returned data).
S2, opening the POS Bluetooth, and initiating the pairing connection with the POS Bluetooth by the mobile phone;
the specific mode of initiating the paired connection of the POS Bluetooth is as follows: the mobile phone searches for the corresponding Bluetooth name and performs pairing connection.
S3, the POS packet sends a return command and test data to the mobile phone through Bluetooth;
input parameters of the POS packet package comprise cmd (setting operation bit), data (data) and datalen (data length), and output parameters are packaged data. The first bit of the data is fixed 0x02, the 2 nd bit and the 3 rd bit are message data length, the 4 th bit and the 5 th bit are fixed 0xff 0x0c of 2 bytes, the 6 th bit is determined according to cmdid, if cmdid is 6 or 7, the sixth bit is 0x2f, if not 6 or 7, the sixth bit is 0x5f, the 7 th bit is a serial number, the serial number is reassigned from 1 after reaching 255, the 8 th bit and the 9 th bit are response codes 0x30x030, the 10 th bit is a set operation command number, the specific command is described above, the 11 th bit and the 12 th bit are test command data length, the data content follows, the end symbol is fixed 0x03, and the last bit is an LRC check bit.
Further, before executing the step S3, the POS again monitors whether the bluetooth connection status exists, if yes, the POS continues to execute the step S3, and if no, the POS returns to execute the step S2.
S4, the mobile phone analyzes and transmits back the corresponding data after receiving the packet;
s5, the POS Bluetooth reads the data returned by the mobile phone and intercepts specific data content to compare with the test data before sending;
the specific way of intercepting the specific data content is as follows: the first 12 bytes of data are deleted.
S6, the POS sends a response confirmation message to the mobile phone;
s7, the POS disconnects the Bluetooth connection.
A POS Bluetooth process pressure test method comprises the POS Bluetooth automatic test method, and specifically comprises the following steps: and circularly executing the steps S1-S7 of the POS Bluetooth automatic test method, wherein the execution time is n. The Bluetooth connection between the mobile phone and the POS is also automatic, the mobile phone is always in a scanning stage according to the name of the Bluetooth, when the name of the tested Bluetooth is scanned, the mobile phone is automatically paired and connected, and then subsequent data transceiving operation is carried out.
A POS Bluetooth read-write pressure test method comprises the POS Bluetooth automatic test method, and specifically comprises the following steps: the steps S7 are executed after the steps S3-S6 n times of the POS Bluetooth automatic test method are executed in a loop.
A readable storage medium comprising a stored program, wherein the program, when executed, controls a device on which the readable storage medium is located to execute the POS bluetooth automated testing method.
A POS Bluetooth automatic test system comprises and operates the readable storage medium.
In the specific implementation process, when data communication of 12 bytes 0x38 is to be performed, on the basis of bluetooth connection, the POS first performs packet grouping, wherein the packet grouped data: 020021 FF 0C 5F 023030050012383838383838383838383838039B, then the string of data is sent to the mobile phone, the mobile phone returns the data after receiving the data, and the returned data are: 020021 FF 0C 2F 01070000001238383838383838383838383803 EA, when POS needs to compare data, it needs to remove the first 12 bytes of received data and then compare the 12 bytes of data, if the comparison is consistent, the comparison is passed.
The foregoing is directed to embodiments of the present invention, and equivalents, modifications, substitutions and variations such as will occur to those skilled in the art, which fall within the scope and spirit of the appended claims.

Claims (9)

1. A POS Bluetooth automatic test method is characterized in that: which comprises the following steps:
s1, appointing the Bluetooth communication protocol and the setting operation function of the mobile phone and the POS;
s2, opening the POS Bluetooth, and initiating the pairing connection with the POS Bluetooth by the mobile phone;
s3, the POS packet sends a return command and test data to the mobile phone through Bluetooth;
s4, the mobile phone analyzes and transmits back the corresponding data after receiving the packet;
s5, the POS Bluetooth reads the data returned by the mobile phone and intercepts specific data content to compare with the test data before sending;
s6, the POS sends a response confirmation message to the mobile phone;
s7, the POS disconnects the Bluetooth connection.
2. The POS Bluetooth automatic test method according to claim 1, wherein: the specific way of initiating the paired connection with the POS bluetooth by the mobile phone in step S2 is as follows: the mobile phone searches for the corresponding Bluetooth name and performs pairing connection.
3. The POS Bluetooth automatic test method according to claim 1, wherein: the specific manner of intercepting the specific data content in step S5 is as follows: the first 12 bytes of data are deleted.
4. The POS Bluetooth automatic test method according to claim 1, wherein: the input parameters of the POS packet of step S3 include setting operation bit, data and data length, and the output parameters are the packed data.
5. The POS Bluetooth automatic test method according to claim 1, wherein: before executing the step S3, the POS again monitors whether the bluetooth connection status exists, if yes, the POS continues to execute the step S3, and if no, the POS returns to execute the step S2.
6. A POS Bluetooth process pressure test method is characterized in that: the POS Bluetooth automatic test method comprises the following steps of any one of claims 1 to 5: performing steps S1-S7 of the POS Bluetooth automatic test method of any one of claims 1 to 5 in a loop, wherein the number of execution times is n.
7. A POS Bluetooth read-write pressure test method is characterized by comprising the following steps: the POS Bluetooth automatic test method comprises the following steps of any one of claims 1 to 5: the steps S7 are executed after the steps S3-S6 n times of the POS Bluetooth automatic test method are executed in a loop.
8. A readable storage medium, characterized by: the readable storage medium comprises a stored program, wherein when the program runs, the device where the readable storage medium is located is controlled to execute the POS Bluetooth automatic test method according to any one of claims 1 to 5.
9. The utility model provides a POS bluetooth automated test system which characterized in that: which comprises and operates a readable storage medium as claimed in claim 8.
CN202011545684.5A 2020-12-24 2020-12-24 POS Bluetooth automatic test method, system and storage medium Active CN112383911B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011545684.5A CN112383911B (en) 2020-12-24 2020-12-24 POS Bluetooth automatic test method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011545684.5A CN112383911B (en) 2020-12-24 2020-12-24 POS Bluetooth automatic test method, system and storage medium

Publications (2)

Publication Number Publication Date
CN112383911A true CN112383911A (en) 2021-02-19
CN112383911B CN112383911B (en) 2023-09-29

Family

ID=74589914

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011545684.5A Active CN112383911B (en) 2020-12-24 2020-12-24 POS Bluetooth automatic test method, system and storage medium

Country Status (1)

Country Link
CN (1) CN112383911B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104202105A (en) * 2014-09-24 2014-12-10 福建联迪商用设备有限公司 Bluetooth device testing method and system
CN105848196A (en) * 2016-05-04 2016-08-10 青岛歌尔声学科技有限公司 NFC bluetooth adapter and bluetooth product test system and test method
CN107317638A (en) * 2017-06-07 2017-11-03 百富计算机技术(深圳)有限公司 Method, terminal device and the computer-readable recording medium of bluetooth test
CN107689900A (en) * 2017-09-04 2018-02-13 福建新大陆支付技术有限公司 Automatic testing mobile phone and the method and system of mPOS machines compatibility
CN107980233A (en) * 2017-03-06 2018-05-01 深圳大趋智能科技有限公司 Automatic test approach, the apparatus and system of Bluetooth POS terminal
CN109495870A (en) * 2018-07-24 2019-03-19 华为机器有限公司 The method and apparatus of bluetooth test
CN110024362A (en) * 2017-11-07 2019-07-16 深圳市汇顶科技股份有限公司 Bluetooth test system and method
US20200076514A1 (en) * 2018-08-30 2020-03-05 Rohde & Schwarz Gmbh & Co. Kg Method of testing bluetooth low energy devices over-the-air and testing system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104202105A (en) * 2014-09-24 2014-12-10 福建联迪商用设备有限公司 Bluetooth device testing method and system
CN105848196A (en) * 2016-05-04 2016-08-10 青岛歌尔声学科技有限公司 NFC bluetooth adapter and bluetooth product test system and test method
CN107980233A (en) * 2017-03-06 2018-05-01 深圳大趋智能科技有限公司 Automatic test approach, the apparatus and system of Bluetooth POS terminal
CN107317638A (en) * 2017-06-07 2017-11-03 百富计算机技术(深圳)有限公司 Method, terminal device and the computer-readable recording medium of bluetooth test
CN107689900A (en) * 2017-09-04 2018-02-13 福建新大陆支付技术有限公司 Automatic testing mobile phone and the method and system of mPOS machines compatibility
CN110024362A (en) * 2017-11-07 2019-07-16 深圳市汇顶科技股份有限公司 Bluetooth test system and method
CN109495870A (en) * 2018-07-24 2019-03-19 华为机器有限公司 The method and apparatus of bluetooth test
US20200076514A1 (en) * 2018-08-30 2020-03-05 Rohde & Schwarz Gmbh & Co. Kg Method of testing bluetooth low energy devices over-the-air and testing system

Also Published As

Publication number Publication date
CN112383911B (en) 2023-09-29

Similar Documents

Publication Publication Date Title
CN103299673B (en) Confirmation signal is used to suppress to realize higher testing efficiency
CN102497630B (en) Machine to machine (M2M) equipment, method for realizing service, intelligent card and communication module
CN111917772B (en) Adaptive charging pile communication protocol method and device
US20220327010A1 (en) Extensible communication framework and communication method supporting multiple communication protocols
WO2015188529A1 (en) Method and system for managing embedded monitoring device
CN102883227B (en) Character inputting method, devices and system
CN107784243B (en) Method and device for realizing communication of card reader equipment in android system
CN112383911A (en) POS Bluetooth automatic test method, system and storage medium
CN204721611U (en) The device of exchanges data is carried out with bluetooth equipment
CN112732458A (en) Multi-protocol data integration system and method adopting protocol stack
CN111866020B (en) Communication card and communication method
CN106330397B (en) method and device for realizing data interaction by ZigBee and Modbus RTU (remote terminal Unit) protocols
CN117221199A (en) Automatic testing system and method for communication module and testing system for communication module on satellite
CN217883483U (en) Base station equipment and communication system
CN108040345B (en) Automatic detection system for LTE conduction transmitting power of 4G mobile terminal
CN103079190B (en) It is a kind of to realize method, system and main frame that wireless terminal browses webpage function
CN109673044A (en) Communication control method, chip, the gateway apparatus of chip
CN101408453A (en) Method for testing wireless gas meter function
CN111182031A (en) PLC (programmable logic controller) equipment remote downloading method and system
CN117376441B (en) WIA-FA wireless access equipment and method supporting multi-protocol conversion in production manufacturing workshop
US20230161303A1 (en) Data acquisition method and industrial device
CN112565041B (en) Hardware information configuration method, device and medium of FF field bus system
CN111901471B (en) Drive test system and method for non-root android mobile phone
CN112565513B (en) Debugging method of mobile terminal, mobile terminal and storage medium
CN103580727A (en) Short-distance wireless data transmission method and system and mobile terminals

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant