CN102944296B - Method of customizing electronic weighing apparatus with private MIB - Google Patents

Method of customizing electronic weighing apparatus with private MIB Download PDF

Info

Publication number
CN102944296B
CN102944296B CN201210419577.7A CN201210419577A CN102944296B CN 102944296 B CN102944296 B CN 102944296B CN 201210419577 A CN201210419577 A CN 201210419577A CN 102944296 B CN102944296 B CN 102944296B
Authority
CN
China
Prior art keywords
module
electronic scale
proprietary mib
information
private mib
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.)
Active
Application number
CN201210419577.7A
Other languages
Chinese (zh)
Other versions
CN102944296A (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.)
Zhongshan Camry Electronic Co Ltd
Original Assignee
GUANGDONG XIANGSHAN WEIGHING APPARATUS GROUP 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 GUANGDONG XIANGSHAN WEIGHING APPARATUS GROUP Ltd filed Critical GUANGDONG XIANGSHAN WEIGHING APPARATUS GROUP Ltd
Priority to CN201210419577.7A priority Critical patent/CN102944296B/en
Publication of CN102944296A publication Critical patent/CN102944296A/en
Application granted granted Critical
Publication of CN102944296B publication Critical patent/CN102944296B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

A kind of customization has the method for the electronic scale in Proprietary MIB storehouse
[technical field]
The present invention relates to a kind of method that customization has the electronic scale in Proprietary MIB storehouse, consider the required all essential information designs Proprietary MIB storehouse of using of electronic scale, be embedded in electronic scale and write corresponding function operation, so that just can direct managing electronic weighing apparatus by networking client.
[background technology]
As far back as 2002 Nian, EU Committees, put into effect ECNo178/2002 rules, required from 2005, every food of selling in European Union member countries must possess can tracing function, otherwise does not allow list marketing, does not possess the food import prohibition of trackability.In recent years, China is for promoting that food security can 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 in accordance with the law and check, perfect agricultural product sign and traceable system, boost exports agricultural product quality is reviewed System Construction.Thus, 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, transmit, 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 can pass through inquiry terminal machine, internet, SMS or dial the mode of hot line, 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 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 a kind of method that customization has the electronic scale in Proprietary MIB storehouse, it can be obtained and revise weighing apparatus intrinsic parameter and be come into force by networking client, realizes the unified management to electronic scale information.The present invention, by design comprehensive electronic scale Proprietary MIB storehouse, almost includes the electronic scale information likely using, more convenient effectively from far-end unified operation electronic scale.
A method with the electronic scale in Proprietary MIB storehouse, 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, in wireless network module 7, load SNMP proxy module 71 and configure the parameter of SNMP proxy module 71, make electronic scale can support dynamically to load Proprietary MIB storehouse;
Step 2 is configured for the Proprietary MIB storehouse 6 of store electrons weighing apparatus Proprietary MIB information in electronic scale;
This step comprises again three steps:
A) the data parameters design Proprietary MIB storehouse relating to according to electronic scale, is used ASN.1 standard format to write out Proprietary MIB library file;
B) use SNMP proxy module 71 by the corresponding C code skeleton of Proprietary MIB file generated, then improve according to demand C code, corresponding Proprietary MIB library information editor is entered in C file;
C) utilize the gcc compiler in controller module 1 to improve C file generated SO dynamic library file afterwards by above-mentioned, then SO dynamic library file is transplanted on SNMP proxy module 71, and indicate SO dynamic library file path, finally restart SNMP proxy module 71;
Step 3, writes the interface function of Proprietary MIB library information in corresponding Proprietary MIB storehouse 6, when Proprietary MIB library information is changed by other clients, can in electronic scale, come into force immediately.
Between step 1 and step 2, also carry out following steps, by key-press module 3, configure SNMP proxy modules 71 with electronic scale starting up.
Compared with prior art, beneficial effect of the present invention is as follows:
1, in electronic scale, be configured for the Proprietary MIB storehouse of store electrons weighing apparatus Proprietary MIB information; Can change some information of electronic scale by changing the parameter in Proprietary MIB storehouse, and it is come into force.
2, apply easyly, by increase SNMP proxy module in electronic scale, make electronic scale become SNMP node, set up the supervising the network of electronic scale based on snmp protocol, realized the unified management of food market electronic scale.
3, efficiency 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 to on-the-spot independent modification the required time.
4, convenient management, loads by server end the operation conditions that tripartite's webmastering software can be monitored electronic scale, reads or arrange all data messages of electronic scale, prevents disorderly price behavior etc. of illegal retailer.
[accompanying drawing explanation]
Fig. 1 is the structural drawing of electronic scale.
Fig. 2 is the structural drawing that electronic scale is connected with snmp management server
Fig. 3 is process flow diagram of the present invention.
[embodiment]
Below in conjunction with accompanying drawing and embodiments of the present invention, be described in further detail:
Fig. 1 is the structural drawing of electronic scale, electronic scale comprises controller module 1, on 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 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 SNMP proxy module, and makes it to come into force by corresponding interface function.
As Fig. 2, just can easily access the Proprietary MIB storehouse of electronic scale customization by network management system, realize far-end operation.
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, in wireless network module 7, load SNMP proxy module 71 and configure the parameter of SNMP proxy module 71, make electronic scale can support dynamically to load Proprietary MIB storehouse;
The operating system that electronic scale uses is ARMlinux, and after SNMP proxy module loads software, as long as electronic scale is connected to network, we can monitor this electronic scale by tripartite's management software, and access its public MIB storehouse---RFC1213.Public MIB storehouse nodal information is as table 1:
Figure GDA0000369607630000041
Figure GDA0000369607630000051
Figure GDA0000369607630000061
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 is all 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 address;
if(sysLocationSet>0){
snprintf(line,SNMP_MAXBUF_SMALL,"psyslocation%s",sysLocation);
snmpd_store_config(line);
Be used for arranging system address.
Here only sysDescr, sysObjectID and sysLocation are had to the complete function that obtains and arrange, for all the other nodes, only obtain function or there is no respective function.Thereby we can only change sysDescr, sysObjectID and these three nodal informations of sysLocation, other nodal information can only read or not operation at all.Here there is not the interface operation of corresponding electronic scale, can be considered as the weak point of public MIB.Yet we can and design corresponding access method by customization Proprietary MIB and make up, and concrete grammar provides below.
After step 1, also carry out following steps 102, by key-press module 3, configure SNMP proxy modules 71 with electronic scale starting up.
Step 2 103 is electronic scale customization Proprietary MIB storehouse.Its process can be divided into three steps again:
A) consider the data parameters design Proprietary MIB storehouse that electronic scale may relate to, use ASN.1 standard format to write out Proprietary MIB library file;
B) use the MIB2c instrument of perl module support that Proprietary MIB storehouse is generated to corresponding C code skeleton, then improve according to demand C code, corresponding Proprietary MIB library information editor is entered in C file; Perl is the abbreviation of PracticalExtractionandReportLanguage, and the meaning is " practical form extraction language ", and perl module refers to " interpreter module of program operation "; MIB2c instrument is a kind of common tool, introduces no longer in detail.
C) utilize gcc compiler by the C file after above-mentioned improving, as " InternetOfThings.c " generates SO dynamic library file, again SO dynamic library file is transplanted on SNMP proxy module, and in the bright SO dynamic library file of SNMPd.conf document path, is finally restarted SNMP service; A kind of common tool of gcc compiler, introduces no longer in detail.
Step 3 104, writes the interface function in corresponding Proprietary MIB storehouse, when Proprietary MIB library information is changed by other clients, can in electronic scale, come into force immediately.We take leaf node IPaddress as example, and its corresponding interface function is XS_IPaddress, are used for arranging the IP address of electronic scale.By the part of step 2-2, improve in code and can find that we have created netconf.txt file and have carried out store leaf node IPaddress information under catalogue/usr/share/SNMP, when we obtain or arrange leaf node IPaddress information by tripartite's webmastering software, IPaddress information is all again to deposit netconf.txt file in after reading or be modified from netconf.txt file.The XS_IPaddress function effect that we write is exactly IPaddress data in detecting netconf.txt, and when these data change, the new value of IPaddress is set to the current IP address of electronic scale, with this, reaches the response of electronic scale.
Figure GDA0000369607630000081
Figure GDA0000369607630000091
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 snmp management server signal, in snmp management server, load tripartite's webmastering software, utilize the monitoring of tripartite's webmastering software 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 changing the parameter in Proprietary MIB storehouse, and it is come into force.
Electronic scale is accessed after WLAN, it is loaded Proprietary MIB storehouse and makes electronic scale become SNMP node, now can to SNMP node, carry out graphic interface monitoring by loading the snmp management server of tripartite's webmastering software, understand electronic scale current information.The most important thing is on network, to use the Proprietary MIB storehouse in the MIB storehouse browser access electronic scale in WebNMS, timely and conveniently to parameter value in Proprietary MIB storehouse on electronic scale with establish Value Operations.The present invention, by electronic scale being loaded to comprehensively customization Proprietary MIB library information, has realized the operation of the data message likely relating to after the networking of electronic scale.

