Skip to main content

MC-3201

Tech Specs

Computer
CPUTiger Lake CPU main Board (Celeron/i3/i5/i7)
Storage SlotHot-swappable 2.5” SSD/HDD slot x 1
Supported OSWindows 10 IoT 2019 LTSC/Debian-11 (bullseye)/Ubuntu-20.04-HWE
Memory SlotDDR4 SO-DIMM slot x 2 (Up to 32GB)
Peripherals
Ethernet PortsAuto Sensing 10/100/1000Mbps x 4 (I219 x 1 + I210 x 3)
Serial PortsRS-232/422/485 x 2, software selectable (DB9)
Digital Input/OutputDI x 4, DO x 4 (GPIO)
NMEAFT4232 (UART X 4)
USBUSB 2.0 Port x 4 (type-A)/USB 3.0 Port x 2 (type-A)
Video OutputDisplayPort x 2
Audio Input/OutputLine in x 1, Line out x 1, 3.5 mm phone jack
M.2 SocketCellular 5G module/Storage x 1 (B key)/WiFi module x 1 (E key)
SIM Card Socketmicro SIM socket x 4 (push-out type)
mini PCIe SocketCellular LTE module x 1

Models

MC-3201-TL1-M-SMC-3201-TL7-S-S
ProcessorIntel Corei7-1185G7EIntel Celeron 3965U
RAMN/AN/A
HDD/SSD SlotsN/AN/A
LAN PortsN/AN/A
Serial PortsN/AN/A
DI/DON/AN/A
NMEA 0183N/AN/A
Power InputN/AN/A

Control Peripherals

Prerequisite

Build necessary MOXA out-of-tree kernel module for controlling Super I/O.

  • Install kernel module tool.
    sudo apt install build-essential kmod
  • Install kernel headers.
    sudo apt update
    sudo apt install linux-headers-`uname -r`
  • Build necessary kernel modules.
  • Install and generate modules.dep.
    make && make install
    depmod -a
  • Example Code for set/get Super IO GPIO value
    wget https://gitlab.com/moxa/open-source/linux/packages/moxa-example-code/-/raw/main/x86/GPIO/mx-gpio-ctl
    chmod +x mx-gpio-ctl
    cp mx-gpio-ctl /usr/sbin/

UART

UART modes are controled by 3 gpio pins and it87_serial

  • Super IO (IT8786) PIN table
Device NodeGPIO#0GPIO#1GPIO#2it87_serial
/dev/ttyS0GP13GP11GP121
/dev/ttyS1GP16GP14GP152
  • GPIO value of UART modes
