MHL 2011_02_09.pdf

Embed Size (px)

Citation preview

  • - .NET MHL Wrapper v.3- Backlight- Extension- Java Wrapper- Keyboard- MHL Base C/C++- PowerButton- RFID- Scanner- Utility- WLAN- WWAN

    Autogenerated at February 9th 2011

  • Nordic ID MHL Manual

    Table Of Contents

    MHL Basics ......................................................... 16MHL Block Diagram ................................................... 17MHL Basics continued ................................................ 18.NET MHL Wrapper v.3 ................................................ 25

    Close() ............................................................ 26

    Execute(string name) .................................................. 27

    GetBin(string name) ................................................... 28

    GetBin(string name, int length) ............................................ 30

    GetBinAsAsciiString(string name, string delim) ................................. 31

    GetBinAsHexString(string name, string delim) .................................. 32

    GetBool(string name) .................................................. 33

    GetDword(string name) ................................................. 34

    GetHandle() ........................................................ 35

    GetInt(string name) ................................................... 36

    GetLastError() ....................................................... 37

    GetLastErrorMessage() ................................................. 38

    GetName() ......................................................... 39

    GetString(string name) ................................................. 40

    IsOpen() ........................................................... 41

    LoadProfile(string name) ............................................... 42

    MHLDriver() ........................................................ 43

    MHLDriver(string drvName) .............................................. 44

    MHLDriver(string drvName, bool throwsException) .............................. 45

    MHLDriver.throwsException .............................................. 46

    Open(string name) .................................................... 47

    SaveProfile(string name) ................................................ 48

    SetBin(string name, byte[] val) ............................................ 49

    SetBool(string name, bool val) ............................................ 50

    SetDword(string name, int val) ............................................ 51

    SetDword(string name, uint val) ........................................... 52

    SetInt(string name, int val) ............................................... 53

    SetString(string name, string val) .......................................... 54

    Backlight ........................................................... 55Backlight.KbBlDimLevel

    ................................................ 56Backlight.KbBlFullLevel

    ................................................. 57Backlight.KbBlPower

    .................................................. 58Backlight.Power

    ...................................................... 59Backlight.StepValue

    ................................................... 60Backlight.Value

    ...................................................... 61Extension .......................................................... 62

    Extension.I2C.Address ................................................. 63

    Page 2 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Extension.I2C.ClockRate ................................................ 64

    Extension.I2C.Read ................................................... 65

    Extension.I2C.Write ................................................... 66

    Extension.Pin[X].Default ................................................ 67

    Extension.Pin[X].Drive ................................................. 68

    Extension.Pin[X].Edge ................................................. 69

    Extension.Pin[X].EvtName ............................................... 70

    Extension.Pin[X].Input ................................................. 71

    Extension.Pin[X].Pull .................................................. 72

    Extension.Pin[X].State ................................................. 73

    Java Wrapper ....................................................... 74CloseDrv(int handle);

    .................................................. 75Execute(int handle, String name);

    .......................................... 76GetBin(int handle, String name);

    ........................................... 77GetBool(int handle, String name);

    .......................................... 78GetDword(int handle, String name);

    ........................................ 79GetInt(int handle, String name);

    ........................................... 80GetString(int handle, String name);

    ......................................... 81GetStringLen(int handle, String name);

    ...................................... 82LoadProfile(int handle, String name);

    ........................................ 83OpenDrv(String drv)

    ................................................... 85SaveProfile(int handle, String name);

    ........................................ 87SetBin(int handle, String name, byte[] val);

    .................................... 90SetBool(int handle, String name, boolean val);

    ................................. 91SetDword(int handle, String name, int val);

    .................................... 92SetInt(int handle, String name, int val);

    ....................................... 93SetString(int handle, String name, String val);

    .................................. 94Keyboard ........................................................... 95

    Keyboard.FunctionState ................................................ 96

    Keyboard.InputMode .................................................. 97

    Keyboard.KeylockState ................................................. 98

    Keyboard.Reload ..................................................... 99

    Keyboard.ScanMode ................................................. 100

    Keyboard.SendVKDown ............................................... 101

    Keyboard.SendVKUp ................................................. 102

    Keyboard.StickyFunction.Enable ......................................... 103

    SpecialKey.Action[NN] ................................................ 104

    SpecialKey.[Key].[Modifier].Action ......................................... 105

    SpecialKey.[Key].[Modifier].Repeat ........................................ 107

    SpecialKey.[Key].[Modifier].VK ........................................... 108

    MHL Base C/C++ .................................................... 110MHL_CloseDrv(HANDLE handle)

    ......................................... 111MHL_DeleteProfile(HANDLE hDrv, const TCHAR *name)

    ......................... 112

    Page 3 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    MHL_Execute(HANDLE hDrv, const TCHAR *name) ............................ 113

    MHL_GetBin(HANDLE handle, const TCHAR *name, BYTE *buffer, DWORD buflen) ...... 114

    MHL_GetBool(HANDLE hDrv, const TCHAR *name) ............................ 115

    MHL_GetDouble(HANDLE hDrv, const TCHAR *name) .......................... 116

    MHL_GetDword(HANDLE hDrv, const TCHAR *name) .......................... 117

    MHL_GetFeatureCount(HANDLE handle) ................................... 118

    MHL_GetFeatureInfo(HANDLE handle, const TCHAR *name,MHL_VALUE_V2 *value) ..... 119

    MHL_GetFeatureInfoIdx(HANDLE handle, ULONG idx, MHL_VALUE_V2 *value, TCHAR *namebuf) .. 120

    MHL_GetInt(HANDLE hDrv, const TCHAR *name) ............................. 121

    MHL_GetString(HANDLE handle, const TCHAR *name, TCHAR *buffer, DWORD buflen) ... 122

    MHL_GetStringLen(HANDLE hDrv, const TCHAR *name) ........................ 124

    MHL_LoadProfile(HANDLE hDrv, const TCHAR *name) .......................... 125

    MHL_OpenDrv(const TCHAR *drv) ........................................ 126

    MHL_SaveProfile(HANDLE hDrv, const TCHAR *name) .......................... 127

    MHL_SetBin(HANDLE hDrv, const TCHAR *name, BYTE *bin_value, DWORD len) ....... 128

    MHL_SetBool(HANDLE hDrv, const TCHAR *name, BOOL bool_value) ............... 129

    MHL_SetDouble(HANDLE hDrv, const TCHAR *name, double double_value) ........... 130

    MHL_SetDword(HANDLE hDrv, const TCHAR *name, DWORD dw_value) ............. 131

    MHL_SetInt(HANDLE hDrv, const TCHAR *name, int int_value) ..................... 132

    MHL_SetString(HANDLE hDrv, const TCHAR *name, const TCHAR *str_value) .......... 133

    MHL_SetStringEx(HANDLE hDrv, const TCHAR *name, const TCHAR *str_value, int len) ... 134

    PowerButton ....................................................... 135PowerButton.Exec

    ................................................... 136PowerButton.VirtualKey

    ............................................... 137RFID ............................................................. 138

    Codes.GIAI.Enable [AS399X] ............................................ 139

    Codes.GIAI.EnableFiltering [AS399X] ...................................... 141

    Codes.GIAI.Filters ................................................... 142

    Codes.GRAI.Enable [AS399X] ........................................... 144

    Codes.GRAI.EnableFiltering ............................................ 146

    Codes.GRAI.Filters [AS399X] ........................................... 147

    Codes.SGLN.Enable [AS399X] .......................................... 149

    Codes.SGLN.EnableFiltering [AS399X] ..................................... 151

    Codes.SGLN.Filters [AS399X] ........................................... 152

    Codes.SGTIN.CheckDigit [AS399X] ....................................... 154

    Codes.SGTIN.Enable [AS399X] .......................................... 155

    Codes.SGTIN.EnableFiltering [AS399X] ..................................... 157

    Codes.SGTIN.Filters [AS399X] ........................................... 158

    Codes.SGTIN.ToGTIN14 [AS399X] ........................................ 160

    Codes.Splitter [AS399X] ............................................... 162

    Codes.SSCC.CheckDigit [AS399X] ........................................ 164

    Codes.SSCC.Enable [AS399X] .......................................... 165

    Codes.SSCC.EnableFiltering [AS399X] ..................................... 167

    Page 4 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Codes.SSCC.Filters [AS399X] ........................................... 168

    Codes.SSCC.ToSSCC18 [AS399X] ....................................... 170

    Decoder.Enabled [AS399X] ............................................. 172

    Decoder.Error [AS399X] ............................................... 173

    Decoder.PrependId [AS399X] ........................................... 175

    RFID.BinString [AS399X] .............................................. 176

    RFID.BLF ......................................................... 177

    RFID.BlockCount .................................................... 178

    RFID.BlockData ..................................................... 180

    RFID.BlockDataById [M5e-c] ............................................ 182

    RFID.BlockDataString [M5e-c] ........................................... 184

    RFID.BlockDataStringById [M5e-c] ........................................ 186

    RFID.BlockPointer ................................................... 188

    RFID.BytesOK [AS399X] ............................................... 190

    RFID.ChipId ....................................................... 191

    RFID.Clear ........................................................ 192

    RFID.CurrentId ..................................................... 193

    RFID.Decode [AS399X] ............................................... 195

    RFID.EPCC1G2.Bank ................................................ 197

    RFID.EPCC1G2.BlockErase [AS399X] ..................................... 199

    RFID.EPCC1G2.BlockWrite [AS399X] ...................................... 201

    RFID.EPCC1G2.Id ................................................... 203

    RFID.EPCC1G2.KillPassword [AS399X] .................................... 205

    RFID.EPCC1G2.KillTag ............................................... 206

    RFID.EPCC1G2.Lock ................................................. 208

    RFID.EPCC1G2.LockPayload ........................................... 212

    RFID.EPCC1G2.LongEPC [M5e-c] ........................................ 214

    RFID.EPCC1G2.Miller ................................................ 215

    RFID.EPCC1G2.Password ............................................. 216

    RFID.EPCC1G2.ProgramId [M5e-c] ....................................... 218

    RFID.EPCC1G2.PwdMem.Access.Open .................................... 220

    RFID.EPCC1G2.PwdMem.Access.Permalock ................................. 221

    RFID.EPCC1G2.PwdMem.Access.Permawrite ................................ 222

    RFID.EPCC1G2.PwdMem.Access.Secured .................................. 223

    RFID.EPCC1G2.PwdMem.Kill.Open ....................................... 224

    RFID.EPCC1G2.PwdMem.Kill.Permalock ................................... 225

    RFID.EPCC1G2.PwdMem.Kill.Permawrite ................................... 226

    RFID.EPCC1G2.PwdMem.Kill.Secured ..................................... 227

    RFID.EPCC1G2.Q [AS399X] ............................................ 228

    RFID.EPCC1G2.Q [M5e-c] ............................................. 229

    RFID.EPCC1G2.Read ................................................ 230

    RFID.EPCC1G2.Secured .............................................. 232

    RFID.EPCC1G2.Session ............................................... 234

    Page 5 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    RFID.EPCC1G2.Target [M5e-c] .......................................... 235

    RFID.EPCC1G2.TIDMemory.Open ........................................ 237

    RFID.EPCC1G2.TIDMemory.Permalock .................................... 238

    RFID.EPCC1G2.TIDMemory.Permawrite .................................... 239

    RFID.EPCC1G2.TIDMemory.Secured ...................................... 240

    RFID.EPCC1G2.UIIMemory.Open ........................................ 241

    RFID.EPCC1G2.UIIMemory.Permalock ..................................... 242

    RFID.EPCC1G2.UIIMemory.Permawrite .................................... 243

    RFID.EPCC1G2.UIIMemory.Secured ...................................... 244

    RFID.EPCC1G2.UserMemory.Open ....................................... 245

    RFID.EPCC1G2.UserMemory.Permalock .................................... 246

    RFID.EPCC1G2.UserMemory.Permawrite ................................... 247

    RFID.EPCC1G2.UserMemory.Secured ..................................... 248

    RFID.EPCC1G2.Write ................................................ 249

    RFID.Frequency .................................................... 251

    RFID.FWRelease [M5e-c] .............................................. 252

    RFID.IdList ........................................................ 253

    RFID.Inventory [AS399X] .............................................. 255

    RFID.Inventory [M5e-c] ................................................ 258

    RFID.InventorySelect [AS399X] .......................................... 260

    RFID.InventorySelect [M5e-c] ........................................... 262

    RFID.KillPassword ................................................... 264

    RFID.KillTag ....................................................... 265

    RFID.KillTagById .................................................... 267

    RFID.Meta.Frequency ................................................ 268

    RFID.Meta.PC ...................................................... 269

    RFID.Meta.RSSI .................................................... 270

    RFID.Meta.Time .................................................... 271

    RFID.MetaInventory .................................................. 272

    RFID.Module ....................................................... 274

    RFID.OperationId [M5e-c] .............................................. 275

    RFID.OperationIdString [M5e-c] .......................................... 277

    RFID.Polarization [AS399X] ............................................. 279

    RFID.Polarization [M5e-c] .............................................. 280

    RFID.PrASK ....................................................... 282

    RFID.Reset ........................................................ 283

    RFID.RFPower [AS399X] .............................................. 284

    RFID.RFPower [M5e-c] ................................................ 285

    RFID.RxDecoding [AS399X] ............................................ 286

    RFID.ScanAsync [AS399X] ............................................. 287

    RFID.ScanAsync [M5e-c] .............................................. 290

    RFID.ScanSingle [AS399X] ............................................. 292

    RFID.ScanSingle [M5e-c] .............................................. 294

    Page 6 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    RFID.ScanSingleString ................................................ 295

    RFID.SelectAddress .................................................. 296

    RFID.SelectBank .................................................... 297

    RFID.SelectInvert ................................................... 298

    RFID.SelectLength ................................................... 299

    RFID.SelectMask .................................................... 300

    RFID.Separator ..................................................... 301

    RFID.SerialString .................................................... 302

    RFID.SoundFailed [AS399X] ............................................ 303

    RFID.SoundFailed.Enable [AS399X] ....................................... 304

    RFID.SoundSuccess [AS399X] .......................................... 305

    RFID.SoundSuccess.Enable [AS399X] ..................................... 306

    RFID.StringData [M5e-c] ............................................... 307

    RFID.StringDataById [M5e-c] ............................................ 309

    RFID.Tag1 ........................................................ 311

    RFID.Tag10 ....................................................... 313

    RFID.Tag11 ....................................................... 315

    RFID.Tag12 ....................................................... 317

    RFID.Tag13 ....................................................... 319

    RFID.Tag14 ....................................................... 321

    RFID.Tag15 ....................................................... 323

    RFID.Tag16 ....................................................... 325

    RFID.Tag2 ........................................................ 327

    RFID.Tag3 ........................................................ 329

    RFID.Tag4 ........................................................ 331

    RFID.Tag5 ........................................................ 333

    RFID.Tag6 ........................................................ 335

    RFID.Tag7 ........................................................ 337

    RFID.Tag8 ........................................................ 339

    RFID.Tag9 ........................................................ 341

    RFID.TagsCount .................................................... 343

    RFID.TagType ..................................................... 344

    RFID.Timeout [M5e-c] ................................................ 345

    RFID.TxLevel [AS399X] ............................................... 347

    RFID.TxLevel [M5e-c] ................................................. 349

    RFID.VibFailed.Enable [AS399X] ......................................... 350

    RFID.VibFailed.Pattern [AS399X] ......................................... 351

    RFID.VibSuccess.Enable [AS399X] ....................................... 352

    RFID.VibSuccess.Pattern [AS399X] ....................................... 353

    Scanner.SoundFailed [AS399X] .......................................... 354

    Scanner.SoundFailed.Enable [AS399X] ..................................... 355

    Scanner.SoundSuccess [AS399X ] ........................................ 356

    Scanner.SoundSuccess.Enable [AS399X] ................................... 357

    Page 7 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Scanner.Timeout .................................................... 358

    Scanner.VibFailed.Enable [AS399X] ....................................... 359

    Scanner.VibFailed.Pattern [AS399X] ....................................... 360

    Scanner.VibSuccess.Enable [AS399X] ..................................... 361

    Scanner.VibSuccess.Pattern [AS399X] ..................................... 362

    Scanner ........................................................... 363Code.Auspost.Enable [Imager]

    .......................................... 364Code.Aztec.Enable [Imager]

    ............................................ 365Code.Aztec.MaxLength [Imager]

    ......................................... 366Code.Aztec.MesaCode128 [Imager]

    ....................................... 367Code.Aztec.MesaCode39 [Imager]

    ........................................ 368Code.Aztec.MesaCode93 [Imager]

    ........................................ 369Code.Aztec.MesaEAN13 [Imager]

    ........................................ 370Code.Aztec.MesaIL25 [Imager]

    .......................................... 371Code.Aztec.MesaUPCA [Imager]

    ......................................... 372Code.Aztec.MinLength [Imager]

    .......................................... 373Code.BooklandEAN.Enable [Laser]

    ....................................... 374Code.BPO.Enable [Imager]

    ............................................. 375Code.Canpost.Enable [Imager]

    .......................................... 376Code.Codabar.AnyLength [Laser]

    ........................................ 377Code.Codabar.CheckCharOn [Imager]

    ..................................... 378Code.Codabar.CLSIEditing [Laser]

    ........................................ 379Code.Codabar.Enable

    ................................................ 380Code.Codabar.MaxLength

    .............................................. 381Code.Codabar.MinLength

    .............................................. 382Code.Codabar.NOTISEditing [Laser]

    ...................................... 383Code.Codabar.SSXMit [Imager]

    .......................................... 384Code.Codabar.XmitCheckCharOn [Imager]

    .................................. 385Code.Codablock.Enable [Imager]

    ......................................... 386Code.Codablock.MaxLength [Imager]

    ...................................... 387Code.Codablock.MinLength [Imager]

    ...................................... 388Code.Code11.AnyLength [Laser]

    ......................................... 389Code.Code11.CheckDigits [Laser]

    ........................................ 390Code.Code11.Enable

    ................................................. 391Code.Code11.MaxLength

    .............................................. 392Code.Code11.MinLength

    ............................................... 393Code.Code11.ToCheckDigits [Imager]

    ..................................... 394Code.Code11.TransmitCheckDigits [Laser]

    .................................. 395Code.Code128.Enable

    ................................................ 396Code.Code128.MaxLength [Imager]

    ....................................... 397Code.Code128.MinLength [Imager]

    ....................................... 398Code.Code32.Enable [Imager]

    .......................................... 399Code.Code39.AnyLength [Laser]

    ......................................... 400

    Page 8 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Code.Code39.CheckDigit .............................................. 401

    Code.Code39.Code32Prefix [Laser] ....................................... 402

    Code.Code39.ConvertToCode32 [Laser] .................................... 403

    Code.Code39.Enable ................................................. 404

    Code.Code39.FullAscii ................................................ 405

    Code.Code39.MaxLength .............................................. 406

    Code.Code39.MinLength ............................................... 407

    Code.Code39.SSXmit [Imager] .......................................... 408

    Code.Code39.TransmitCheckDigits ........................................ 409

    Code.Code49.Enable [Imager] .......................................... 410

    Code.Code49.MaxLength [Imager] ........................................ 411

    Code.Code49.MinLength [Imager] ........................................ 412

    Code.Code93.AnyLength [Laser] ......................................... 413

    Code.Code93.Enable ................................................. 414

    Code.Code93.MaxLength .............................................. 415

    Code.Code93.MinLength ............................................... 416

    Code.Datamatrix.Enable [Imager] ........................................ 417

    Code.Datamatrix.MaxLength [Imager] ...................................... 418

    Code.Datamatrix.MinLength [Imager] ...................................... 419

    Code.Discrete25.AnyLength [Laser] ....................................... 420

    Code.Discrete25.Enable [Laser] ......................................... 421

    Code.Discrete25.MaxLength [Laser] ....................................... 422

    Code.Discrete25.MinLength [Laser] ....................................... 423

    Code.Dutchpost.Enable [Imager] ......................................... 424

    Code.EAN-13.Addenda2Digit [Imager] ..................................... 425

    Code.EAN-13.Addenda5Digit [Imager] ..................................... 426

    Code.EAN-13.AddendaOnly [Imager] ...................................... 427

    Code.EAN-13.AddendaSeparator [Imager] .................................. 428

    Code.EAN-13.DecodeSupplementals [Laser] ................................. 429

    Code.EAN-13.Enable ................................................. 431

    Code.EAN-13.SecurityLevel [Laser] ....................................... 432

    Code.EAN-13.SupplementalRedundancy [Laser] .............................. 434

    Code.EAN-13.XmitCheckChar [Imager] ..................................... 435

    Code.EAN-8.Addenda2Digit [Imager] ...................................... 436

    Code.EAN-8.Addenda5Digit [Imager] ...................................... 437

    Code.EAN-8.AddendaOnly [Imager] ....................................... 438

    Code.EAN-8.AddendaSeparator [Imager] ................................... 439

    Code.EAN-8.ConvertToEan13 [Laser] ..................................... 440

    Code.EAN-8.Enable .................................................. 441

    Code.EAN-8.SecurityLevel [Laser] ........................................ 442

    Code.EAN-8.XmitCheckChar [Imager] ..................................... 444

    Code.EAN-8.ZeroExtend [Laser] ......................................... 445

    Code.EAN-UCC.Enable [Imager] ......................................... 446

    Page 9 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Code.EAN-UCC.MaxLength [Imager] ...................................... 447

    Code.EAN-UCC.MinLength [Imager] ...................................... 448

    Code.EAN-UCC.UpcEanEnable [Imager] ................................... 449

    Code.IATA25.Enable [Imager] ........................................... 450

    Code.IATA25.MaxLength [Imager] ........................................ 451

    Code.IATA25.MinLength [Imager] ........................................ 452

    Code.Interleaved25.AnyLength [Laser] ..................................... 453

    Code.Interleaved25.CheckDigit .......................................... 454

    Code.Interleaved25.ConvertToEan13 [Laser] ................................. 455

    Code.Interleaved25.Enable ............................................. 456

    Code.Interleaved25.MaxLength .......................................... 457

    Code.Interleaved25.MinLength ........................................... 458

    Code.Interleaved25.TransmitCheckDigit .................................... 459

    Code.ISBT128.Enable ................................................ 460

    Code.Japost.Enable [Imager] ........................................... 461

    Code.Matrix2of5.Enable [Imager] ......................................... 462

    Code.Matrix2of5.MaxLength [Laser] ....................................... 463

    Code.Matrix2of5.MinLength [Imager] ...................................... 464

    Code.Maxicode.Enable [Imager] ......................................... 465

    Code.Maxicode.MaxLength [Imager] ...................................... 466

    Code.Maxicode.MinLength [Imager] ....................................... 467

    Code.MicroPDF.Enable [Imager] ......................................... 468

    Code.MicroPDF.MaxLength [Imager] ...................................... 469

    Code.MicroPDF.MinLength [Imager] ....................................... 470

    Code.MSI.AnyLength [Laser] ........................................... 471

    Code.MSI.CheckDigitAlgorithm [Laser] ..................................... 472

    Code.MSI.Enable .................................................... 473

    Code.MSI.MaxLength ................................................. 474

    Code.MSI.MinLength ................................................. 475

    Code.MSI.TransmitCheckDigit ........................................... 476

    Code.MSI.TwoCheckDigits [Laser] ........................................ 477

    Code.OCR.Enable [Imager] ............................................ 478

    Code.OCR.Font [Imager] .............................................. 479

    Code.OCR.Template [Imager] ........................................... 480

    Code.PDF417.Enable [Imager] .......................................... 481

    Code.PDF417.MaxLength [Imager] ....................................... 482

    Code.PDF417.MinLength [Imager] ........................................ 483

    Code.Planet.Enable [Imager] ........................................... 484

    Code.Planet.XmitCheckChar [Imager] ...................................... 485

    Code.Postnet.Enable [Imager] ........................................... 486

    Code.Postnet.XmitCheckChar [Imager] ..................................... 487

    Code.QR.Enable [Imager] .............................................. 488

    Code.QR.MaxLength [Imager] ........................................... 489

    Page 10 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Code.QR.MinLength [Imager] ........................................... 490

    Code.RSS.Enable [Imager] ............................................. 491

    Code.RSS.MaxLength [Imager] .......................................... 492

    Code.RSS.MinLength [Imager] .......................................... 493

    Code.RSS14.Enable [Laser] ............................................ 494

    Code.RSSExpanded.Enable [Laser] ....................................... 495

    Code.RSSLimited.Enable [Laser] ......................................... 496

    Code.Straight2of5.Enable [Imager] ........................................ 497

    Code.Straight2of5.MaxLength [Imager] ..................................... 498

    Code.Straight2of5.MinLength [Imager] ..................................... 499

    Code.TriopticCode39.Enable [Laser] ...................................... 500

    Code.UccEan128.Enable [Laser] ......................................... 501

    Code.UPC-A.Addenda2Digit [Imager] ...................................... 502

    Code.UPC-A.Addenda5Digit [Imager] ...................................... 503

    Code.UPC-A.AddendaOnly [Imager] ....................................... 504

    Code.UPC-A.AddendaSeparator [Imager] ................................... 505

    Code.UPC-A.Enable .................................................. 506

    Code.UPC-A.Preamble [Laser] .......................................... 507

    Code.UPC-A.SecurityLevel [Laser] ........................................ 508

    Code.UPC-A.Supplementals [Laser] ....................................... 510

    Code.UPC-A.TransmitCheckDigit ......................................... 512

    Code.UPC-A.XmitNumSys [Imager] ....................................... 513

    Code.UPC-E.Addenda2Digit [Imager] ...................................... 514

    Code.UPC-E.Addenda5Digit [Imager] ...................................... 515

    Code.UPC-E.AddendaOnly [Imager] ....................................... 516

    Code.UPC-E.AddendaSeparator [Imager] ................................... 517

    Code.UPC-E.EnableE0 [Imager] ......................................... 518

    Code.UPC-E.EnableE1 [Imager] ......................................... 519

    Code.UPC-E.ExpandVersionE [Imager] .................................... 520

    Code.UPC-E.XmitCheckChar [Imager] ..................................... 521

    Code.UPC-E.XmitNumSys [Imager] ....................................... 522

    Code.UPC-E0.ConvertToUPCA [Laser] ..................................... 523

    Code.UPC-E0.Enable [Laser] ........................................... 524

    Code.UPC-E0.Preamble [Laser] ......................................... 525

    Code.UPC-E0.SecurityLevel [Laser] ....................................... 526

    Code.UPC-E0.Supplementals [Laser] ...................................... 528

    Code.UPC-E0.TransmitCheckDigit [Laser] ................................... 530

    Code.UPC-E1.ConvertToUPCA [Laser] ..................................... 531

    Code.UPC-E1.Enable [Laser] ........................................... 532

    Code.UPC-E1.Preamble [Laser] ......................................... 533

    Code.UPC-E1.SecurityLevel [Laser] ....................................... 534

    Code.UPC-E1.Supplementals [Laser] ...................................... 536

    Code.UPC-E1.TransmitCheckDigit [Laser] ................................... 538

    Page 11 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Codes.Enable ...................................................... 539

    Scanner.Aim [Laser] .................................................. 540

    Scanner.AimsiMode .................................................. 541

    Scanner.BDRedundancy [Laser] .......................................... 542

    Scanner.CancelScan ................................................. 543

    Scanner.DecodeLimit [Imager] .......................................... 544

    Scanner.HHPID [Imager] .............................................. 545

    Scanner.Module .................................................... 547

    Scanner.OptimizeDecoder [Imager] ....................................... 548

    Scanner.Padding.Character ............................................. 550

    Scanner.Padding.Length ............................................... 551

    Scanner.Padding.Mode ................................................ 552

    Scanner.Postfix1 .................................................... 553

    Scanner.Postfix2 .................................................... 554

    Scanner.Prefix1 ..................................................... 555

    Scanner.Prefix2 ..................................................... 556

    Scanner.Replace.ReplaceChar .......................................... 557

    Scanner.Replace.Replacement .......................................... 558

    Scanner.Scan ...................................................... 559

    Scanner.ScanAIMSI .................................................. 560

    Scanner.ScanAsync .................................................. 561

    Scanner.ScanResultInfo ............................................... 562

    Scanner.ScanResultString .............................................. 563

    Scanner.ScanState .................................................. 564

    Scanner.SearchLimit [Imager] ........................................... 565

    Scanner.SecurityLevel [Laser] ........................................... 566

    Scanner.SoundFailed ................................................. 568

    Scanner.SoundFailed.Enable ............................................ 569

    Scanner.SoundSuccess ............................................... 570

    Scanner.SoundSuccess.Enable .......................................... 571

    Scanner.Timeout .................................................... 572

    Scanner.TriggerMode ................................................. 573

    Scanner.TrimEnd [Laser] .............................................. 574

    Scanner.TrimStart [Laser] .............................................. 575

    Scanner.VibFailed.Enable .............................................. 576

    Scanner.VibFailed.Pattern .............................................. 577

    Scanner.VibSuccess.Enable ............................................ 578

    Scanner.VibSuccess.Pattern ............................................ 579

    Scanner.VideoPreview.Enable [Imager] .................................... 580

    Scanner.VideoReverse.Enable [Imager] .................................... 581

    Utility ............................................................. 582HWInfo.ConfigString

    .................................................. 583HWInfo.CPUCoreString

    ............................................... 584

    Page 12 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    HWInfo.CPUVer .................................................... 585

    HWInfo.CPUVersionString .............................................. 586

    HWInfo.FlashSize ................................................... 587

    HWInfo.NIDItemCode ................................................. 588

    HWInfo.RamSize .................................................... 590

    HWInfo.SerialString .................................................. 591

    Utility.BatteryLevel ................................................... 592

    Utility.BootloaderItemCode ............................................. 593

    Utility.BootloaderVersion ............................................... 594

    Utility.ConnectionStatus ............................................... 595

    Utility.ConnectionType ................................................ 596

    Utility.IpAdrress ..................................................... 597

    Utility.MacAddress ................................................... 598

    Utility.NetworkAdapter ................................................ 599

    Utility.ProgrammableLed [Merlin] ......................................... 600

    Utility.ResetDevice ................................................... 601

    Utility.SignalStrength ................................................. 602

    Utility.SWItemCode .................................................. 603

    Utility.SWVersion .................................................... 604

    Utility.Temperature ................................................... 605

    WLAN ............................................................ 606WLAN.AdapterName

    ................................................. 607WLAN.Associated

    ................................................... 608WLAN.Connected

    ................................................... 609WLAN.Connected.BSSID

    .............................................. 610WLAN.Connected.SSID

    ............................................... 611WLAN.IpAddress

    .................................................... 612WLAN.MacAddress

    .................................................. 613WLAN.Power

    ...................................................... 614WLAN.SignalStrength

    ................................................. 615WLAN.SignalStrength.dBm

    ............................................. 616WWAN ............................................................ 617

    WWAN.APN ....................................................... 618

    WWAN.ATCmdCancel ................................................ 619

    WWAN.ATCmdSend ................................................. 620

    WWAN.ATCmdTimeout ............................................... 621

    WWAN.AutoConnect ................................................. 622

    WWAN.AutoEnterPin ................................................. 623

    WWAN.ChangePin ................................................... 624

    WWAN.Connect .................................................... 625

    WWAN.Connected ................................................... 626

    WWAN.ConnectionState ............................................... 627

    WWAN.CurrentNetwork ............................................... 628

    Page 13 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    WWAN.Disconnect ................................................... 629

    WWAN.DriverState .................................................. 630

    WWAN.DTMF.Play .................................................. 632

    WWAN.Enable ..................................................... 633

    WWAN.EnableDuringSleep ............................................. 634

    WWAN.Event.Count .................................................. 635

    WWAN.Event.Data ................................................... 636

    WWAN.Event.Name .................................................. 637

    WWAN.Event.Pop ................................................... 638

    WWAN.Event.TimeStamp .............................................. 648

    WWAN.Event.Type .................................................. 649

    WWAN.ICCID ...................................................... 650

    WWAN.IMEI ....................................................... 651

    WWAN.IMSI ....................................................... 652

    WWAN.LastCMEError ................................................ 653

    WWAN.Module ..................................................... 654

    WWAN.NetworkCode ................................................. 655

    WWAN.NetworkCount ................................................ 656

    WWAN.NetworkIndex ................................................. 657

    WWAN.NetworkName ................................................ 658

    WWAN.NetworkSelection .............................................. 659

    WWAN.Password ................................................... 660

    WWAN.Phone.Answer ................................................ 661

    WWAN.Phone.Call ................................................... 662

    WWAN.Phone.CallerNumber ............................................ 663

    WWAN.Phone.Hangup ................................................ 664

    WWAN.Phone.State .................................................. 665

    WWAN.PinCode .................................................... 667

    WWAN.PreferredService ............................................... 668

    WWAN.PrimaryDNS .................................................. 669

    WWAN.PukCode .................................................... 670

    WWAN.RequestPin .................................................. 671

    WWAN.ResumePin .................................................. 672

    WWAN.SearchNetworks ............................................... 673

    WWAN.SecondaryDNS ................................................ 674

    WWAN.ServiceStatus ................................................. 675

    WWAN.ServiceType .................................................. 676

    WWAN.SignalStrength ................................................ 677

    WWAN.SimLockRetries ............................................... 678

    WWAN.SimPinUsed .................................................. 679

    WWAN.SimPinUsed.SetPin ............................................. 680

    WWAN.SimState .................................................... 681

    WWAN.SMS.Count .................................................. 682

    Page 14 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    WWAN.SMS.Data ................................................... 683

    WWAN.SMS.DateTime ................................................ 684

    WWAN.SMS.GSM_3_38Alphabet ......................................... 685

    WWAN.SMS.InvalidChrPos ............................................. 686

    WWAN.SMS.IsValid7BitChr ............................................. 687

    WWAN.SMS.IsValid7BitStr ............................................. 688

    WWAN.SMS.Message ................................................ 689

    WWAN.SMS.Number ................................................. 690

    WWAN.SMS.NumberingPlan ............................................ 691

    WWAN.SMS.Pop .................................................... 692

    WWAN.SMS.RawPDU ................................................ 693

    WWAN.SMS.SC_Number .............................................. 694

    WWAN.SMS.SC_NumberingPlan ......................................... 695

    WWAN.SMS.SC_TypeOfNumber ......................................... 696

    WWAN.SMS.Send ................................................... 697

    WWAN.SMS.TypeOfNumber ............................................ 698

    WWAN.UseOperatorTime .............................................. 699

    WWAN.Username ................................................... 700

    WWAN.VerboseLogging ............................................... 701

    Error Code List ..................................................... 702Code Samples ...................................................... 704

    How to open and close an MHL Driver. - C++ ................................. 704

    How to open and close an MHL Driver. - C Sharp .............................. 704

    How to open and close an MHL Driver. - Visual Basic ............................ 704

    How to open and close an MHL Driver. - Java ................................. 704

    How to open and close an MHL driver in a Internet Explorer client side JScript. - VB/JScript .. 704

    Get/Set Backlight, Open/Close Driver - C .................................... 704

    Control the SCAN button & barcode scanner (multithreaded). - C Sharp .......... 705

    WLAN Driver IP, MAC & SSID query. - C Sharp ...................... 705

    How to search for networks with WWAN - C Sharp ............................. 708

    Commanding the WWAN driver to connect to the default network - C++ ............... 709

    Read the ID string of any RFID tags in the RF-field - C++ ......................... 709

    Checks that the WLAN adapter is connected and to which SSID. Also gets signal strength in dBmand percentage. - C++

    ........................ 710Using the I2C bus trough the Extension Feature Driver - C Sharp (MHL Wrapper v2)

    ....... 711

    Page 15 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Nordic ID Multiple Hardware Layers [MHL]MHL is a service running on Nordic ID handterminals that provides hardware control services toapplications. It's role is the same as Application Programming Interface (API) libraries in othermanufacturers devices. This help is intended for the Nordic ID Morphic and Merlinhandterminals from 2011 onwards. If you have a newer unit this help is likely useful, but for theolder PL3000 and PL2000 please refer to their manuals & support pages.

    How is it different from a typical API?It is a service, not a DLL. So when you read from and write to it, you are actually making servicecalls and talking to the device drivers. A typical API is a DLL which you link to at compile time.This has the disadvantage often called DLL hell, where updating or changing the DLL will breakyour software. If a function is missing in MHL it will always gracefully fail, with an error response,not by throwing a fatal exception. You don't actually need to do service calls explicitly, we havecreated mhl.h to make using MHL easier. It presents to you an API like interface that hides allthe service and driver calls. The only unusual bit you need to get used to is that actual functions are never called, youalways call function by their string name. You use functions like GetInt, GetBool and GetStringwith the name of the actual feature function as a parameter. This is a bit inefficient in terms ofspeed and clarity, but it means your program never crashes because of updates or changes tothe hardware or MHL drivers. The basic MHL functions themselves almost never change, and ifthey do it is to add a new one. So your program will always run in a newer version of a Nordic IDunit, provided you properly check the return values of the MHL functions. If you assume thathardware components exist, and do not check the return values it will be as error prone as anyother API.

    Page 16 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    MHL Block Diagram

    Page 17 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    What do I need?

    For .NET Compact Framework 2.0 (Visual Studio 2005 & 2008)You need the .NET wrapper class version 2.0 or 3.0. It is also recommended, but not mandatoryto install the SDK for Visual Studio 2005. If you have an SDK for another ARMV4i unit runningWindows CE 6.0 you can use that SDK. You can also target the Morphic with the Merlin SDKand vice versa. The universal Windows CE 5.0 SDK can also be used.Note that when you install the SDK and you only have VS2008 installed, you must deselect thehelp items in the installer. The installation will fail otherwise. If you have both VS2005 andVS2008 installed, you can install everything

    For .NET Compact Framework 3.5 (Visual Studio 2008)Compact Famework 3.5 is not present by default in Nordic ID's Windows CE 6.0 units, so youmust have the Customizer packet that contains CF3.5 installed in your unit. Other than that therequirements are the same as above.

    For native C/C++ applications (Visual Studio 2005 & 2008)You need to have the SDK installed so that the compiler correctly targets the ARMV4i WindowsCE 6.0 platform. Additionally you need mhl.h to use MHL. Since MHL is a service you do notneed any DLL files or libraries to link against.

    For Java applicationsYou need to have a Java Virtual Machine running on your unit. Nordic ID has some experiencewith both Creme and IBM J9, you can use either or any other JVM you manage to get running.Nordic ID has created an MHL wrapper class for Java using JNI that you can use in order to useMHL in your application.

    For Internet Explorer client side scriptingNordic ID has created a COM component that is registered to the browser by default. Thismeans you can make MHL calls in client side scripts running on Internet Explorer in the unit.Note that JScript does not do pointers so using GetBin and SetBin is not possible.

    MHL Downloads

    Page 18 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    SDKThese are intended for Visual Studio 2005, but you can install them with 2008 as long as youuncheck the documentation. If you have both VS2005 and VS2008, you should have noproblem installing the documentation as well.

    Morphic SDK

    Merlin SDK.NET Compact Framework MHL Wrapper with Demo CodeThese projects contain a Wrapper class that hides the ugly bits of calling native code. They alsocontain sample projects that demonstrate how to use MHL trough the wrapper class.

    MHL Wrapper v.2 for Visual Studio 2005Contains the wrapper class, demo projects, scan helper and a demo project for the scan helperclass.

    MHL Wrapper v.2 for Visual Studio 2008Contains the wrapper class and demo projects

    MHL Wrapper v.3 for Visual Studio 2005Contains a new wrapper class that encapsulates the MHL Handle, making it easier to use andprettier code. Also integrated are the ScanHelper, Win32 API Error Codes and Error CodeStrings. The file contains the same demo projects as in the v.2 wrapper project, but they havebeen changed to use this new wrapper.

    C/C++

    MHL HeaderHeader file for working with MHL. No .DLL or .LIB needed, these are service calls.

    Page 19 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    JAVA

    Java MHL wrapper

    MHL BasicsMHL functionality can be thought of as consisting of four parts: Get functions, Set functions,profile management and enumeration functions. The actual functions are documentedseparately for each language or environment because their signature is different depending onthe language used. Please see the MHL Base C/C++, .NET Wrapper, Java Wrapper or COMWrapper documentation depending on which environment you will be using.

    Get/Set FunctionsThese are the functions you use to actually query and command the MHL feature functions.There is one Get/Set function pair per data type supported by MHL. Data types currentlysupported are boolean, integer, unsigned integer (DWORD), string, 64 bit floating point (double)and byte blocks (GetBin/SetBin).

    Profile ManagementThe MHL Feature Drivers typically have functions whose setting can be stored in a profile. Notall features are stored in a profile. An example of a feature function that does not go in theprofile is Scanner.Scan. This function triggers barcode reading and therefore does not representa configurable setting. The function Scanner.TriggenMode is an example of a function whosesetting can be stored in a profile as it does not trigger a hardware function but instead cofigureshow the scanner should behave when triggered.The initial reason for creating profiles was to allow applications to take full control of the unit'skeyboard and barcode scanner when running, yet they should be able to easily restore thefactory default setup upon exiting. This is what the profiles are typically used for. When anapplication starts, the existing setup is stored in a temporary profile and any needed changes tothe current setup are made. When the application exits it loads the temporary profile, therebyrestoring the device to the state it was before the app started.

    Enumeration Functions

    These functions are typically not used by application programmers. They enumerate the driversand functions available in MHL itself, dynamically at runtime. The NID Scanner Control Panelapplet is an example of an application that uses these. It dynamically queries the scanner driverfor available barcode types and populates the barcode enable / disable list. The enumerationfunctions are only needed for this kind of use, and should not be needed at all by a typical

    Page 20 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    application. For this reason these functions are not implemented in the wrapper classes. Shouldyou need these functions it is fairly trivial to extend the wrapper projects yourself to includethem.

    MHL DatatypesStringThis data type is internally made up of 16-bit unsigned integers, all strings being null terminated(with the value 0x0000). The string format is the same as Windows CE uses, and usuallycontains UCS-2 Unicode strings. It is important to understand the difference between characterencoding and font. The encoding method used here (UCS-2) can represent all Unicodecharacters in existence. Since there are more than 65536 Unicode characters in existence, itmay take more than one 16-bit integer to encode one character. But they can all be encoded, sothe operating system will internally handle all character sets defined in Unicode.A completely different issue is whether you can see the character on the screen or not. That is aproblem of fonts, not character encoding. You must have a font file registered in the unit thatcontains a visual representation of the character to be shown in order to actually have acharacter drawn out. Nordic ID units typically contain all fonts needed in Europe, includingCyrillic. Typically absent because of the space they take are all middle and far eastern fonts,and Hebrew. These may be available as a Customizer packet, in which case you can get thefont installed even tough it is not part of the factory setup. Contact Nordic ID support for moreinformation.To summarize: The operating system and MHL understands all character encodings defined inUnicode (including far eastern, middle eastern and hebrew), but wheter it can display them ornot depends on if there are suitable fonts installed. String in .NET, Java & trough COM.The string data type is internally cast to a suitable format in the wrapper classes providedabove. For .NET this means the String class, which is not NULL terminated. The COMcomponent uses the same wide character null terminated string format as MHL, altough thedata type definition is a BSTR. In Java the String class is used to represent strings. NOTE: All lengths when dealing with the String data type are wide character lengths (16-bitunits), not byte lengths. The NULL character is not included in the lengths.

    Binary

    This data type is used to handle raw chunks of data, it is made up of unsigned bytes. The datamay have an internal structure depending on the MHL Feature function used, but MHL assumesit has none. It is treated as a chunk of data, and no modifying or error checking is done to it. It iscopied straight from the MHL Feature Driver to the user application memory buffers, or viceversa. In .NET the byte array data type is used to contain the data, as its internal representationis very close to actual raw bytes. The same goes for the Java wrapper. The COM component is

    Page 21 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    a special case. It was created to allow end users to use MHL in Internet Explorer client sidescripts. Those scripts (JScript and VBScript) do not support pointers, so there is no way toactually represent the data in those languages. For this reason the COM component does notcontain the GetBin and SetBin functions.

    DWORDThe name of this data type is historical at this point. The WORD data type used to mean thesize of the processors registers, when used in the C language compiler made for that processor.The double word was twice that size. Since the DWORD has for a very long time been a 32 bitunsigned interger, it has kind of solidified into always meaning a 32 bit unsigned integer. Soeven though most of todays processors are 64 bit (and correspondingly have a 64 bit word), theDWORD data type designates an unsigned 32 bit integer in most Windows programmingenvironments. This is also true for MHL. All the wrappers to other languages leave these valuesunchanged as there is a corresponding native type in those languages. .NET uses the uint,Java has the int and COM uses the long (int and long are signed, but the binary contentremains the same).

    IntegerThis data type is the same 32-bit size as the DWORD, but it is signed. In the .NET and Javawrappers, it is represented by the int datatype. In the COM wrapper, it is represented by thelong datatype.

    Boolean

    While this data type represents a true or false value and thus only has two states it is based onthe WIN32 API BOOL datatype. This in turn is a 32 bit unsigned integer. The MHL boolean isalso a 32 bit unsigned integer. It is defined so that zero means false and all other values meantrue. When setting the value using SetBool the input range is checked, and must be either zeroor one. Both .NET and Java have native boolean data types, these are used to represent theMHL boolean trough those wrappers. In COM the WIN32 API BOOL is used.

    Mandatory BitsThe information in this Document is subject to change. Nordic ID assumes no responsibilityregarding the information presented in this Guide.

    Copyright

    Page 22 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Nordic ID Oy owns all rights to this document. All rights reserved. Copying this documentwithout the written permission from the manufacturer by printing, copying, recording or by anyother means or the full or partial translation of the manual to any other language including allprogramming languages using any electrical, mechanical, magnetic, optical, manual or othermethods or devices is forbidden.Nordic ID reserves the right to change the technical specifications or functions of its products orto discontinue manufacturing of any of its products without any written announcement and urgescustomers to ensure that the information at their disposal is valid.

    Disclaimer

    Nordic ID products have not been designed, intended nor inspected to be used in any lifesupport related applications nor as a part of any other critical system and are not grantedfunctional warranty if used in any such applications.Nordic ID urges its customers to arrange proper and adequate user training, which includessafety issues for any personnel using, programming or otherwise handling Nordic ID products.

    Trademarks

    Nordic ID and the Nordic ID logo are registered trademarks of Nordic ID Oy.All terms mentioned in this document that are known to be trademarks or service marks havebeen appropriately marked in the list below with either the , or the symbol or started withcapital letter. Nordic ID cannot attest to the accuracy of this information. Use of a term in thisdocument should not be regarded as affecting the validity of any trademark or copyright.

    Page 23 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Page 24 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Morphic / Merlin MHL Drivers - 2.0Created 2010-04-10 11:56:19 by Viktor

    Change Log: First version entered into system

    .NET MHL Wrapper v.3 - 3.0Easier to use, more integrated MHL wrapper class for .NET.

    Page 25 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Boolean Close()

    TRUE / FALSE READ ONLY NOT stored in MHL Profile.Description:

    When you are done with a feature and driver you must call this function to free up resources. Ifyour application is likely to be run exclusively on the unit, it is recommendable that you openand close an MHL feature handle only once during the lifetime of the application. Do not makecode that opens and closes the feature rapidly and very often, it is extremely inefficient.

    Return Value:

    true on success, false on failure.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Page 26 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Boolean Execute(string name)

    TRUE / FALSE WRITE ONLY NOT stored in MHL Profile.Description:

    This function is used for MHL feature functions that are of the Executable type. They typicallytrigger some kind of process or function in hardware. Internally this call is the same as callingthe same function with SetBool with a true parameter.

    Function Input:

    name - The name of the feature to set.

    Return Value:

    true on success, false on failure.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20001 MHL_FEATURE_NOT_FOUND20003 MHL_NOT_WRITABLE20005 MHL_INVALID_TYPE20007 MHL_INVALID_HANDLE20010 MHL_FEATURE_NOTSUPP20011 MHL_FEATURE_NOTIMP

    Page 27 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Binary GetBin(string name)

    Min Bytes: 0 Max Bytes: 0 READ ONLY NOT stored in MHL Profile.Description:

    This function is used to read Binary value features. In MHL these are feature functions that takeor return raw byte data of a specified length. The byte array is used to handle this type of data inthis MHL .NET wrapper.

    This function first asks internally how large the binary data is that could be read, allocates anarray that big and then reads the data. Finally it returns the byte array to you. This kind ofbehavior is not always suitable, for instance when reading a specific amount of bytes from anSPI bus. For those cases, use the other variant of this function that takes a length parameter.

    Note that it is technically possible that this call sometimes fails with a \"Buffer too small\" errormessage. This can happen if the size of the data to read changes between the call to get itslength and the call to actually read the data. How likely this is to happen depends on thehardware component / software feature in question.

    Function Input:

    name - The name of the requested feature.

    Return Value:

    Binary array value for requested feature. Null on failure, if exceptions are not enabled.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20001 MHL_FEATURE_NOT_FOUND20005 MHL_INVALID_TYPE20007 MHL_INVALID_HANDLE20010 MHL_FEATURE_NOTSUPP20011 MHL_FEATURE_NOTIMP20015 MHL_ERROR_BUFFER_TOO_SMALL

    Page 28 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Page 29 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    String GetBin(string name, int length)

    Min Chars: 0 Max Chars: 0 READ ONLY NOT stored in MHL Profile.Description:

    This is a variant of the GetBin function that takes a length parameter in order to allow reading aspecific amount of bytes. In all other respects it works like the other GetBin function.

    Function Input:

    name - The name of the requested feature.

    length - The amount of data to read in bytes.

    Return Value:

    Binary array value for requested feature. Null on failure, if exceptions are not enabled.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20001 MHL_FEATURE_NOT_FOUND20005 MHL_INVALID_TYPE20007 MHL_INVALID_HANDLE20010 MHL_FEATURE_NOTSUPP20011 MHL_FEATURE_NOTIMP20015 MHL_ERROR_BUFFER_TOO_SMALL

    Page 30 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    String GetBinAsAsciiString(string name, string delim)

    Min Chars: 0 Max Chars: 0 READ ONLY NOT stored in MHL Profile.Description:

    This function is a convenience function implemented only in the .NET wrapper. Internally it callsGetBin. If you know the binary data you are reading is actually ascii text, you can use thisfunction to convert the GetBin output. This may be the case when reading from an RFID tagwhich contains data that is known to be in ascii format.

    Function Input:

    name - The name of the requested BINARY feature.delim - Deliminator character or characters, you do not need to use this and an empty string isok. The string you provide will be inserted beween every ascii character that is output.

    Return Value:

    String formatted as ASCII values for requested feature. Null on failure, if exceptions are notenabled.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20001 MHL_FEATURE_NOT_FOUND20002 MHL_NOT_READABLE20005 MHL_INVALID_TYPE20007 MHL_INVALID_HANDLE20010 MHL_FEATURE_NOTSUPP20011 MHL_FEATURE_NOTIMP20015 MHL_ERROR_BUFFER_TOO_SMALL

    Page 31 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    String GetBinAsHexString(string name, string delim)

    Min Chars: 0 Max Chars: 0 READ ONLY NOT stored in MHL Profile.Description:

    This function is made for convenience as part of the .NET wrapper, and internally it calls GetBin.It justs converts the output to a string of hexadecimal numbers. Each byte is represented by apair of characters (00 - FF).

    Function Input:

    name - The name of the binary function to read.delim - Delimeter character or characters between each printed byte. Sending a string with onespace character would format the output in this style: [11 22 33 AA BB CC]

    Return Value:

    String formatted as HEX values for requested feature. Null on failure, if exceptions are notenabled.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20001 MHL_FEATURE_NOT_FOUND20005 MHL_INVALID_TYPE20007 MHL_INVALID_HANDLE20010 MHL_FEATURE_NOTSUPP20011 MHL_FEATURE_NOTIMP20015 MHL_ERROR_BUFFER_TOO_SMALL

    Page 32 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Boolean GetBool(string name)

    TRUE / FALSE READ ONLY NOT stored in MHL Profile.Description:

    This function is used to read the value of MHL feature functions of BOOL type.

    Function Input:

    name - The name of the requested feature.

    Return Value:

    BOOL value for requested feature. Returns false on failure, use GetLastError() to verify errors ifexceptions are not enabled.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20001 MHL_FEATURE_NOT_FOUND20002 MHL_NOT_READABLE20005 MHL_INVALID_TYPE20007 MHL_INVALID_HANDLE20010 MHL_FEATURE_NOTSUPP20011 MHL_FEATURE_NOTIMP

    Page 33 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    DWORD GetDword(string name)

    Min Value: 0 Max Value: 0 READ ONLY NOT stored in MHL Profile.Description:

    This function is used to read the value of MHL feature functions of DWORD type. MHL Dwordsare 32 bit unsigned values.

    Function Input:

    name - The name of the requested feature.

    Return Value:

    DWORD value for requested feature. -1 on failure, if exceptions are not enabled.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20001 MHL_FEATURE_NOT_FOUND20002 MHL_NOT_READABLE20005 MHL_INVALID_TYPE20007 MHL_INVALID_HANDLE20010 MHL_FEATURE_NOTSUPP20011 MHL_FEATURE_NOTIMP

    Page 34 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Integer GetHandle()

    Min Value: 0 Max Value: 0 READ ONLY NOT stored in MHL Profile.Description:

    Get low-level driver handle to open driver.

    Return Value:

    Returns low-level handle to opened driver. If driver is not open, -1 is returned.

    Page 35 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Integer GetInt(string name)

    Min Value: 0 Max Value: 0 READ ONLY NOT stored in MHL Profile.Description:

    This function is used to read the value of MHL feature functions of INT type. MHL Integers are32 bit signed values.

    Function Input:

    name - The name of the requested feature.

    Return Value:

    INT value for requested feature. -1 on failure, if exceptions are not enabled.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20001 MHL_FEATURE_NOT_FOUND20002 MHL_NOT_READABLE20005 MHL_INVALID_TYPE20010 MHL_FEATURE_NOTSUPP20011 MHL_FEATURE_NOTIMP

    Page 36 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Integer GetLastError()

    Min Value: 0 Max Value: 0 READ / WRITE Stored in MHL Profile.Description:

    This function returns the code of the last WIN32 API Error or MHL error to occur. You can useGetLastErrorMessage to get a string explanation of the last error to occur.

    Page 37 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    String GetLastErrorMessage()

    Min Chars: 0 Max Chars: 0 READ ONLY NOT stored in MHL Profile.Description:

    This function returns the string explanation of the last WIN32 API Error or MHL error to occur.This same message is sent in any exceptions thrown if you enable MHLDriver exceptions(MHLDriver.throwsException = true).

    Page 38 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    String GetName()

    Min Chars: 0 Max Chars: 0 READ ONLY NOT stored in MHL Profile.Description:

    Get currently open driver name.

    Return Value:

    Returns name of the currently open driver in object instance. If driver is not open, empty string isreturned.

    Page 39 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    String GetString(string name)

    Min Chars: 0 Max Chars: 0 READ ONLY NOT stored in MHL Profile.Description:

    This function is used to read the value of MHL feature functions of String type.

    Function Input:

    name - The name of the requested feature.

    Return Value:

    String value for requested feature. Empty string on failure, if exceptions are not enabled.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20001 MHL_FEATURE_NOT_FOUND20002 MHL_NOT_READABLE20005 MHL_INVALID_TYPE20007 MHL_INVALID_HANDLE20010 MHL_FEATURE_NOTSUPP20011 MHL_FEATURE_NOTIMP20015 MHL_ERROR_BUFFER_TOO_SMALL

    Page 40 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Boolean IsOpen()

    TRUE / FALSE READ ONLY NOT stored in MHL Profile.Description:

    Get open state.

    Return Value:

    Returns true if driver is opened successfully.

    Page 41 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Boolean LoadProfile(string name)

    TRUE / FALSE READ ONLY NOT stored in MHL Profile.Description:

    This function is used to load a previously stored configuration of the loaded MHL driver. Theidea behind this is that you can store the existing setting when your application starts and thenradically alter the settings of the MHL driver to suit your needs. This may include capturing theScan button so that it sends a virtual key code your program can intercept instead ofautomatically triggering the scanner. Another typical use is to set up the barcode scannersparameters as you need them to be. Then when your program exits you can load the initialprofile and ensure that the device works as a factory default unit when your application is nolonger running. You can also use this function to restore factory default settings unless youhave previously overwritten the SystemDefault profile.

    Function Input:

    name - The name of the profile you wish to load. The name must have been used earlier withSaveProfile to store a profile or it must be the SystemDefault profile.

    Return Value:

    true on success, false on failure.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20007 MHL_INVALID_HANDLE20013 MHL_PROFILE_NOT_FOUND

    Page 42 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Constructor MHLDriver()

    WRITE ONLY NOT stored in MHL Profile.Description:

    Default class constructor. You must call Open to open a driver if you create the class with thisconstructor.

    Page 43 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    String MHLDriver(string drvName)

    Min Chars: 0 Max Chars: 0 WRITE ONLY NOT stored in MHL Profile.Description:

    Class constructor that opens the requested driver. This means the object (and underlying MHLdriver) is immediately available for use after the instance has been created.

    Function Input:

    name - Name of the MHL driver to open.

    Page 44 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    String MHLDriver(string drvName, boolthrowsException)

    Min Chars: 0 Max Chars: 0 WRITE ONLY NOT stored in MHL Profile.Description:

    Class constructor that opens the requested driver. This means the object (and underlying MHLdriver) is immediately available for use after the instance has been created. ThethrowsException parameter controls whether the class will throw exceptions when errors occur.You can use this to control how you want to check for errors. It is turned off by default whichmeans you need to call GetLastError to see if an error has occurred.

    Function Input:

    drvName - Name of the MHL driver to open.

    throwsException - Set to TRUE to have the class throw exceptions on error, set to FALSE touse WIN32 API style GetLastError calls for error checking.

    Page 45 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Boolean MHLDriver.throwsException

    TRUE / FALSE READ / WRITE NOT stored in MHL Profile.Description:

    This variable defines if object instance should throw exceptions on error.

    NOTE: Default is TRUE

    Page 46 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Boolean Open(string name)

    TRUE / FALSE READ ONLY NOT stored in MHL Profile.Description:

    This function opens an MHL feature driver for use. Call this function to select which MHL featuredriver you wish the object instance to use, if you have not already done so in the constructor.Once a MHL feature driver has been opened you can call the Get/Set functions to communicate/ command the driver. See the specific drivers documentation for information about availablefunctionality.

    Function Input:

    name - The name of the MHL driver to open.

    Return Value:

    true on success, false on failure.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Page 47 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Boolean SaveProfile(string name)

    TRUE / FALSE WRITE ONLY NOT stored in MHL Profile.Description:

    This function is used to store the current configuration of the loaded MHL driver to namedprofile. The idea behind this is that you can store the existing configuration when yourapplication starts and then radically alter the settings of the MHL driver to suit your needs. Thismay include capturing the Scan button so that it sends a virtual key code your program canintercept instead of automatically triggering the scanner. Another typical use is to set up thebarcode scanners parameters as you need them to be. Then when your program exits you canload the initial profile and ensure that the device works as a factory default unit when yourapplication is no longer running.

    Function Input:

    name - The name of the profile you wish to store. Use this same name with LoadProfile whenyou wish to load the previously stored profile. Use the name SystemDefault to override thesystems default configuration for this MHL driver.

    Return Value:

    true on success, false on failure.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20006 MHL_INVALID_ARGUMENT20007 MHL_INVALID_HANDLE

    Page 48 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Boolean SetBin(string name, byte[] val)

    TRUE / FALSE WRITE ONLY NOT stored in MHL Profile.Description:

    This function is used to write binary data to MHL features that are of binary type.

    Function Input:

    name - The name of the feature to set.val - byte array containing data to write, the entire array is always sent. Make sure the arrayslength matches the number of bytes you intend to write.

    Return Value:

    true on success, false on failure.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20001 MHL_FEATURE_NOT_FOUND20003 MHL_NOT_WRITABLE20005 MHL_INVALID_TYPE20007 MHL_INVALID_HANDLE20010 MHL_FEATURE_NOTSUPP20011 MHL_FEATURE_NOTIMP20014 MHL_ERROR_BUFFER_TOO_BIG20015 MHL_ERROR_BUFFER_TOO_SMALL

    Page 49 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Boolean SetBool(string name, bool val)

    TRUE / FALSE WRITE ONLY NOT stored in MHL Profile.Description:

    This function is used to write a boolean value to MHL features that are of boolean type.

    Function Input:

    name - The name of the feature to set.val - bool value to write.

    Return Value:

    true on success, false on failure.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20001 MHL_FEATURE_NOT_FOUND20003 MHL_NOT_WRITABLE20004 MHL_OUT_OF_RANGE20005 MHL_INVALID_TYPE20007 MHL_INVALID_HANDLE20010 MHL_FEATURE_NOTSUPP20011 MHL_FEATURE_NOTIMP

    Page 50 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Boolean SetDword(string name, int val)

    TRUE / FALSE WRITE ONLY NOT stored in MHL Profile.Description:

    This function is used to write a DWORD value to MHL features that are of DWORD type. TheDWORD data type is defined as a 32 bit unsigned integer in MHL.

    Function Input:

    name - The name of the feature to setval - INT value to set as DWORD

    Return Value:

    true on success, false on failure.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20006 MHL_INVALID_ARGUMENT20007 MHL_INVALID_HANDLE

    Page 51 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Boolean SetDword(string name, uint val)

    TRUE / FALSE WRITE ONLY NOT stored in MHL Profile.Description:

    This function is used to write a DWORD value to MHL features that are of DWORD type. TheDWORD data type is defined as a 32 bit unsigned integer in MHL.

    Function Input:

    name - The name of the feature to setval - DWORD value to set

    Return Value:

    true on success, false on failure.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20006 MHL_INVALID_ARGUMENT20007 MHL_INVALID_HANDLE

    Page 52 / 712Nordic IDInternational HeadquartersMyllyojankatu 2 A, 24100 Salo, Finland

  • Nordic ID MHL Manual

    Boolean SetInt(string name, int val)

    TRUE / FALSE WRITE ONLY NOT stored in MHL Profile.Description:

    This function is used to write a integer value to MHL features that are of integer type. The INTdata type is defined as a 32 bit signed integer in MHL.

    Function Input:

    name - The name of the feature to setval - Int value to set

    Return Value:

    true on success, false on failure.

    On failure, use GetLastError() ot GetLastErrorMessage() for more information.If exceptions are enabled (MHLDriver.throwsException = true), on failureSystem.ArgumentException exception is thrown with valid error message.

    Error Codes:0 ERROR_SUCCESS20001 MHL_FEATURE_NOT_FOUND20003 MHL_NOT_WRITABLE20004 MHL_OUT_OF_RANGE20005 MHL_INVALID_TYPE20007 MHL_INVALID_HANDLE20010 MHL_FEATURE_NOTSUPP20011 MHL_FEATURE_NOTIMP

    Page 53 / 712Nordic IDInternational HeadquartersMyllyojankatu