Claims (2)

1. customization has a 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, in wireless network module (7), load SNMP proxy module (71) and configure the parameter of SNMP proxy module (71), make electronic scale can support dynamically to load Proprietary MIB storehouse;
Step 2 is configured for the Proprietary MIB storehouse (6) of store electrons weighing apparatus Proprietary MIB information in electronic scale;
This step comprises again three steps:
A) the data parameters design Proprietary MIB storehouse relating to according to electronic scale, is used ASN.1 standard format to write out Proprietary MIB library file;
B) use SNMP proxy module (71) by the corresponding C code skeleton of Proprietary MIB file generated, then improve according to demand C code, corresponding Proprietary MIB library information editor is entered in C file;
C) utilize gcc compiler in controller module (1) by the C file generated SO dynamic library file after above-mentioned improving; SO dynamic library file is transplanted on SNMP proxy module (71) again; and indicate SO dynamic library file path, finally restart SNMP proxy module (71);
Step 3, writes the interface function of Proprietary MIB library information in corresponding Proprietary MIB storehouse (6), when Proprietary MIB library information is changed by other clients, can in electronic scale, come into force immediately.
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, by key-press module (3), configure SNMP proxy module (71) with electronic scale starting up.
CN201210419577.7A 2012-10-27 2012-10-27 Method of customizing electronic weighing apparatus with private MIB Active CN102944296B (en)

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 CN102944296A (en) 2013-02-27
CN102944296B true 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)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
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
US7875813B2 (en) * 2007-04-04 2011-01-25 Mettler-Toledo, Inc. Programmable weighing scale that tracks completion time for a process step for multiple concurrent processes
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
CN102944296A (en) 2013-02-27

