SlideShare a Scribd company logo
1 of 4
Thisis a program I wrote to simulate externalmeters(water,gas,heat,etc.) attachedtoan electric
meterviathe M-Bus protocol.The program ismine,fromconceptto final form.The onlycode thatis not
mine isa fewlinesregardingthe encryptionof datainthe M-Bus packets.I wrote thisbecause there was
no goodreadily-availablewaytotestthe M-Bus supportfor these smartmeters.
Thistool was developedtobe anautomatedaidto manual testingandas a tool for use by an automated
tcl-basedregressioninfrastructure.Itisalsocapable of performingextensive automatedtestsonits
own.Extensive logsare maintainednotonlyof everypacketsentorreceived(time,type,content,etc.)
but alsoof eventsthatoccurred duringtesting.Debuggingafailure andfilingabugreport wasusually
justa matterof examiningthe logfiles.
Thisis the mainpanel thatyou see whenstartingthisprogram, withsome featuresindicated.
If you clickon one of the fourdevice buttonsof the mainpanel,youget thisconfigurationpanel,below.
Note the abilitytoinjecterrorconditionsintopacketssenttothe meter,totestthe meter’shandlingof
those errors.I couldalsohave thisprogram droppowerto the meterwhenspecifiedconditionswere
metso that we couldtestrecoveryfrompoweroutagesat crucial times.
Since a tcl architecture wasused tomanage regressiontesting,Iaddedthe abilitytogenerate tcl code to
reproduce complex configurations,justclick,copy,andpaste.
From the device configurationyoucouldallow randomizedpacketpayloads,oryoucouldclickthe “DIF
VIFlist”buttonto specifyexactlywhatwastobe in the packetsof thisdevice. Thiswouldbringupthe
panel below.Explainingthatpanel wouldrequire detaileddiscussionof the M-Busprotocol,soI will let
it go unlessthere isaninterest.
Clickingonone of those buttonsbringsupthisconfigurationpanel forthatrow:
ThisM-Bus spoofingprogramplayedamajorrole in testinganddebuggingthe M-Busportof those
smart meters.The verificationof the new M-Busfeature inthe meters washandedtome because the
interface wasnewandhardware related,andIwas the onlytestengineerinthe groupthatunderstood
the hardware aspectsof M-Bus.I became the M-Bus expertinthe groupand later,othertestengineers
learnedtouse thisprogram fortheirwork.I alsosetup the hardware and software forthisprogram for
the developersof the meters FW,sothat theycouldduplicate the bugsIfoundand monitorthe effects
of theirchanges.These metersprobablyhave the mostbug-freeM-Businterface inexistence.

More Related Content

Similar to M-Bus Verification Tool

Abstract Thesis A. Rinaldi
Abstract Thesis A. RinaldiAbstract Thesis A. Rinaldi
Abstract Thesis A. Rinaldi
Arturo Rinaldi
 
Design and Implementation of High Resolution Data Acquisition System
Design and Implementation of High Resolution Data Acquisition SystemDesign and Implementation of High Resolution Data Acquisition System
Design and Implementation of High Resolution Data Acquisition System
ijsrd.com
 
04 intel v_tune_session_05
04 intel v_tune_session_0504 intel v_tune_session_05
04 intel v_tune_session_05
Vivek chan
 
HighLevelApplciationsForAccelerators_ShannonKrause_2009_07_31
HighLevelApplciationsForAccelerators_ShannonKrause_2009_07_31HighLevelApplciationsForAccelerators_ShannonKrause_2009_07_31
HighLevelApplciationsForAccelerators_ShannonKrause_2009_07_31
Shannon Krause
 

Similar to M-Bus Verification Tool (20)

Abstract Thesis A. Rinaldi
Abstract Thesis A. RinaldiAbstract Thesis A. Rinaldi
Abstract Thesis A. Rinaldi
 
IPlant_LEC
IPlant_LECIPlant_LEC
IPlant_LEC
 
PROGRAMSc
PROGRAMScPROGRAMSc
PROGRAMSc
 
Annunciator for Hazard Prevention & Temperature Control
Annunciator for Hazard Prevention & Temperature ControlAnnunciator for Hazard Prevention & Temperature Control
Annunciator for Hazard Prevention & Temperature Control
 
Current System
Current SystemCurrent System
Current System
 
Software and Hardware Tools for Microprocessors
Software and Hardware Tools for MicroprocessorsSoftware and Hardware Tools for Microprocessors
Software and Hardware Tools for Microprocessors
 