UART modeGPIO#0GPIO#1GPIO#2it87_serial
RS2321000
RS485-2W0101
RS422/RS485-4W0011
  • Example for port 1

    • Select port 1 (/dev/ttyS0) as RS232 mode
      mx-gpio-ctl set 13 1
      mx-gpio-ctl set 11 0
      mx-gpio-ctl set 12 0
      echo 0 > /sys/class/misc/it87_serial/serial1/serial1_rs485
    • Select port 1 (/dev/ttyS0) as RS485-2W mode
      mx-gpio-ctl set 13 0
      mx-gpio-ctl set 11 1
      mx-gpio-ctl set 12 0
      echo 1 > /sys/class/misc/it87_serial/serial1/serial1_rs485
    • Select port 1 (/dev/ttyS0) as RS422/RS485-4W mode
      mx-gpio-ctl set 13 0
      mx-gpio-ctl set 11 0
      mx-gpio-ctl set 12 1
      echo 1 > /sys/class/misc/it87_serial/serial1/serial1_rs485
    • Get port 1 (/dev/ttyS0) mode
      mx-gpio-ctl get 13
      mx-gpio-ctl get 11
      mx-gpio-ctl get 12
      cat /sys/class/misc/it87_serial/serial1/serial1_rs485
    • Result:
      0
      1
      0
      1
      Then look up the table, port 1 is on RS485-2W mode.
  • Example for port 2

    • Select port 2 (/dev/ttyS1) as RS232 mode
      mx-gpio-ctl set 16 1
      mx-gpio-ctl set 14 0
      mx-gpio-ctl set 15 0
      echo 0 > /sys/class/misc/it87_serial/serial2/serial2_rs485
    • Select port 2 (/dev/ttyS1) as RS485-2W mode
      mx-gpio-ctl set 16 0
      mx-gpio-ctl set 14 1
      mx-gpio-ctl set 15 0
      echo 1 > /sys/class/misc/it87_serial/serial2/serial2_rs485
    • Select port 2 (/dev/ttyS1) as RS422/RS485-4W mode
      mx-gpio-ctl set 16 0
      mx-gpio-ctl set 14 0
      mx-gpio-ctl set 15 1
      echo 1 > /sys/class/misc/it87_serial/serial2/serial2_rs485
    • Get port 2 (/dev/ttyS1) mode
      mx-gpio-ctl get 16
      mx-gpio-ctl get 14
      mx-gpio-ctl get 15
      cat /sys/class/misc/it87_serial/serial2/serial2_rs485
    • Result:
      0
      1
      0
      1
      Then look up the table, port 2 is on RS485-2W mode.
  • Use helper script to swtich UART mode.

    • Read GPIO table(Config/mc3201-uart-gpio) in ExampleCode/mx-uart-mode script.
      source ./mc3201-uart-gpio
    • Select port 1 (/dev/ttyS0) as RS232 mode.
      ./mx-uart-mode set 1 1
      Set UART port 1 to RS232 mode
    • Get port 1 (/dev/ttyS0) mode.
      ./mx-uart-mode get 1
      RS232

NMEA

  • FT4232 UART chip
PortDevice Node
1/dev/ttyUSB0
2/dev/ttyUSB1
3/dev/ttyUSB2
4/dev/ttyUSB3

DIO

  • DIO status will be kept when warn (soft) reboot
  • DO = HIGH (Relay, Close) --> DI = LOW
  • DO = LOW (Relay, Open) --> DI = HIGH
  • DI: please DO NOT set DI port value when using example code
  • CP2112 PIN table
DIO indexGPIO PIN
DI 00
DI 11
DI 22
DI 33
DO 04
DO 15
DO 26
DO 37
  • Example

    • Get DI 0 state
      mx-cp2112-gpio-ctl get 0
    • Get DO 0 state
      mx-cp2112-gpio-ctl get 4
    • Set DO 0 state as low
      mx-cp2112-gpio-ctl set 4 0
  • Notice If DI port has been set value, the direction will set to "out".
    This will cause DI return value failed, please DO NOT set DI port value when using example code.
    But if DI port has been set value, please using the following step to reset dirction to 'in' status.

# grep cp2112_gpio /sys/class/gpio/gpiochip*/label
/sys/class/gpio/gpiochip440/label:cp2112_gpio

# then the base number = 440
# DI GPIO numbers will be DI_0=440, DI_1=441, DI_2=442, DI_3=443
echo "in" > /sys/class/gpio/gpio440/direction
echo "in" > /sys/class/gpio/gpio441/direction
echo "in" > /sys/class/gpio/gpio442/direction
echo "in" > /sys/class/gpio/gpio443/direction

Cellular

mPCIe slot power control

  • Default status is according to BIOS setting
  • Power control:
MPCIE PWR CTLGPIO PIN
SIO PINGP46
  • Reset control:
MPCIE RST CTLGPIO PIN
SIO PINGP41
  • For power on mPCIe slot

    • Power ON -> wait 200 ms -> and RST ON
    • Set GP46 High, wait 200 ms, and Set GP41 High
  • For power off mPCIe slot

    • RST OFF -> wait 200 ms -> and Power OFF
    • Set GP41 Low, wait 200 ms, and Set GP46 Low
  • For reset module only

    • RST OFF -> RST ON
    • Set GP41 Low, wait 200 ms, and GP41 High
  • Example

    • Power on mPCIe slot
      mx-gpio-ctl set 46 1; sleep 0.2; mx-gpio-ctl set 41 1
    • Power off mPCIe slot
      mx-gpio-ctl set 41 0; sleep 0.2; mx-gpio-ctl set 46 0
    • Reset on mPCIe slot
      mx-gpio-ctl set 41 0; sleep 0.2; mx-gpio-ctl set 41 1`
    • Get power status on slot
      mx-gpio-ctl get 41
    • Get reset pin status on slot
      mx-gpio-ctl get 46
  • Notice If SIM card slots have been changed, please power cycle module to let SIM cards could be re-detected.

M.2 Key B slot

N/A

SIM card select

SIM SELGPIO PINSLOT Type
SIM Slot #1/#2GP80mPCIe
SIM Slot #3/#4GP82M.2 Key B
  • Default status

    • mPCIe: SIM slot #1 (Low)
    • M.2 Key B: SIM slot #3 (Low)
  • Select SIM slot

    • mPCIe:
      • Set GP80 Low = Select SIM slot #1
      • Set GP80 High = Select SIM slot #2
    • M.2 Key B:
      • Set GP82 Low = Select SIM slot #3
      • Set GP82 High = Select SIM slot #4
  • Example

    • Select SIM slot #1
      mx-gpio-ctl set 80 0
    • Select SIM slot #2
      mx-gpio-ctl set 80 1
    • Select SIM slot #3
      mx-gpio-ctl set 82 0
    • Select SIM slot #4
      mx-gpio-ctl set 82 1
    • Get SIM slot #1/#2 status
      mx-gpio-ctl get 80
    • Get SIM slot #3/#4 status
      mx-gpio-ctl get 82
  • LTE Telit module dial-up and connection guide TBD


LAN interface

LAN SlotNICrenamed NIC
LAN #1eth0enp0s31f6
LAN #2eth1enp6s0
LAN #3eth2enp7s0
LAN #4eth3enp8s0
  • For Ubuntu 20.04 LAN setting: I219 LAN chip: only support on Ubuntu 20.04 HWE kernel version:
sudo apt update
sudo apt install --install-recommends linux-generic-hwe-20.04
uname -a
Linux moxa 5.11.0-34-generic #36~20.04.1-Ubuntu SMP Fri Aug 27 08:06:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

ip a | grep enp
2: enp6s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
3: enp7s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
4: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
inet 10.123.8.84/23 brd 10.123.9.255 scope global enp8s0
5: enp0s31f6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000

Watchdog

  • Example for probing it87_wdt driver on boot

    1. Config file /lib/modprobe.d/watchdog.conf

      # timeout:Watchdog timeout in seconds, default=60 (int)
      # nowayout:Watchdog cannot be stopped once started, default=0 (bool)
      options it87_wdt nowayout=1 timeout=60
    2. Disable iTCO_wdt and mei_wdt driver, /lib/modprobe.d/iTCO-blacklist.conf

      blacklist iTCO_wdt
      blacklist mei_wdt
      blacklist iTCO_vendor_support
    3. Disalbe NMI watchdog driver (for Ubuntu), /etc/default/grub

      GRUB_CMDLINE_LINUX_DEFAULT="nmi_watchdog=0"
    4. After adding the kernel parameter, don't forget to update the GRUB

      sudo update-grub
  • Watchdog daemon package (Debian/Ubuntu)

    1. Install package
      sudo apt-get update
      sudo apt-get install watchdog
    2. Config file /etc/default/watchdog
      # Start watchdog at boot time? 0 or 1
      run_watchdog=1
      # Start wd_keepalive after stopping watchdog? 0 or 1
      run_wd_keepalive=0
      # Load module before starting watchdog
      watchdog_module="it87_wdt"
      # Specify additional watchdog options here (see manpage).
    3. To uncomment this to use the watchdog device driver access "file", /etc/watchdog.conf
      watchdog-device                = /dev/watchdog
  • Example https://github.com/torvalds/linux/tree/master/tools/testing/selftests/watchdog

Last updated on 2022-05-09 by Elvis Yao