Similar Documents

Publication Publication Date Title
US11816465B2 (en) Devices, systems and methods for tracking and upgrading firmware in intelligent electronic devices
CN101651707B (en) Method for automatically acquiring user behavior log of network
US20190251641A1 (en) Systems and methods for collecting, analyzing, billing, and reporting data from intelligent electronic devices
CN104301406B (en) Mobile job-oriented terminal platform and cut-in method based on marketing system and acquisition system
CN103530199B (en) A kind of method, Apparatus and system repairing running software mistake
CN106407076B (en) Software and hardware operation information monitoring method based on domestic CPU and operating system environment
CN103117879B (en) A kind of computer hardware operational factor network monitoring system
CN104135424B (en) A kind of application message method for pushing, server, terminal and system
CN102469117B (en) Method and device for identifying abnormal access action
KR20180038539A (en) A method and system for implementing data tracking with a software development kit
CN103095819A (en) Data information pushing method and data information pushing system
CN104834582B (en) A kind of monitor event methods of exhibiting
CN109726128A (en) A kind of method for generating test case, device and server
CN102739428B (en) Method and device for data acquisition, and system
CN106407059A (en) Server node testing system and method
CN113553310A (en) Data acquisition method and device, storage medium and electronic equipment
CN106646105A (en) Data transmission method between main station and travelling wave range finding devices
CN106651650A (en) Joint debugging measurement and control device and electric power Internet of things joint debugging measurement and control system applying same
CN104978203A (en) Operation parameter loading method and device
CN102944296B (en) Method of customizing electronic weighing apparatus with private MIB
CN104967667A (en) Software stability test remote monitoring system based on cloud service
CN112769931A (en) Service management platform
CN102469450B (en) Method and device for recognizing virus characteristics of mobile phone
CN103634348A (en) Terminal device and method for releasing information
CN107274651A (en) The acquisition method of business electrical information is monitored based on ODP agreements Demand-Oriented

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.