Scanner set up using the SDK

Scanner set up using the SDK

This question is answered

I am using the SDK for the first time and am creating some software using VB and Visual Studio 2008 professional. I want to use the SDK to set up some of the scanner parameters, the scanner is an internal pod scanner - EV15 I believe. I have the SDK installed and am have set up some test software to get and set some of the properties. This appears to be functioning correctly. The device is a WAP3 running Win CE 5.

There are two things I would like to do and I cannot see how to do them:

1. Set all scanner parameters to default.

2. Add the AIM ID prefix to scanned data. As available in Scanner settings, Advanced options on the control panel.

I can find no way of doing either of these in the documentation.

Is it possible to do this via the SDK and if so how?

 

Many thanks.

Verified Answer
  • Sorry about that.

    This should work:

    SetProperty("ICSP\Add AIM ID prefix", 2)  to enable

    SetProperty("ICSP\Add AIM ID prefix", 1) to disable

  • Richard,

    My bad Embarrassed
    I erroneously thought that the parameter is a boolean.

    Sensing and setting the EV15 AIM ID prefix parameter can be done as follows

    Imports PsionTeklogix.Barcode.ScannerServices

    Public Class Form1

        Dim bAimIsEnabled As Boolean = False
        Dim moScannerServicesDriver As ScannerServicesDriver = _
        New ScannerServicesDriver

    [...]

            Try
                If (CInt(moScannerServicesDriver.GetProperty( _
                    "ICSP\Add AIM ID prefix")) = 2) Then

                    bAimIsEnabled = True
                End If
            Catch ex As Exception
                MessageBox.Show("GetProperty() failed with " _
                                & ex.Message)

                Me.Close()
                Return
            End Try

    [...]

            Try
                If (bAimIsEnabled) Then
                    moScannerServicesDriver.SetProperty( _
                    "ICSP\Add AIM ID prefix", 2) 'Transmit AIM ID
                Else
                    moScannerServicesDriver.SetProperty( _
                    "ICSP\Add AIM ID prefix", 1) 'DO NOT transmit AIM ID
                End If
            Catch ex As Exception
                MessageBox.Show("SetProperty() failed with " _
                                &
    ex.Message)
                Me.Close()
                Return
            End Try

            Try
                moScannerServicesDriver.ApplySettingChanges()
            Catch ex As Exception
                MessageBox.Show("ApplySettingChanges() failed with " _
                                & ex.Message)
                Me.Close()
                Return
            End Try

    [...]

        Private Sub Form1_Closing(ByVal sender As System.Object, _
                                  ByVal e As System.ComponentModel.CancelEventArgs) _
                                  Handles MyBase.Closing
            If (moScannerServicesDriver IsNot Nothing) Then
                moScannerServicesDriver.Dispose()
            End If
        End Sub
    End Class

    Sorry about that.
    Regards,

    Jacques

