CN102944296A - Method of customizing electronic weighing apparatus with private MIB - Google Patents
Method of customizing electronic weighing apparatus with private MIB Download PDFInfo
- Publication number
- CN102944296A CN102944296A CN2012104195777A CN201210419577A CN102944296A CN 102944296 A CN102944296 A CN 102944296A CN 2012104195777 A CN2012104195777 A CN 2012104195777A CN 201210419577 A CN201210419577 A CN 201210419577A CN 102944296 A CN102944296 A CN 102944296A
- Authority
- CN
- China
- Prior art keywords
- module
- electronic scale
- proprietary mib
- private mib
- information
- 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
Images
Landscapes
- Computer And Data Communications (AREA)
Abstract
The invention discloses a method of customizing an electronic weighing apparatus with a private MIB (Management Information Base), which comprises the following steps that: a wireless network module wirelessly connected with a wireless access point in a network is configured in the electronic weighing apparatus; an SNMP (Simple Network Management Protocol) agent module is loaded in the wireless network module; parameters of the SNMP agent module are configured; the private MIB for storing private MIB information is configured in the electronic weighing apparatus; the private MIB is designed according to data parameters related to the electronic weighing apparatus; a corresponding C code frame is generated from a private MIB document by the SNMP agent module; a C code is perfected according to requirements; the corresponding private MIB information is compiled into a C document; an SO (Shared Object) dynamic library document is generated from the perfected C document by a gcc (GNU Compiler Collection) compiler in a controller module; the SO dynamic library document is transplanted to the SNMP agent module; finally the SNMP agent module is restarted; interface functions of the private MIB information in the corresponding private MIB are compiled; and the private MIB information can immediately take effect in the electronic weighing apparatus when being changed by other clients.
Description
[technical field]
The present invention relates to the method that a kind of customization has the electronic scale in Proprietary MIB storehouse, consider required all the essential information design Proprietary MIB storehouses of using of electronic scale, be embedded in the electronic scale and write corresponding function operation, so that by networking client direct managing electronic weighing apparatus just.
[background technology]
As far back as 2002, EU Committee put into effect the ECNo178/2002 rules, require from 2005, but every food of selling in European Union member countries must possess tracing function, otherwise not allow list marketing, did not possess the food import prohibition of trackability.In recent years, but China is for promoting the food security tracing management, a series of No. 1 files have been put into effect, implement agricultural product quality and safety test system construction plan, carry out quality safety monitoring and inspection in accordance with the law, perfect agricultural product sign and traceable system, the boost exports agricultural product quality is reviewed System Construction.Thus, the Safety of Food Quality traceability system arises at the historic moment under this background.The weighing apparatus of tracing to the source, that is review scale, network scale, radio-frequency (RF) identification balance, utilization is traced to the source scale as Safety of Food Quality traceability system terminal, realize food information typing, transmission, record food security information, Transaction Information, and to consumer's print quality voucher traceability code of tracing to the source, rely on this card consumer or to dial the mode of hot line by inquiry terminal machine, internet, SMS, inquiry own the food quality of buying whether qualified, the information content can comprise: the food place of production, the condition of production, medicining condition, intermediate links situation, inspection and quarantine information etc.
The existing scale of tracing to the source does not also relate to the correlation technique that how to customize the Proprietary MIB storehouse, and in order to meet the need of market, urgent need will customize the electronic scale in Proprietary MIB storehouse.
[summary of the invention]
The invention provides the method that a kind of customization has the electronic scale in Proprietary MIB storehouse, it can obtain and revise the weighing apparatus intrinsic parameter and come into force by networking client, realizes the unified management to electronic scale information.The present invention almost includes the electronic scale information that might use by the comprehensive electronic scale Proprietary MIB of design storehouse, and is more convenient effectively from far-end unified operation electronic scale.
A kind of customization has the method for the electronic scale in Proprietary MIB storehouse, it is characterized in that comprising the steps:
Step 1, the Weighing module 2, key-press module 3, display module 4, communication module 5 that configuration is connected with controller module 1 in electronic scale and for network on the wireless network module 7 of WAP wireless connections, electronic scale in wireless network module 7, loads SNMP proxy module 71 and configures the parameter of SNMP proxy module 71, so that can support dynamically to load the Proprietary MIB storehouse;
Step 2, configuration is used for the Proprietary MIB storehouse 6 of store electrons weighing apparatus Proprietary MIB information in electronic scale;
This step comprised again for three steps:
A) the data parameters design Proprietary MIB storehouse that relates to according to electronic scale uses the ASN.1 standard format to write out the Proprietary MIB library file;
B) use SNMP proxy module 71 with the corresponding C code skeleton of Proprietary MIB file generated, improve according to demand again the C code, the Proprietary MIB library information editor of correspondence is advanced in the C file;
C) utilize gcc compiler in the controller module 1 with the C file generated SO dynamic library file after above-mentioned improve, again it is transplanted on the SNMP proxy module 71, and indicates its path, restart at last SNMP proxy module 71;
Step 3 is write the interface function of Proprietary MIB library information in the corresponding Proprietary MIB storehouse 6, can come into force in electronic scale immediately when the Proprietary MIB library information is changed by other clients.
2, a kind of customization according to claim 1 has the method for the electronic scale in Proprietary MIB storehouse, it is characterized in that, between step 1 and step 2, also carry out following steps, configure SNMP proxy modules 71 with the electronic scale starting up by key-press module 3.
Compared with prior art, beneficial effect of the present invention is as follows:
1, in electronic scale, configures the Proprietary MIB storehouse that is used for store electrons weighing apparatus Proprietary MIB information; Can change some information of electronic scale by the parameter that changes the Proprietary MIB storehouse, and it is come into force.
2, application is easy, by increase the SNMP proxy module in electronic scale, makes electronic scale become the SNMP node, sets up electronic scale based on the supervising the network of snmp protocol, has realized the unified management of food market electronic scale.
3, efficient is high, whenever necessary, as long as in the Proprietary MIB storehouse of server end remotely modifying electronic scale client, saves every electronic scale is carried out on-the-spot independent the modification the required time.
4, convenient management loads the operation conditions that tripartite webmastering software can be monitored electronic scale by server end, reads or arrange all data messages of electronic scale, prevents disorderly price behavior etc. of illegal retailer.
[description of drawings]
Fig. 1 is the structural drawing of electronic scale.
Fig. 2 is the structural drawing that electronic scale is connected with the snmp management server
Fig. 3 is process flow diagram of the present invention.
[embodiment]
Be described in further detail below in conjunction with accompanying drawing and embodiments of the present invention:
Fig. 1 is the structural drawing of electronic scale, electronic scale comprises controller module 1, controller module 1 be connected with Weighing module 2, key-press module 3, display module 4, communication module 5, Proprietary MIB storehouse 6 (management information bank) and be used for network on the wireless network module 7 of WAP wireless connections.The present invention is that the perfect Proprietary MIB storehouse of customization is embedded into the SNMP proxy module, and makes it to come into force by corresponding interface function.
Such as Fig. 2, just can easily access the Proprietary MIB storehouse of electronic scale customization by network management system, realize far-end operation.
Such as Fig. 3, method for customizing of the present invention comprises the steps:
Step 1 101, the Weighing module 2, key-press module 3, display module 4, communication module 5 that configuration is connected with controller module 1 in electronic scale and for network on the wireless network module 7 of WAP wireless connections, electronic scale in wireless network module 7, loads SNMP proxy module 71 and configures the parameter of SNMP proxy module 71, so that can support dynamically to load the Proprietary MIB storehouse;
The employed operating system of electronic scale is ARM linux, and after the SNMP proxy module loaded software, as long as electronic scale is connected to network, we can monitor this electronic scale by tripartite management software, and access its public MIB storehouse---RFC1213.Public MIB storehouse nodal information such as table 1:
The total MIB nodal information of table 1 part with and can supply mode of operation
This just partly has other nodal informations of MIB library information all is read-only or down state, we find that wherein sysDescr, sysObjectID and sysLocation are readable writing, the snmp software that we load is net-snmp-4.5, the packaged function of corresponding node information in the inside, as:
system_parse_config_string(token,cptr,"sysDescr",sysLocation,
sizeof(sysLocation),&sysLocationSet);
Be used for obtaining system's address;
if(sysLocationSet>0){
snprintf(line,SNMP_MAXBUF_SMALL,"psyslocation%s",sysLocation);
snmpd_store_config(line);
Be used for arranging system's address.
Here only sysDescr, sysObjectID and sysLocation there are the complete function that obtains and arrange, only obtain function or do not have respective function for all the other nodes.Thereby we can only change sysDescr, sysObjectID and these three nodal informations of sysLocation, and other nodal information can only read or at all not operation.Here the interface operation that does not have corresponding electronic scale can be considered as the weak point of public MIB.Yet we can and design corresponding access method by the customization Proprietary MIB and remedy, and concrete grammar provides below.
After step 1, also carry out following steps 102, configure SNMP proxy modules 71 with the electronic scale starting up by key-press module 3.
Step 2 103 is electronic scale customization Proprietary MIB storehouse.Its process can be divided into for three steps again:
A) consider the data parameters design Proprietary MIB storehouse that electronic scale may relate to, use the ASN.1 standard format to write out the Proprietary MIB library file;
B) use the MIB2c instrument of perl module support that the Proprietary MIB storehouse is generated corresponding C code skeleton, improve according to demand again the C code, the Proprietary MIB library information editor of correspondence is advanced in the C file; Perl is the abbreviation of Practical Extraction and Report Language, and the meaning is " practical form extraction language ", and the perl module refers to " interpreter module of program operation "; The MIB2c instrument is a kind of common tool, introduces no longer in detail.
C) utilize the gcc compiler with the C file after above-mentioned the improving, generate the SO dynamic library file such as " InternetOfThings.c ", again it is transplanted on the SNMP proxy module, and in bright its path of SNMPd.conf document, restart at last the SNMP service; A kind of common tool of gcc compiler is introduced no longer in detail.
Step 3 104 is write the interface function in corresponding Proprietary MIB storehouse, can come into force in electronic scale immediately when the Proprietary MIB library information is changed by other clients.We are take leaf node IPaddress as example, and its corresponding interface function is XS_IPaddress, are used for arranging the IP address of electronic scale.Improved in the code by the part of step 2-2 and can find that we have created the netconf.txt file and have come store leaf node IPaddress information under catalogue/usr/share/SNMP, when we obtained or arrange leaf node IPaddress information by tripartite webmastering software, IPaddress information all was again to deposit the netconf.txt file in after reading or be modified from the netconf.txt file.The XS_IPaddress function effect that we write is exactly IPaddress data in detecting netconf.txt, and the new value of IPaddress is set to the current IP address of electronic scale when these data change, and reaches the response of electronic scale with this.
The total MIB nodal information of table 2 part with and can supply mode of operation and interface function
This electronic scale in use, be connected with the snmp management server signal, in the snmp management server, load tripartite webmastering software, utilize tripartite webmastering software monitoring to scan the network topology of the electronic scale with SNMP agent functionality, can access the electronic scale Proprietary MIB storehouse with SNMP agent functionality, and can change some information of electronic scale by the parameter that changes the Proprietary MIB storehouse, and it is come into force.
After electronic scale accessed WLAN, it is loaded the Proprietary MIB storehouse also so that electronic scale becomes the SNMP node, can carry out the graphic interface monitoring to the SNMP node this moment by the snmp management server that loads tripartite webmastering software, understands the electronic scale current information.The most important thing is can be in network uses MIB storehouse browser access electronic scale among the WebNMS the Proprietary MIB storehouse, timely and conveniently to parameter value in the Proprietary MIB storehouse on the electronic scale with establish Value Operations.The present invention is by loading comprehensively customization Proprietary MIB library information to electronic scale, realized the operation of the data message that might relate to after the networking of electronic scale.
Claims (2)
1. a customization has the method for the electronic scale in Proprietary MIB storehouse, it is characterized in that comprising the steps:
Step 1, the Weighing module (2), key-press module (3), display module (4), communication module (5) that configuration is connected with controller module (1) in electronic scale and for network on the wireless network module (7) of WAP wireless connections, electronic scale in wireless network module (7), loads SNMP proxy module (71) and configures the parameter of SNMP proxy module (71), so that can support dynamically to load the Proprietary MIB storehouse;
Step 2, configuration is used for the Proprietary MIB storehouse (6) of store electrons weighing apparatus Proprietary MIB information in electronic scale;
This step comprised again for three steps:
A) the data parameters design Proprietary MIB storehouse that relates to according to electronic scale uses the ASN.1 standard format to write out the Proprietary MIB library file;
B) use SNMP proxy module (71) with the corresponding C code skeleton of Proprietary MIB file generated, improve according to demand again the C code, the Proprietary MIB library information editor of correspondence is advanced in the C file;
C) utilize gcc compiler in the controller module (1) with the C file generated SO dynamic library file after above-mentioned improve, it is transplanted on the SNMP proxy module (71) again, and indicates its path, restart at last SNMP proxy module (71);
Step 3 is write the interface function of Proprietary MIB library information in the corresponding Proprietary MIB storehouse (6), can come into force in electronic scale immediately when the Proprietary MIB library information is changed by other clients.
2. a kind of customization according to claim 1 has the method for the electronic scale in Proprietary MIB storehouse, it is characterized in that, between step 1 and step 2, also carry out following steps, configure SNMP proxy module (71) with the electronic scale starting up by key-press module (3).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210419577.7A CN102944296B (en) | 2012-10-27 | 2012-10-27 | Method of customizing electronic weighing apparatus with private MIB |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210419577.7A CN102944296B (en) | 2012-10-27 | 2012-10-27 | Method of customizing electronic weighing apparatus with private MIB |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102944296A true CN102944296A (en) | 2013-02-27 |
CN102944296B CN102944296B (en) | 2014-02-12 |
Family
ID=47727260
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210419577.7A Active CN102944296B (en) | 2012-10-27 | 2012-10-27 | Method of customizing electronic weighing apparatus with private MIB |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102944296B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080191012A1 (en) * | 2007-02-08 | 2008-08-14 | Premark Feg L.L.C. | Method for Tracking Food Product Using a Food Product Scale |
WO2008124277A1 (en) * | 2007-04-04 | 2008-10-16 | Mettler-Toledo, Inc. | Weighing apparatus and methods for process management |
CN101886946A (en) * | 2010-04-30 | 2010-11-17 | 福州欣创摩尔电子科技有限公司 | Intelligent tracing management electronic scale |
CN201897498U (en) * | 2010-08-31 | 2011-07-13 | 上海大华电子秤厂 | Electronic scale for RF (radio frequency) trace management |
-
2012
- 2012-10-27 CN CN201210419577.7A patent/CN102944296B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080191012A1 (en) * | 2007-02-08 | 2008-08-14 | Premark Feg L.L.C. | Method for Tracking Food Product Using a Food Product Scale |
WO2008124277A1 (en) * | 2007-04-04 | 2008-10-16 | Mettler-Toledo, Inc. | Weighing apparatus and methods for process management |
CN101886946A (en) * | 2010-04-30 | 2010-11-17 | 福州欣创摩尔电子科技有限公司 | Intelligent tracing management electronic scale |
CN201897498U (en) * | 2010-08-31 | 2011-07-13 | 上海大华电子秤厂 | Electronic scale for RF (radio frequency) trace management |
Also Published As
Publication number | Publication date |
---|---|
CN102944296B (en) | 2014-02-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11816465B2 (en) | Devices, systems and methods for tracking and upgrading firmware in intelligent electronic devices | |
CN106407076B (en) | Software and hardware operation information monitoring method based on domestic CPU and operating system environment | |
US20190251641A1 (en) | Systems and methods for collecting, analyzing, billing, and reporting data from intelligent electronic devices | |
CN108366067B (en) | System and method for testing consistency of universal service protocol of power system | |
CN102571396B (en) | Communication network system and routing inspection subsystem and routing inspection method of communication equipment | |
CN101651707B (en) | Method for automatically acquiring user behavior log of network | |
CN103530199B (en) | A kind of method, Apparatus and system repairing running software mistake | |
CN104135424B (en) | A kind of application message method for pushing, server, terminal and system | |
CN111343020A (en) | Unified management method and device for multi-protocol Internet of things equipment | |
CN105809942A (en) | Data processing method and device for electricity information collection system | |
US20240126538A1 (en) | Devices, systems and methods for tracking and upgrading firmware in intelligent electronic devices | |
CN112055062A (en) | Data communication method, device, equipment and readable storage medium | |
CN102014411A (en) | Method and system for acquiring radio measurement report | |
CN108132454A (en) | Electricity consumption monitoring method and device | |
CN104978203A (en) | Operation parameter loading method and device | |
CN102571424A (en) | Processing method, device and system for engineering event | |
CN102340791A (en) | A system and method for achieving data consistency | |
CN106646105A (en) | Data transmission method between main station and travelling wave range finding devices | |
CN109862555A (en) | User terminal A PN update method, server and user terminal | |
CN102944296B (en) | Method of customizing electronic weighing apparatus with private MIB | |
CN112769931A (en) | Service management platform | |
CN101895426B (en) | Data acquisition method and system in network resource evaluation | |
CN101938765B (en) | The method and system of a kind of webmaster and network element automatic adaptation | |
CN103634348A (en) | Terminal device and method for releasing information | |
CN108920328B (en) | Method and device for discovering terminal application change |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210112 Address after: 528403 BaiShaWan Industrial Park, east of qiwan Road, East District, Zhongshan City, Guangdong Province Patentee after: ZHONGSHAN CAMRY ELECTRONIC Co.,Ltd. Address before: 528400 BaiShaWan Industrial Park, east of qiwan Road, East District, Zhongshan City, Guangdong Province Patentee before: GUANGDONG SENSSUN WEIGHING APPARATUS Group Ltd. |