kb:testing_and_debugging:testing_a_serial_connection_to_a_device

Testing a Serial Connection to a Meinberg PCI Card

Meinberg PCI cards usually provide a 9 pin D-type male connector which is assembled in the slot cover. The pin assignment of these connectors is the same as for the 9 pin serial connectors you can usually find for a PC's serial port, or the connector of a standard USB-to-serial adapter. See:
http://www.hardwarebook.info/Serial_(PC_9)

For legacy Meinberg PCI cards the connector was assembled directly on the printed circuit board. However, current PCI card models are low profile cards which need to be equipped with a low profile bracket if installed in a low profile PCI slot.

The low profile bracket doesn't provide any room for the D-type connector, so the the D-type connector is only available in the full-size bracket, and is connected to the PCI card via a ribbon cable.

So if a card has been installed in a low profile slot then the ribbon cable with the D-type connector has to be plugged onto the PCI card first.

Eventually there are 2 connectors on the card, and the correct one is the one the farthest away from the slot bracket. See, for example, the GPS180PEX card, where the ribbon cable is plugged into the the right of the 2 connectors:
https://www.meinbergglobal.com/english/archive/gps180pex.htm

If a Meinberg PCI card is connected to a standard PC's serial port then a a standard cross-over/null modem cable with female connectors at both ends has to be used to allow for communication between the 2 devices.

A simple female to female gender changer is not suitable. It makes the connectors fit physically, but unlike a crossover cable it doesn't connect the output signal from one side to the input pin at the other side, and vice versa, so this doesn't work.

For other external devices the type of connector and thus the required cable may depend on the exact device type. Please refer to the device manual.

If the computer doesn't provide a native serial port then a standard USB-to-serial adapter can be used.

With the default setting the PCI card should send a serial string once per second with 19200/8N1.

On the command line, the mbgctrl utility from the mbgtools packages can be used to check the PCI card's settings:

root@pc-martin1:~ # mbgctrl COMPARM EF

mbgctrl v1.0.0 copyright Meinberg 2001-2017

GNS181PEX 011411000290 (FW 2.46, ASIC 12.00) at port 0xEE00
Serial port COM0: “Meinberg Standard” per second at 19200/8N1.
Serial port COM1: “Meinberg Capture” automatically at 9600/8N1.
Current enable flags: SERIAL:0,PULSES:0,SYNTH:0

The example above shows that the card's port COM0 has been configured to send the Meinberg Standard time string once per second at 19200/8N1, which is the default.

However, the so-called enable flag for the serial output is 0, which means that a time string is only transmitted if the card is synchronized. If you want the serial output even if the card is not synchronized then you have to set the enable flag for the serial output to 1:

root@pc-martin1:~ # mbgctrl EF=SERIAL:1

mbgctrl v1.0.0 copyright Meinberg 2001-2017

GNS181PEX 011411000290 (FW 2.46, ASIC 12.00) at port 0xEE00
New enable flags: SERIAL:1,PULSES:0,SYNTH:0

Also, if the serial port COM0's settings are differently and you want to restore the default you can use this command to do so:

root@pc-martin1:~ # mbgctrl COM0=19200,8N1,0,1

mbgctrl v1.0.0 copyright Meinberg 2001-2017

GPS180PEX 029511005890 (FW 2.04, ASIC 8.06) at port 0xBE00
The clock's COM0 port has been set to “Meinberg Standard” per second at 19200/8N1.

On the Windows machine you can use e.g. the putty program, Windows' Hyperterm or any other software suitable to receive ASCII strings via a serial port. Take care to use the same settings for baud rate and framing as configured on the PCI card.

Please note the Meinberg Standard timestring starts with an ASCII STX and ends with an ASCII ETX character. These characters are not printable, so they may not be shown at all, or random characters may be displayed instead. So the displayed strings may look like this:

D:15.03.19;T:5;U:08.34.46;  U D:15.03.19;T:5;U:08.34.47;  U D:15.03.19;T:5;U:08.34.48; …

If such string is displayed on the Windows machine you can be sure the serial connection is OK, and it should be no problem to run the flash program afterwards..


Martin Burnicki martin.burnicki@meinberg.de 2019-03-15

  • kb/testing_and_debugging/testing_a_serial_connection_to_a_device.txt
  • Last modified: 2020-09-21 12:45
  • by 127.0.0.1