All Replies
  • Further investigation reveals another query!

    Should I be using the Mobile Devices SDK or the Imaging Services SDK for the EV15?

  • Good afternoon Richard,

    I would recommend using our Mobile Devices SDK to interact / control the EV15 scan engine.

    Regards,
    Jacques

    PS: I will get back to your other questions later on today...

  • Good afternoon Richard,

    richardkm
    1. Set all scanner parameters to default.

    To the best of my knowledge, our Mobile Device SDK does not provide any API to reset the scan engine configuration to factory default.
    This said, two options come to mind to achieve this:

    • Option 1:
      Read the Reset to defaults barcode found on page 42 of the EV15 Scan Engine Integration Guide.

    • Option 2:
      Clean Start your Workabout Pro 3, to reset the device to factory default.
      See this post for further details.

    --

    richardkm
    2. Add the AIM ID prefix to scanned data. [...]
    Is it possible to do this via the SDK and if so how?

    Sensing / setting the EV15 AIM ID paramater can be done as follows:

    Imports PsionTeklogix.Barcode.ScannerServices

    Public Class Form1

        Dim moScannerServicesDriver As ScannerServicesDriver = _
        New ScannerServicesDriver()

    [...]

            Dim bIsEnabled As Boolean = _
            Convert.ToBoolean(moScannerServicesDriver.GetProperty("ICSP\Add AIM ID prefix"))

    [...]

            Try
                moScannerServicesDriver.SetProperty("ICSP\Add AIM ID prefix", 1) 'Enable
            Catch ex As Exception
                MessageBox.Show("SetProperty() failed with " & ex.Message)
                Me.Close()
                Return
            End Try

            Try
                moScannerServicesDriver.ApplySettingChanges()
            Catch ex As Exception
                MessageBox.Show("ApplySettingChanges() failed with " & ex.Message)
                Me.Close()
                Return
            End Try

    [...]

        Private Sub Form1_Closing(ByVal sender As System.Object, _
                                  ByVal e As System.ComponentModel.CancelEventArgs) _
                                  Handles MyBase.Closing
            If (moScannerServicesDriver IsNot Nothing) Then
                moScannerServicesDriver.Dispose()
            End If
        End Sub

    End Class

    Regards,
    Jacques

  • Many thanks but I still have problems.

    I am using the following code:

     Dim BarcodeConfig As PsionTeklogix.Barcode.ScannerServices.ScannerServicesDriver = New ScannerServicesDriver
     Dim aimID As Boolean = Convert.ToBoolean(BarcodeConfig.GetProperty("ICSP\Add AIM ID prefix"))
          
            Try
                BarcodeConfig.SetProperty("ICSP\Add AIM ID prefix", 1)
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
           
           
            Try
                BarcodeConfig.ApplySettingChanges()
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try

     aimID = Convert.ToBoolean(BarcodeConfig.GetProperty("ICSP\Add AIM ID prefix"))

     

    1. If I disable the AIM ID prefix in control panel and run the above code the variable aimID shows 'True' both before and after the 'SetProperty' and a barcode scan does not show a prefix.

    2. If I enable the AIM ID prefix in control panel and run the above code the variable aimID shows 'True' both before and after the 'SetProperty' and the barcode scan does not show a prefix AND the AIM ID prefix is shown as disabled in the control panel. i.e. it has changed it from enabled to disabled!

    3. If I change the code to 'SetProperty' to a value of zero I get an exception saying it was not possible to change the property value.

    4. If I enable the AIM ID prefix in control panel and do not run the above code the barcode scan shows the prefix, so works perfectly.

    Am I missing something here?

    Many thanks.

    Richard

     

  • Huh? Sorry about that Huh?

    Let me look into that and get back to you Richard.
    Stay tuned...

  • Did you try:

    SetProperty("SCS\Add AIM ID prefix","1")

    Instead of ICSP

  • Tried that and get an exception 'Could not change the value of the SCS\Add AIM ID prefix parameter'.

    Also this is not listed if you do a '.GetSettingName' for all 700+ settings.

    Thanks

  • Sorry about that.

    This should work:

    SetProperty("ICSP\Add AIM ID prefix", 2)  to enable

    SetProperty("ICSP\Add AIM ID prefix", 1) to disable

  • Richard,

    My bad Embarrassed
    I erroneously thought that the parameter is a boolean.

    Sensing and setting the EV15 AIM ID prefix parameter can be done as follows

    Imports PsionTeklogix.Barcode.ScannerServices

    Public Class Form1

        Dim bAimIsEnabled As Boolean = False
        Dim moScannerServicesDriver As ScannerServicesDriver = _
        New ScannerServicesDriver

    [...]

            Try
                If (CInt(moScannerServicesDriver.GetProperty( _
                    "ICSP\Add AIM ID prefix")) = 2) Then

                    bAimIsEnabled = True
                End If
            Catch ex As Exception
                MessageBox.Show("GetProperty() failed with " _
                                & ex.Message)

                Me.Close()
                Return
            End Try

    [...]

            Try
                If (bAimIsEnabled) Then
                    moScannerServicesDriver.SetProperty( _
                    "ICSP\Add AIM ID prefix", 2) 'Transmit AIM ID
                Else
                    moScannerServicesDriver.SetProperty( _
                    "ICSP\Add AIM ID prefix", 1) 'DO NOT transmit AIM ID
                End If
            Catch ex As Exception
                MessageBox.Show("SetProperty() failed with " _
                                &
    ex.Message)
                Me.Close()
                Return
            End Try

            Try
                moScannerServicesDriver.ApplySettingChanges()
            Catch ex As Exception
                MessageBox.Show("ApplySettingChanges() failed with " _
                                & ex.Message)
                Me.Close()
                Return
            End Try

    [...]

        Private Sub Form1_Closing(ByVal sender As System.Object, _
                                  ByVal e As System.ComponentModel.CancelEventArgs) _
                                  Handles MyBase.Closing
            If (moScannerServicesDriver IsNot Nothing) Then
                moScannerServicesDriver.Dispose()
            End If
        End Sub
    End Class

    Sorry about that.
    Regards,

    Jacques

  • Working!

    Many thanks for all the help.

    Is there anywhere I can find a list of all parameters with possible values?

    Richard

  • Some of them are documented in the Mobile Devices SDK Developers Guide - Chapter 14

  • Already got a copy of this but it is poor documentation and there is a lot of information missing.

    Anyway thanks again for all the help.

    Richard