Mp &mc programs
Mp &mc programsMp &mc programs
Mp &mc programs
 
Design and Implementation of High Resolution Data Acquisition System
Design and Implementation of High Resolution Data Acquisition SystemDesign and Implementation of High Resolution Data Acquisition System
Design and Implementation of High Resolution Data Acquisition System
 
04 intel v_tune_session_05
04 intel v_tune_session_0504 intel v_tune_session_05
04 intel v_tune_session_05
 
Fuzz
FuzzFuzz
Fuzz
 
Chapter 1.pptx
Chapter 1.pptxChapter 1.pptx
Chapter 1.pptx
 
Debug Console Monitor
Debug Console MonitorDebug Console Monitor
Debug Console Monitor
 
++Matlab 14 sesiones
++Matlab 14 sesiones++Matlab 14 sesiones
++Matlab 14 sesiones
 
CapMonPosterweb
CapMonPosterwebCapMonPosterweb
CapMonPosterweb
 
Lorenzo 1210 features
Lorenzo 1210   featuresLorenzo 1210   features
Lorenzo 1210 features
 
finalpaper.doc
finalpaper.docfinalpaper.doc
finalpaper.doc
 
LOW COST SCADA SYSTEM FOR EDUCATION
LOW COST SCADA SYSTEM FOR EDUCATIONLOW COST SCADA SYSTEM FOR EDUCATION
LOW COST SCADA SYSTEM FOR EDUCATION
 
HighLevelApplciationsForAccelerators_ShannonKrause_2009_07_31
HighLevelApplciationsForAccelerators_ShannonKrause_2009_07_31HighLevelApplciationsForAccelerators_ShannonKrause_2009_07_31
HighLevelApplciationsForAccelerators_ShannonKrause_2009_07_31
 
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
 
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
Control of Industrial Pneumatic & Hydraulic Systems using Serial Communicatio...
 

M-Bus Verification Tool

  • 1. Thisis a program I wrote to simulate externalmeters(water,gas,heat,etc.) attachedtoan electric meterviathe M-Bus protocol.The program ismine,fromconceptto final form.The onlycode thatis not mine isa fewlinesregardingthe encryptionof datainthe M-Bus packets.I wrote thisbecause there was no goodreadily-availablewaytotestthe M-Bus supportfor these smartmeters. Thistool was developedtobe anautomatedaidto manual testingandas a tool for use by an automated tcl-basedregressioninfrastructure.Itisalsocapable of performingextensive automatedtestsonits own.Extensive logsare maintainednotonlyof everypacketsentorreceived(time,type,content,etc.) but alsoof eventsthatoccurred duringtesting.Debuggingafailure andfilingabugreport wasusually justa matterof examiningthe logfiles. Thisis the mainpanel thatyou see whenstartingthisprogram, withsome featuresindicated. If you clickon one of the fourdevice buttonsof the mainpanel,youget thisconfigurationpanel,below. Note the abilitytoinjecterrorconditionsintopacketssenttothe meter,totestthe meter’shandlingof those errors.I couldalsohave thisprogram droppowerto the meterwhenspecifiedconditionswere metso that we couldtestrecoveryfrompoweroutagesat crucial times.
  • 2. Since a tcl architecture wasused tomanage regressiontesting,Iaddedthe abilitytogenerate tcl code to reproduce complex configurations,justclick,copy,andpaste. From the device configurationyoucouldallow randomizedpacketpayloads,oryoucouldclickthe “DIF VIFlist”buttonto specifyexactlywhatwastobe in the packetsof thisdevice. Thiswouldbringupthe panel below.Explainingthatpanel wouldrequire detaileddiscussionof the M-Busprotocol,soI will let it go unlessthere isaninterest.
  • 3. Clickingonone of those buttonsbringsupthisconfigurationpanel forthatrow:
  • 4. ThisM-Bus spoofingprogramplayedamajorrole in testinganddebuggingthe M-Busportof those smart meters.The verificationof the new M-Busfeature inthe meters washandedtome because the interface wasnewandhardware related,andIwas the onlytestengineerinthe groupthatunderstood the hardware aspectsof M-Bus.I became the M-Bus expertinthe groupand later,othertestengineers learnedtouse thisprogram fortheirwork.I alsosetup the hardware and software forthisprogram for the developersof the meters FW,sothat theycouldduplicate the bugsIfoundand monitorthe effects of theirchanges.These metersprobablyhave the mostbug-freeM-Businterface inexistence.