CN107592411A - A kind of communication interface and communication means - Google Patents
A kind of communication interface and communication means Download PDFInfo
- Publication number
- CN107592411A CN107592411A CN201710752612.XA CN201710752612A CN107592411A CN 107592411 A CN107592411 A CN 107592411A CN 201710752612 A CN201710752612 A CN 201710752612A CN 107592411 A CN107592411 A CN 107592411A
- Authority
- CN
- China
- Prior art keywords
- module
- functional module
- frame
- data
- interface
- 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
Links
Landscapes
- Telephone Function (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The present invention relates to a kind of communication interface and communication means.The communication interface includes:The first interface being arranged in functional module and the second interface being arranged on modular platform, first interface and second interface match, and first interface and second interface are 8 pin interfaces.The connection and communication that the communication interface is used between functional module and modular platform, communication interface are included by preset data transmission frame number evidence, preset data frame:Preamble field, command code field, sequence-number field, data length field, data content fields, inspection code field.By implementing the present invention, the hot grafting of functional module can be achieved, identify, plug into, communicating, facilitate the Function Extension of intelligent terminal, meet users ' individualized requirement.
Description
Technical field
The present invention relates to the intelligent terminal communications field, more specifically to a kind of communication interface and communication means.
Background technology
Intelligent terminal has a wide range of applications in daily life, it may have increasing function.For example, intelligence
Energy mobile phone, intelligent watch, intelligent glasses etc., greatly facilitate the production and living of people.But be limited to volume, cost and
Standardized production, current intelligent terminal have limited hardware configuration when dispatching from the factory, and so as to limit its function, cause function limited,
And it can not expand, it is impossible to meet the Function Extension demand and individual demand of user.
At present, to make intelligent terminal have more functions, existing intelligent terminal passes through the interface external world function mould that carries
Block, to extend the function of intelligent terminal.For example, smart mobile phone connects bank card swiping card equipment by USB interface.But this mode
With certain limitation, it is capable of the limited amount of linkage function module, and the species of the functional module connected is also restricted, it is impossible to
Meets the needs of people.Also, aesthetic property is poor after connecting, and makes the operation of intelligent terminal also inconvenient.
The content of the invention
The technical problem to be solved in the present invention is that limited for the above-mentioned intelligent terminal function of prior art, extension connects
The defects of mouth is inconvenient, there is provided a kind of communication interface and communication means.
The technical solution adopted for the present invention to solve the technical problems is:Construct a kind of communication interface, the communication interface
For the connection and communication between functional module and modular platform, the communication interface passes through preset data transmission frame number evidence, institute
Stating preset data frame includes:Preamble field, command code field, sequence-number field, data length field, data content fields, inspection
Test code field;Wherein,
The preamble field is synchronous head, for indicating the flow direction of data flow;
Communications command of the command code field between the functional module and modular platform;
The sequence-number field is the sequence number automatically generated, and corresponding commands in return uses same sequence number;
The data content fields are data content;
The data length field is the length of the data content;
The inspection code field is used to verify the preset data frame.
Preferably, communication interface of the present invention, the communication interface include:Be arranged in the functional module
One interface and the second interface being arranged on the modular platform, the first interface and the second interface match;
The first interface and second interface are 8 pin interfaces, including:First pin VIN, second pin DET0, the 3rd
Pin DET1, the 4th pin VOUT, the 5th pin GND, the 6th pin DM, the 7th pin DP, the 8th pin GND;
The first pin VIN is used for the plant-grid connection of the functional module;
The second pin DET0 and the 3rd pin DET1 are used to classify to the functional module;
The power supply that the 4th pin VOUT is used for the functional module exports;
5th pin GND and the 8th pin the GND ground connection;
The 6th pin DM and the 7th pin DP is used for data content.
Preferably, 8 pins of communication interface of the present invention, the first interface and second interface divide into two rows
Cloth, four pins are often arranged, be often spaced between the pin in row equal;Or 8 pins of the first interface and second interface into
One row is distributed;
The functional module is divided into by four classes according to the second pin DET0 and the 3rd pin DET1 impedance height:
The first kind:The functional module is that empty module or idle module, no signal are into or out;
Second class:The functional module is first kind power supply module, and the first kind power supply module needs the modular platform
Power supply;
3rd class:The functional module is the second class power supply module, and the second class power supply module needs the modular platform
Power supply;
4th class:The functional module is battery or charging equipment.
In addition, the present invention also provides the communication means of a kind of functional module and module frame, functional module is led to using above-mentioned
Believe interface connection module framework, the module frame is used to connect intelligent terminal, the communication protocol packet that the communication interface uses
Include:Knock at the door agreement, module control protocol, data exchange agreement;
The discovery that the agreement that knocks at the door is used for functional module detects;The module control protocol is used to set the function mould
The command type of configuration and the regulation of block;The data exchange agreement is used for the download and upload of data.
Preferably, functional module of the present invention and module frame communication means, the functional module and module frame
Between communication include:
S1:After the functional module is plugged on the module frame, the module frame carries out mould to the functional module
Block type is identified, and in identification process, the module frame is not powered for the functional module;
S2:After the module frame identifies the type of the functional module, it is powered and/or connects for the functional module
Refute operation;
S3:The functional module knocks at the door agreement to the module frame described in sending;
S4:Knocked at the door according to agreement and the functional module of the module frame is established and communicated to connect.
Preferably, functional module of the present invention and module frame communication means, the communication interface pass through present count
According to transmission frame number evidence, in the preset data frame:Preamble field, command code field, sequence-number field, data length field,
And the data length of inspection code field is 1 byte, the data length of data content fields is N byte, and N is natural number;
The inspection code field is verified by BCC verification modes.
Preferably, functional module of the present invention and module frame communication means, the module frame are provided with least
One slot for being used to install the functional module, the functional module pass through one or more slots and the module frame
Frame connects.
The another present invention also provides a kind of communication means of module frame and intelligent terminal, uses above-mentioned communication interface, intelligence
Energy terminal is provided with the management APP for management module framework and functional module;
The intelligent terminal is communicated with module frame, and the module frame passes through the communication interface and the function
Module is communicated.
Preferably, the communication means of module frame and intelligent terminal of the present invention, the communication interface pass through default
Data frame transfer data, in the preset data frame:Preamble field, command code field, sequence-number field, data length word
Section and the data length for examining code field are 4 bytes, and the data length of data content fields is N byte, and N is natural number;
The inspection code field is verified by CRC check mode.
Preferably, the communication means of module frame and intelligent terminal of the present invention, the command code field include:Institute
State intelligent terminal and initiate the connection request command field of connection, the intelligent terminal to the module frame to the module frame
That initiates to disconnect disconnects command field, the synch command field sent by module frame interval preset time;
The intelligent terminal includes:Smart mobile phone, Intelligent bracelet, intelligent glasses;
The intelligent terminal uses Android operation system, IOS, Windows operating system, Linux operations
System.
Implement a kind of communication interface and communication means of the present invention, have the advantages that:The communication interface includes:If
Put the first interface in functional module and the second interface being arranged on modular platform, first interface and second interface phase
Match somebody with somebody, first interface and second interface are 8 pin interfaces.The communication interface be used for connection between functional module and modular platform with
Communication, communication interface are included by preset data transmission frame number evidence, preset data frame:Preamble field, command code field, sequence number
Field, data length field, data content fields, inspection code field.By implement the present invention, realize functional module grafting,
Identify, plug into, communicate, facilitate the Function Extension of intelligent terminal, meet users ' individualized requirement.
Brief description of the drawings
Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:
Fig. 1 is the structural representation of communication interface connectivity capabilities module of the present invention and modular platform;
Fig. 2 a and Fig. 2 b are a kind of pin configuration figures of communication interface of the present invention;
Fig. 3 is the connected mode schematic diagram of modular platform of the present invention and functional module;
Fig. 4 is a kind of preset data frame format figure of communications interface transmission data of the present invention;
Fig. 5 is the communication process schematic diagram of functional module of the present invention and module frame;
Fig. 6 is functional module of the present invention and module frame communication means schematic flow sheet;
Fig. 7 is the system structure diagram of a kind of module frame of the present invention and intelligent terminal;
Fig. 8 is the structural representation of module frame and intelligent terminal of the present invention;
Fig. 9 is battery module control structure schematic diagram of the present invention;
Figure 10 is the empty gas and water module control structure schematic diagram of the present invention;
Figure 11 is bluetooth earphone control structure schematic diagram of the present invention;
Figure 12 is bracelet module control structure schematic diagram of the present invention.
Embodiment
In order to which technical characteristic, purpose and the effect of the present invention is more clearly understood, now compares accompanying drawing and describe in detail
The embodiment of the present invention.
Fig. 1 is the structural representation of communication interface connectivity capabilities module of the present invention and modular platform.
Specifically, the communication interface of the present invention is used to connect and realize the communication between modular platform and functional module.It is excellent
Selection of land, intelligent terminal include but is not limited to smart mobile phone, Intelligent bracelet, intelligent glasses etc.;Intelligent terminal is operated using Android
System, IOS, Windows operating system, (SuSE) Linux OS etc..Functional module includes but is not limited to:Battery mould
Block, air module, water module, bracelet module, bluetooth earphone module, locating module, apart from detection module, temperature detecting module,
Memory module, NFC module, wireless charging module etc..
The communication interface includes:The first interface that is arranged in functional module and what is be arranged on modular platform second connect
Mouthful, and first interface and second interface match.Modular platform may include multiple second interfaces, and modular platform passes through each second
The first interface of interface linkage function module, realizes the extension of One function module.
Alternatively, first interface and second interface are 8 pin interfaces, including:First pin VIN, second pin DET0,
3rd pin DET1, the 4th pin VOUT, the 5th pin GND, the 6th pin DM, the 7th pin DP, the 8th pin GND.Below
The function of each pin is defined:
First pin VIN is used for the plant-grid connection of functional module, for first kind functional module and the second class functional module
Use, the division of first kind functional module and the second class functional module is realized by second pin DET0 and the 3rd pin DET1.
Second pin DET0 and the 3rd pin DET1 is used to classify to functional module, according to second pin DET0 and the
Functional module is divided into four classes by three pin DET1 impedance height:
First kind functional module:Functional module is empty module or idle module, and the generic module need to only be plugged on modular platform
On, no signal is into or out.
Second class functional module:Functional module is first kind power supply module, and the generic module needs modular platform to be provided for it
Electrical characteristic, that is, electric energy is provided and communicated.Preferably, if modular platform is module frame, and the module frame is used for
Intelligent terminal is connected, then the second class functional module, which is directly docked with module frame, uses.
3rd class functional module:Functional module is the second class power supply module, and the generic module needs modular platform to be provided for it
Electrical characteristic, that is, electric energy is provided and communicated.Preferably, if modular platform is module frame, and the module frame is used for
Intelligent terminal is connected, then the second class functional module, which is directly docked with intelligent terminal, uses.For example, the 3rd class functional module is to deposit
Module is stored up, if then the memory module is given to intelligent terminal again after data are handled by module frame, data transfer can be caused
Speed is slower, and the requirement to the processor of module frame is higher, causes cost increase, so, this generic module need directly and
Intelligent terminal carries out data interaction, it is not necessary to intermediate transit, so as to improve message transmission rate.
4th class functional module:Functional module is battery or charging equipment, while can be charged the battery by VIN.
The power supply that 4th pin VOUT is used for functional module exports;
5th pin GND and the 8th pin GND ground connection;
6th pin DM and the 7th pin DP are used for data content.
It should be understood that the putting in order for 8 pins of above-mentioned communication interface can be adjusted as needed, the present invention is right
This is not limited, and its pin number and function and identical of the present invention, belongs to protection scope of the present invention.
Fig. 2 a and Fig. 2 b are a kind of pin configuration figures of communication interface of the present invention.
Specifically, in Fig. 2 a, 8 pins of first interface and 8 pins of second interface are corresponding.First interface and
8 pins of second interface are distributed into two rows, often arrange four pins, are often spaced between the pin in row equal.Or, in Fig. 2 b
In, 8 pin distributions in a row of first interface and second interface, i.e. 8 pin arrangements in a row.It is appreciated that the communication
The distribution of 8 pins of interface can carry out accommodation according to functional module and the shape and link position of modular platform.
Fig. 3 is the connected mode schematic diagram of modular platform of the present invention and functional module.
Specifically, setting multiple second interfaces on modular platform, corresponding one of each second interface is used for installation function mould
The slot of block, slot are in a parallel set, and functional module is connected by one or more slots with module frame.Functional module is inserted
In slot, by the second interface of its first interface link block platform, so as to realize the connection with modular platform.Optionally,
Functional module can be that a slot grafting One function module or a module take multiple slots.Such as Fig. 3
In, modular platform is provided with four second interfaces, is corresponding with four slots, can be the corresponding slot of One function module
The two-in-one interfaces of corresponding two slots of single slot functional module or One function module, can also be One function
The four-in-one interface of corresponding four slots of module.It should be understood that when a module corresponds to multiple slots, its first interface can
For one or more.
Alternatively, the functional module in the present invention can be simple function or multiple functions, can be combined as needed.
If simple function module, then a first interface is only needed;If multifunction module, then there can be multiple first interfaces.
Fig. 4 is a kind of preset data frame format figure of communications interface transmission data of the present invention.
Specifically, connection and communication that communication interface is used between functional module and modular platform, communication interface passes through pre-
If data frame transfer data, preset data frame includes:Preamble field (leading), command code field (command field), sequence number word
Section (sequence number), data length field (data length), data content fields (data), examine code field (verification and);Wherein,
Preamble field is synchronous head, and for indicating the flow direction of data flow, its byte is fixed, and transmission means has two kinds:
One kind is that modular platform is initiated to functional module, and another kind is that functional module is initiated to modular platform.
Communications command of the command code field between functional module and modular platform, as communications command, the present invention is set
There is command list (CLIST), the command list (CLIST) is stored respectively in functional module and modular platform, is used for coding and decoding.
The sequence number that sequence-number field automatically generates for the system of modular platform and functional module composition, it is corresponding to reply life
Order uses same sequence number, and only promoter just possesses the sequence number of system generation.
Data content fields are data content, and the data content includes what modular platform was sent to functional module
The gathered data that order and data and functional module are sent to modular platform.For example, the temperature data of functional module collection,
Location information etc..
Data length field is the length of data content, and the length of data content can be configured as needed, energy
Enough meet data transportation requirements;For example, 255 bytes, 1024 bytes etc..
Code field is examined to be used to verify preset data frame., it is necessary to detect this after preset data frame is transmitted
Whether data frame occurs mistake in transmitting procedure and carries out data correction by verifying.The present invention is not to data check
Mode is defined, and can carry out data check.For example, using CRC check, (Cyclic Redundancy Check, are followed
Ring redundancy check code) or BCC verifications (BlockCheck Character, information group check code).
Fig. 5 is the communication process schematic diagram of functional module of the present invention and module frame.
Specifically, functional module uses above-mentioned communication interface link block framework, module frame is used to connect intelligent end
End, the communication protocol that communication interface uses include:Knock at the door agreement, module control protocol, data exchange agreement.
The discovery that the agreement that knocks at the door is used for functional module detects, and the data definition for the agreement that knocks at the door is:Data type (1 byte)+
Data pattern (1 byte)+2 bytes (extension) that module is supported.For example, the agreement that knocks at the door is as shown in table 1:
Table 1
Command header | Command code | Sequence number | Data length | Data | Check code |
0X5A | 0XF1 | 0X00 | 0X04 | 4 | BCC is verified |
By taking air module and bracelet module as an example, module type definition is as shown in table 2:
Table 2
Module title | Module type | Module data pattern |
Air module | 0x30 | Trigger-type or timing are reported:0x01 |
Bracelet module | 0x90 | Data summarization interacts:0x02 |
Module control protocol is used for the command type for setting configuration and the regulation of functional module;
Data exchange agreement is used for the download and upload of data.
Fig. 6 is functional module of the present invention and module frame communication means schematic flow sheet.
Specifically, the functional module of the present invention and module frame communication means, are used between module frame and functional module
HID (Human Interface Device) agreements use preset data frame as bottom communication basic agreement, application data bag.
Communication between functional module and module frame comprises the following steps:
S1:After functional module is plugged on module frame, module frame carries out module type identification to functional module, and is knowing
During not, module frame is not powered for functional module;
S2:After the type of module frame identification function module, it is powered and/or plugs into operation for functional module;
S3:Functional module sends the agreement that knocks at the door to module frame;
S4:Module frame is established with functional module according to the agreement that knocks at the door and communicated to connect.
Preferably, for the communication interface of command frame and functional module by preset data transmission frame number evidence, this is default
The length of data frame is not more than 260 bytes, using little endian mode.Specifically, in preset data frame:Preamble field, command code
Field, sequence-number field, data length field and to examine the data length of code field be 1 byte, the number of data content fields
It is N byte according to length, N is natural number.
Preamble field is synchronous head, and for indicating the flow direction of data flow, its byte is fixed, and transmission means has two kinds:
One kind is that module frame is initiated to functional module, and another kind is that functional module is initiated to module frame.
Communications command of the command code field between functional module and module frame, as communications command, the present invention is set
There is command list (CLIST), the command list (CLIST) is stored respectively in functional module and module frame, is used for coding and decoding.
The sequence number that sequence-number field automatically generates for the system of module frame and functional module composition, it is corresponding to reply life
Order uses same sequence number, and only promoter just possesses the sequence number of system generation.
Data content fields are data content, and the data content includes what module frame was sent to functional module
The gathered data that order and data and functional module are sent to module frame.For example, the temperature data of functional module collection,
Location information etc..
Data length field be data content length, up to 255 bytes.
Code field is examined to be used to verify preset data frame., it is necessary to detect this after preset data frame is transmitted
Whether data frame occurs mistake in transmitting procedure and carries out data correction by verifying.Code field is examined to be verified by BCC
Mode is verified.
Above-mentioned principle is further described below by way of air module and bracelet module.
For air module, the air module needs to report the agreement that knocks at the door after the power-up, and data are as above fixed in the agreement that knocks at the door
Justice.
Air module uses the command code of Internet of Things module, and all command codes are defined on the value between 0X10-0X1F, after
During phase increase order the value of the corresponding command is provided in this section.
Command name:Obtain present air achievement data.
Order code value:0X10.
Command description:Obtain air module now each achievement data value of air.
Application scenarios:Framework is communicated by this instruction with air module, obtains now air related data.
It is as shown in table 3 to obtain data format:
Table 3
Command header | Command code | Sequence number | Data length | Data | Check code |
0XA5 | 0X10 | System defines | 0X00 | Nothing | BCC is verified |
Returned data form is as shown in table 4:
Table 4
Command header | Command code | Sequence number | Data length | Data | Check code |
0X5A | 0X10 | Same frame end | 0X04 | Data or mistake | BCC is verified |
Data format definition:
Air returned data:The byte air data of small end 4, or 0xFFFFxxxx, wherein 0xFFFF are shown to be mistake and returned
Return, xxxx shows error code.
For bracelet module, the bracelet module needs to report the agreement that knocks at the door after the power-up, and data are as above fixed in the agreement that knocks at the door
Justice.
All command codes of bracelet module are defined on the value between 0X20~0X2F, in this section when later stage increase is ordered
Provide the value of the corresponding command.
Command name:Obtain bracelet data.
Order code value:0X20.
Command description:Obtain the data of bracelet module.
Application scenarios:Framework downloads all data of bracelet by this instruction.
It is as shown in table 5 to obtain data format:
Table 5
Command header | Command code | Sequence number | Data length | Data | Check code |
0XA5 | 0X20 | System defines | 0X00 | Nothing | BCC is verified |
Shown in returned data format sheet 6:
Table 6
Command header | Command code | Sequence number | Data length | Data | 2 yards of verification |
0X5A | 0X20 | Same frame end | Length | Data or mistake | BCC is verified |
Data format definition:
Air returned data:Length is returned by module, returns to 4 byte 0xFFFFxxxx during mistake, wherein 0xFFFF shows
It is wrong return, xxxx shows error code.
Fig. 7 is the system structure diagram of a kind of module frame of the present invention and intelligent terminal.
Connect and communicate specifically, functional module is established by the communication interface of the present invention with module frame, module frame
Connection intelligent terminal simultaneously communicates.For example, intelligent terminal is smart mobile phone, module frame is mobile phone shell on the back.Functional module and module
Above-mentioned communication interface is used between framework, intelligent terminal is provided with the management APP for management module framework and functional module.
Intelligent terminal is communicated with module frame, and module frame is communicated by communication interface with functional module.
Preferably, the communication means of module frame of the invention and intelligent terminal, communication interface are passed by preset data frame
Transmission of data, in preset data frame:Preamble field, command code field, sequence-number field, data length field and check code
The data length of field is 4 bytes, and the data length of data content fields is N byte, and N is natural number.
Preamble field is synchronous head, and for indicating the flow direction of data flow, its byte is fixed, and transmission means has two kinds:
One kind is that module frame is initiated to intelligent terminal, and another kind is that intelligent terminal is initiated to module frame.
Communications command of the command code field between functional module and module frame, as communications command, the present invention is set
There is command list (CLIST), the command list (CLIST) is stored respectively in functional module, module frame and intelligent terminal, is made for coding and decoding
With.
Sequence-number field is the sequence number that the system of intelligent terminal, module frame and functional module composition automatically generates,
Corresponding commands in return uses same sequence number, and only promoter just possesses the sequence number of system generation.
Data content fields are data content, and the data content includes what modular platform was sent to functional module
The gathered data that order and data and functional module are sent to modular platform.For example, the temperature data of functional module collection,
Location information etc..
Data length field is the length of data content, and the length of data content is not more than 1024 bytes.Preferably,
If data length is more than 1024 bytes, connected using framing.
Code field is examined to be used to verify preset data frame., it is necessary to detect this after preset data frame is transmitted
Whether data frame occurs mistake in transmitting procedure and carries out data correction by verifying.Code field is examined to pass through CRC check
Mode is verified.
Preferably, command code field includes:Intelligent terminal initiates the connection request command field of connection, example to module frame
Such as, android Host Detections are waited module frame could carry out follow-up business after responding and inquired about to initiating after module frame, the word
Segment value is 0x4E584E43.Intelligent terminal disconnects command field to what module frame initiated to disconnect;For example,
Android main frames are initiated after disconnecting module frame, wait module frame to transmit subsequent commands field after ringing, the field value
For 0x45534C43, or after detecting that module frame pulls out, automatic is CLOSE states.Sent out by module frame interval preset time
The synch command field gone out, for example, being initiated by framework self-timing every five seconds for example, the field value is 0x434E5953, does not such as receive this
Field, which is meant that, is connected with exception.
The system of intelligent terminal, module frame and functional module composition is described in detail by the following examples.
Fig. 8 is the structural representation of module frame and intelligent terminal of the present invention.
Command word title:Module frame control protocol.
Order word description:The control mode that the main describing module framework access detection of the agreement, framework electricity obtain.
Command word structure:As shown in table 7, associated frame members access, framework disconnection, electricity obtain respectively:
Table 7
It is leading | Command field | Sequence number | Data length | Data | Verification and |
0XA534785A | 0X0101 | System defines | 0 | Nothing | |
0XA534785A | 0X0102 | System defines | 0 | Nothing | |
0XA534785A | 0X0103 | System defines | 0 | Nothing |
Intelligent terminal is replied:As shown in table 8, associated frame members access, framework disconnection, electricity obtain respectively.
Table 8
It is leading | Command field | Sequence number | Data length | Data | Verification and |
0XA587535A | 0X0101 | Same transmitting terminal | 4/5 | true/false | |
0XA587535A | 0X0102 | Same transmitting terminal | 4/5 | true/false | |
0XA587535A | 0X0103 | Same transmitting terminal | int |
Usage scenario:User start by module frame access intelligent terminal (such as mobile phone) when, it is necessary to intelligent end
End is attached judgement.Or user from intelligent terminal Removal Module framework when sentence, it is necessary to be turned off with intelligent terminal
It is disconnected.In addition, user wonders whether module frame electricity is sufficient, such as inadequate, the operation that can be charged.
Fig. 9 is battery module control structure schematic diagram of the present invention.
Command word title:Battery control protocol.
Order word description:The agreement mainly describes charging/not charge control, and the side that electricity obtains of battery module
Formula.
Command word structure:Such as table 9, battery is corresponded to respectively and is charged, is not charged, obtains electricity.
Table 9
Intelligent terminal is replied:Such as table 10, battery is corresponded to respectively and is charged, is not charged, obtains electricity.
Table 10
It is leading | Command field | Sequence number | Data length | Data | Verification and |
0XA587535A | 0X0201 | Same transmitting terminal | 4/5 | true/false | |
0XA587535A | 0X0202 | Same transmitting terminal | 4/5 | true/false | |
0XA587535A | 0X0203 | Same transmitting terminal | int |
Usage scenario:Here it is mainly the use of user's control battery module, when module frame not enough power supply, can controls
Battery module processed charges to module frame;Or when intelligent terminal (such as mobile phone) not enough power supply, battery can be controlled
Module enters charging to intelligent terminal.It can in addition contain obtain the electricity of battery module, only need to be filled battery module every time
Electricity is just.
On USB flash disk control protocol.
Command word title:USB flash disk control protocol.
Order word description:The agreement mainly describes the control modes such as USB flash disk on-line monitoring, USB flash disk Password Input, USB flash disk read-write.
Command word structure:Such as table 11, USB flash disk detection, USB flash disk password match, USB flash disk reading and writing data are corresponded to respectively.
Table 11
It is leading | Command field | Sequence number | Data length | Data | Verification and |
0XA534785A | 0X0301 | System defines | 0 | Nothing | |
0XA534785A | 0X0302 | System defines | 0 | Nothing | |
0XA534785A | 0X0303 | System defines | 0 | Nothing |
Intelligent terminal is replied:Such as table 12, USB flash disk detection, USB flash disk password match, USB flash disk reading and writing data are corresponded to respectively.
Table 12
Usage scenario:Here it is mainly that user interacts with USB flash disk module, when framework inserts USB flash disk, user can be prompted to have
Mass-memory unit is inserted, and user is then operated accordingly.USB flash disk password is matched with backstage, and the reading of USB flash disk data
Write this and be all placed on high in the clouds, user is controlled by sending corresponding instruction.
Figure 10 is the empty gas and water module control structure schematic diagram of the present invention.
Command word title:Empty gas and water class sensor control protocol.
Order word description:The agreement mainly describe empty gas and water class sensor assembly on-line checking and a data and
The mode of the acquisition of all data.
Command word structure:Such as table 13, the detection of difference respective modules, data, a data summarization are obtained.
Table 13
It is leading | Command field | Sequence number | Data length | Data | Verification and |
0XA534785A | 0X0401 | System defines | 0 | Nothing | |
0XA534785A | 0X0402 | System defines | 4 | “ones” | |
0XA534785A | 0X0403 | System defines | 3 | “all” |
Intelligent terminal is replied:Such as table 14, the detection of difference respective modules, data, a data summarization are obtained.
Table 14
It is leading | Command field | Sequence number | Data length | Data | Verification and |
0XA587535A | 0X0401 | Same transmitting terminal | 4/5 | true/false | |
0XA587535A | 0X0402 | Same transmitting terminal | json | ||
0XA587535A | 0X0403 | Same transmitting terminal | json |
Usage scenario:Here it is mainly interacting between user and air, water sensor module.Passed when inserting empty gas and water
After sensor module, it can accordingly be detected and prompt user.If user wonders present air, water quality, Ke Yijin
Data query of row, or air, the water quality data wave pattern of 24 hours one day can be understood by data summarization.
Figure 11 is bluetooth earphone control structure schematic diagram of the present invention.
Command word title:Bluetooth earphone control protocol.
Order word description:The agreement mainly describes bluetooth earphone module on-line checking, earphone charging and the control do not charged
Mode.
Command word structure:Such as table 15, respective modules detection, module charge, not charged respectively
Table 15
It is leading | Command field | Sequence number | Data length | Data | Verification and |
0XA534785A | 0X0501 | System defines | 0 | Nothing | |
0XA534785A | 0X0502 | System defines | 0 | Nothing | |
0XA534785A | 0X0503 | System defines | 0 | Nothing |
Intelligent terminal is replied:Such as table 16
Table 16
It is leading | Command field | Sequence number | Data length | Data | Verification and |
0XA587535A | 0X0501 | Same transmitting terminal | 4/5 | true/false | |
0XA587535A | 0X0502 | Same transmitting terminal | 4/5 | true/false | |
0XA587535A | 0X0503 | Same transmitting terminal | 4/5 | true/false |
Usage scenario:Here it is mainly that bluetooth earphone can be inserted framework by user, when framework detects earphone insertion,
It is informed about whether user needs to be charged.
Figure 12 is bracelet module control structure schematic diagram of the present invention.
Command word title:Bracelet control protocol.
Order word description:The agreement mainly describes bracelet module on-line checking, bracelet data acquisition, bracelet charging with not filling
The control mode of electricity.
Command word structure:Such as table 17, respective modules detect, charge, do not charge, digital independent respectively.
Table 17
It is leading | Command field | Sequence number | Data length | Data | Verification and |
0XA534785A | 0X0701 | System defines | 0 | Nothing | |
0XA534785A | 0X0702 | System defines | 0 | Nothing | |
0XA534785A | 0X0703 | System defines | 0 | Nothing | |
0XA534785A | 0X0704 | System defines | 0 | Nothing |
Intelligent terminal is replied:Such as table 18, respective modules detect, charge, do not charge, digital independent respectively.
Table 18
It is leading | Command field | Sequence number | Data length | Data | Verification and |
0XA587535A | 0X0701 | Same transmitting terminal | 4/5 | true/false | |
0XA587535A | 0X0702 | Same transmitting terminal | 4/5 | true/false | |
0XA587535A | 0X0703 | Same transmitting terminal | 4/5 | true/false | |
0XA587535A | 0X0704 | Same transmitting terminal |
Usage scenario:Here it is mainly interacting between intelligent terminal and bracelet module, first, module frame can detect
The presence of bracelet, then intelligent terminal can with control framework give bracelet carry out charging operations, when intelligent terminal needs the number of bracelet
According to when, can send instruction carry out data read operation.
By implementing the present invention, the grafting of functional module is realized, identifies, plug into, communicating, facilitates the function of intelligent terminal to expand
Exhibition, meets users ' individualized requirement.Meanwhile on the premise of the security and completeness of guarantee agreement, more focus on efficiency.Meet
The lightweight of Internet of Things, the demand timely responded to.
Above example only technical concepts and features to illustrate the invention, its object is to allow person skilled in the art
Scholar can understand present disclosure and implement accordingly, can not limit the scope of the invention.It is all to be wanted with right of the present invention
The equivalent changes and modifications that scope is done are sought, the covering scope of the claims in the present invention all should be belonged to.
Claims (10)
- A kind of 1. communication interface, it is characterised in that the communication interface be used for connection between functional module and modular platform with Communication, the communication interface are included by preset data transmission frame number evidence, the preset data frame:Preamble field, order code word Section, sequence-number field, data length field, data content fields, inspection code field;Wherein,The preamble field is synchronous head, for indicating the flow direction of data flow;Communications command of the command code field between the functional module and modular platform;The sequence-number field is the sequence number automatically generated, and corresponding commands in return uses same sequence number;The data content fields are data content;The data length field is the length of the data content;The inspection code field is used to verify the preset data frame.
- 2. communication interface according to claim 1, it is characterised in that the communication interface includes:It is arranged on the function First interface in module and the second interface being arranged on the modular platform, the first interface and the second interface phase Matching;The first interface and second interface are 8 pin interfaces, including:First pin VIN, second pin DET0, the 3rd pin DET1, the 4th pin VOUT, the 5th pin GND, the 6th pin DM, the 7th pin DP, the 8th pin GND;The first pin VIN is used for the plant-grid connection of the functional module;The second pin DET0 and the 3rd pin DET1 are used to classify to the functional module;The power supply that the 4th pin VOUT is used for the functional module exports;5th pin GND and the 8th pin the GND ground connection;The 6th pin DM and the 7th pin DP is used for data content.
- 3. communication interface according to claim 2, it is characterised in that the first interface and 8 pins of second interface It is distributed into two rows, often arranges four pins, is often spaced between the pin in row equal;Or the 8 of the first interface and second interface Individual pin distribution in a row;The functional module is divided into by four classes according to the second pin DET0 and the 3rd pin DET1 impedance height:The first kind:The functional module is that empty module or idle module, no signal are into or out;Second class:The functional module is first kind power supply module, and the first kind power supply module needs the modular platform power supply;3rd class:The functional module is the second class power supply module, and the second class power supply module needs the modular platform power supply;4th class:The functional module is battery or charging equipment.
- 4. the communication means of a kind of functional module and module frame, it is characterised in that functional module usage right requires that 1-3 is any Communication interface link block framework described in, the module frame are used to connect intelligent terminal, what the communication interface used Communication protocol includes:Knock at the door agreement, module control protocol, data exchange agreement;The discovery that the agreement that knocks at the door is used for functional module detects;The module control protocol is used to set the functional module Configuration and the command type of regulation;The data exchange agreement is used for the download and upload of data.
- 5. functional module according to claim 4 and module frame communication means, it is characterised in that the functional module with Communication between module frame includes:S1:After the functional module is plugged on the module frame, the module frame carries out module class to the functional module Type is identified, and in identification process, the module frame is not powered for the functional module;S2:After the module frame identifies the type of the functional module, it is powered and/or plugs into behaviour for the functional module Make;S3:The functional module knocks at the door agreement to the module frame described in sending;S4:Knocked at the door according to agreement and the functional module of the module frame is established and communicated to connect.
- 6. functional module according to claim 4 and module frame communication means, it is characterised in that the communication interface is led to Preset data transmission frame number evidence is crossed, in the preset data frame:Preamble field, command code field, sequence-number field, data length The data length for spending field and inspection code field is 1 byte, and the data length of data content fields is N byte, and N is nature Number;The inspection code field is verified by BCC verification modes.
- 7. functional module according to claim 4 and module frame communication means, it is characterised in that the module frame is set up At least one slot for being used to install the functional module is equipped with, the functional module passes through one or more slots and institute State module frame connection.
- 8. the communication means of a kind of module frame and intelligent terminal, it is characterised in that usage right is required described in any one of 1-3 Communication interface, intelligent terminal are provided with the management APP for management module framework and functional module;The intelligent terminal is communicated with module frame, and the module frame passes through the communication interface and the functional module Communicated.
- 9. the communication means of module frame according to claim 8 and intelligent terminal, it is characterised in that the communication interface By preset data transmission frame number evidence, in the preset data frame:Preamble field, command code field, sequence-number field, data Length field and the data length for examining code field are 4 bytes, and the data length of data content fields is N byte, and N is certainly So number;The inspection code field is verified by CRC check mode.
- 10. the communication means of module frame according to claim 9 and intelligent terminal, it is characterised in that the command code Field includes:The intelligent terminal to the module frame initiate connection connection request command field, the intelligent terminal to What the module frame initiated to disconnect disconnect command field, it is same to be sent by module frame interval preset time Step command field;The intelligent terminal includes:Smart mobile phone, Intelligent bracelet, intelligent glasses;The intelligent terminal uses Android operation system, IOS, Windows operating system, Linux operations system System.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710752612.XA CN107592411B (en) | 2017-08-28 | 2017-08-28 | Communication interface and communication method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710752612.XA CN107592411B (en) | 2017-08-28 | 2017-08-28 | Communication interface and communication method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107592411A true CN107592411A (en) | 2018-01-16 |
CN107592411B CN107592411B (en) | 2022-04-01 |
Family
ID=61050133
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710752612.XA Active CN107592411B (en) | 2017-08-28 | 2017-08-28 | Communication interface and communication method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107592411B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019041104A1 (en) * | 2017-08-28 | 2019-03-07 | 杭州来布科技有限公司 | Communication interface and communication method |
CN111104175A (en) * | 2020-01-14 | 2020-05-05 | 杭州鸿雁智能科技有限公司 | Configurable sharing device and related methods |
CN112066447A (en) * | 2020-09-15 | 2020-12-11 | 美的集团武汉制冷设备有限公司 | Air conditioner, control method of air conditioner, and computer-readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6490156B2 (en) * | 2001-09-26 | 2002-12-03 | Portwell Inc. | Industrial computer case structure with modular interface card expansion capability |
CN1615634A (en) * | 2002-08-28 | 2005-05-11 | 英特尔公司 | System and method to communicate between a host and a modem |
CN101197652A (en) * | 2001-09-06 | 2008-06-11 | 高通股份有限公司 | Generating and implementing a communication protocol and interface for high data rate signal transfer |
CN101300821A (en) * | 2005-11-02 | 2008-11-05 | 京瓷无线公司 | Portable communication device and system with interchangeable accessory modules |
CN103427945A (en) * | 2012-09-07 | 2013-12-04 | 万高(杭州)科技有限公司 | Synchronous serial communication interface and communication method thereof |
-
2017
- 2017-08-28 CN CN201710752612.XA patent/CN107592411B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101197652A (en) * | 2001-09-06 | 2008-06-11 | 高通股份有限公司 | Generating and implementing a communication protocol and interface for high data rate signal transfer |
US6490156B2 (en) * | 2001-09-26 | 2002-12-03 | Portwell Inc. | Industrial computer case structure with modular interface card expansion capability |
CN1615634A (en) * | 2002-08-28 | 2005-05-11 | 英特尔公司 | System and method to communicate between a host and a modem |
CN101300821A (en) * | 2005-11-02 | 2008-11-05 | 京瓷无线公司 | Portable communication device and system with interchangeable accessory modules |
CN103427945A (en) * | 2012-09-07 | 2013-12-04 | 万高(杭州)科技有限公司 | Synchronous serial communication interface and communication method thereof |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019041104A1 (en) * | 2017-08-28 | 2019-03-07 | 杭州来布科技有限公司 | Communication interface and communication method |
CN111104175A (en) * | 2020-01-14 | 2020-05-05 | 杭州鸿雁智能科技有限公司 | Configurable sharing device and related methods |
CN112066447A (en) * | 2020-09-15 | 2020-12-11 | 美的集团武汉制冷设备有限公司 | Air conditioner, control method of air conditioner, and computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107592411B (en) | 2022-04-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105188022B (en) | Wireless routing device and communication means | |
CN109212983A (en) | Intelligent home furnishing control method, gateway and intelligent home control system | |
CN107592411A (en) | A kind of communication interface and communication means | |
CN106652415A (en) | Processing method and device of protocol for concentrated reading of multiple meters | |
CN102426724B (en) | Integrated charging and acquisition terminal | |
CN101170836A (en) | Remote image monitoring system based on radio sensor network | |
CN103560886A (en) | Authentication method for electronic signature equipment | |
CN103973643A (en) | Intelligent protocol converter | |
CN110419066A (en) | Sensor device and sensor network system | |
CN104394279A (en) | Communication terminal and terminal interface equipment for SIM card wireless data transmission | |
CN103856411B (en) | Switching system connected with UART interface of router | |
CN107507362A (en) | System is leased and given back to a kind of self-shooting bar | |
CN208489863U (en) | Internet of Things intelligently bridges gateway and system | |
CN110137755A (en) | Connector and the second electronic equipment including connector | |
CN102148631B (en) | Dismountable wireless communication module and its method started | |
CN210038898U (en) | Intelligent access control system | |
CN103647793B (en) | Bus type sensing separation method capable of supporting hot plugging for sensor nodes | |
CN106410921A (en) | Charge monitoring method and charging monitoring device | |
CN110212937A (en) | Low-power consumption mould group based on single Beidou module multibard data transmission mode | |
CN112070938B (en) | Intelligent access control configuration equipment and intelligent access control configuration system | |
CN111862571B (en) | Method for reading a flow meter | |
CN208013709U (en) | Express box | |
CN1889401B (en) | Method for on-line identifying small packaged hot connecting and disconnecting module | |
CN114051219A (en) | Edge node wireless sensor connection method and system | |
CN206480870U (en) | Connector |
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 |