Starting interface client - MD30

MD30 Interface Client

Document code
M212384EN
Revision
D
Language
English
Product
MD30
Document type
Technical description

You can use some of the interface client commands without a connection to MD30.

To test the MD30 interface commands:

  • MD30 must be powered from a suitable power supply.
  • You must have a Bluetooth connection or an RS-232 connection to MD30.
For the Bluetooth connection, you need the Bluetooth module BM10, BM10-NA, or BM10-RW.
For the RS-232 connection, use a serial-to-USB cable (240884) to connect MD30 to your laptop. See Vaisala Mobile Detector MD30 Maintenance and Troubleshooting Reference Guide for the list of spare parts and accessories.
Figure 1. MD30 connection options
  • For RS-232 settings, see Vaisala Mobile Detector MD30 Interface Description
  • For MD30 cable pinout, see Vaisala Mobile Detector MD30 Setup Guide

To start the interface client, you need to know the port to which MD30 is connected and the MD30 port speed.

  1. Go to the folder where the interface client is installed and open Command Prompt.
  2. The default port speed of the interface client is 115200 and the default port COM0.
    • If the MD30 port and port speed match the default settings, type:
      python md30InterfaceClient.py
    • If you need to change the port and/or port speed of the interface client to match the MD30 port speed, type:
      python md30InterfaceClient.py -P <port> -B <port speed>

      For example:

      python md30InterfaceClient.py -P COM4 -B 9600

      In both cases, the interface client starts and gives the following response:

      Welcome to MD30 interface client. MD30 interface client demonstrates the features of the MD30 serial interface.
      
      MD30 interface client version 3.0.0
      Interface version D
      Copyright (c) Vaisala Oyj. All rights reserved.
      />
    • If you need to change the port speed of MD30 to the match the interface client port speed, continue to 3.
  3. To change the port speed of MD30 to match the interface client:
    1. Use parameter 0x10 to define the port speed of MD30.
      setparam 0x10 <port speed>

      For example:

      setparam 0X10 4
      Property Value
      Port speed
      • 0 = 9600
      • 1 = 19200
      • 2 = 38400
      • 3 = 57600
      • 4 = 115200
    2. Reset MD30.
      reset
    3. Close the interface client.
      bye
    4. Restart the interface client using the new port speed.
      python md30InterfaceClient.py -P <port> -B <port speed>

      For example:

      python md30InterfaceClient.py -P COM0 -B 115200

    Example:

    Port speed is changed from 115200 bps to 9600 bps and back. Parameter 0x10 contains the port speed, which is taken into use after the reset.

    C:\>python md30InterfaceClient.py -P COM4 -B 115200
    
    Welcome to MD30 interface client. MD30 interface client demonstrates the features of the MD30 serial interface.
    
    MD30 interface client version 3.0.0
    Interface version D
    Copyright (c) Vaisala Oyj. All rights reserved.
    /> setparam 0x10 0
    /> Unit ID: 1, Client ID: 0, ID: 0x41,  Nb: 0,  Len: 2, icd_version: D, Err: 0
    
    /> reset
    /> Unit ID: 1, Client ID: 0, ID: 0x50,  Nb: 1,  Len: 2, icd_version: D, Err: 0
    RESET ACK
    
    /> bye
    
    C:\>python md30InterfaceClient.py -P COM4 -B 9600
    
    Welcome to MD30 interface client. MD30 interface client demonstrates the features of the MD30 serial interface.
    
    MD30 interface client version 3.0.0
    Interface version D
    Copyright (c) Vaisala Oyj. All rights reserved.
    /> getunitid
    /> Unit ID: 1, Client ID: 0, ID: 0x10,  Nb: 0,  Len: 10, icd_version: D, Err: 0
    Serial number: R2730011
    
    /> setparam 0x10 4
    /> Unit ID: 1, Client ID: 0, ID: 0x41,  Nb: 1,  Len: 2, icd_version: D, Err: 0
     
    /> getparam 0x10
    /> Unit ID: 1, Client ID: 0, ID: 0x40,  Nb: 2,  Len: 5, icd_version: D, Err: 0
    ID: 0x10  Value: 4  (Baud rate)
    
    /> reset
    /> Unit ID: 1, Client ID: 0, ID: 0x50,  Nb: 3,  Len: 2, icd_version: D, Err: 0
    RESET ACK
    
    /> bye
    
    C:\>python md30InterfaceClient.py -P COM4 -B 115200
    
    Welcome to MD30 interface client. MD30 interface client demonstrates the features of the MD30 serial interface.
    
    MD30 interface client version 3.0.0
    Interface version D
    Copyright (c) Vaisala Oyj. All rights reserved.
    /> getunitid
    /> Unit ID: 1, Client ID: 0, ID: 0x10,  Nb: 0,  Len: 10, icd_version: D, Err: 0
    Serial number: R2730011