Advertisement

Quick Links

M400 C
Developer Manual

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the M400C and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Vuzix M400C

  • Page 1 M400 C Developer Manual...
  • Page 2: Table Of Contents

    3 USB API 3.1 Vuzix USB API ........
  • Page 3 D.3 Orientation Sensor ....... . E Errata Revision 7 Vuzix Corporation...
  • Page 4: Overview

    M400C. Figure 1.1: M400C Block Diagram M400C uses USB-C DisplayPort Alternate Mode to connect as a display to the host PC. The other functions (audio, sensors, etc.) are provided over USB, and will function normally if the host does not support USB-C DisplayPort Alternate Mode. If the host does not support USB 3.0, then the camera frame rate will additionally be limited.
  • Page 5: System Requirements

    Table 1.1: Compatible Devices 1.2 System Requirements The following specifications are required for the host to be able to use all features of M400C: • A single USB-C [4] [5] port is required that supports USB-C DisplayPort Alternate Mode [7] for full functionality.
  • Page 6: Usage

    M400C begins operating when plugged in to a host device with a USB cable. Identify the USB- C port on the host computer that supports USB-C DisplayPort Alternate Mode. Plug the USB-C cable in to this port. Plug the other end in to M400C. M400C will power on and enumerate with the host device.
  • Page 7: Torch

    Section 3.1.2. 2.2.5 Buttons M400C has four physical buttons — three along the top edge, and one on the side. The buttons are presented to the host as a USB HID keyboard with programmable key codes. The USB API is used to configure the key codes that are used.
  • Page 8: Orientation Sensor

    . The sensor readings are reported to the host over the USB Sensor HID class. For details see Section D.3. The orientation of the X-, Y-, and Z-axes relative to the M400C device is shown in Figure 2.1. Revision 7...
  • Page 9: Status Led

    Waiting for video data Solid Error state Table 2.3: Status LED states When M400C is in an error state, the USB API can be queried to get more information on the specific error. 2.3 Features 2.3.1 Auto-rotation M400C can use the onboard orientation sensor to detect if the unit is being worn on the left or right side of the user’s head and auto-rotate the display accordingly.
  • Page 10: Programmable Buttons

    2.3.2 Programmable Buttons The hardware buttons on M400C use a default set of key codes that can be reprogrammed using the Vuzix USB API Write Button Key Codes (Section 3.1.11) command. The setting is written to non-volatile storage on M400C and will persist across power cycles until either reprogrammed using Write Button Key Codes again or reset using Restore Defaults (Section 3.1.4).
  • Page 11: Usb Api

    3.1 Vuzix USB API 3.1.1 Description M400C enumerates two separate internal devices that implement the Vuzix USB API. The first is the main microcontroller, responsible for the operation of the majority of the system. The other is a secondary microcontroller that bridges the touchpad controller to USB as a HID device.
  • Page 12: Supported Commands

    Set button function Read Read Button Key Codes 0xB1 Read button function Read Error Report Send error bitmap 0xF6 Table 3.1: Vuzix Main Microcontroller USB API Commands Secondary Microcontroller Direction Description OpCode Action Read Get Version Get firmware version 0x03...
  • Page 13: Get Version

    Subsys_HWversion Scaler FPGA hardware version (versions are returned as whole numbers) Subsys_vmajor Currently unused Subsys_vminor Currently unused Tracker_HWversion Microcontroller hardware version (versions are returned as whole numbers) Tracker_SWversion Microcontroller software version (versions are returned as whole numbers) Revision 7 Vuzix Corporation...
  • Page 14: Restore Defaults

    Send Packet 10 11 12 13 14 15 0x02 0x10 Receive Packet 10 11 12 13 14 15 16 0x01 Status Fields Status Returns 0x10 on success, 0x8B on error Revision 7 Vuzix Corporation...
  • Page 15: Brightness Set

    10 11 12 13 14 15 16 17 18 19 20 21 22 23 0x02 0x23 value Fields value Allowed values: 0: Turn off panel 1–255: Brightness level 1–100% Receive Packet 10 11 12 13 14 15 16 0x01 0x23 Revision 7 Vuzix Corporation...
  • Page 16: Brightness Get

    Send Packet 10 11 12 13 14 15 0x02 0x24 Receive Packet 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0x01 0x24 value Fields value Return values: 1–255: Brightness level Revision 7 Vuzix Corporation...
  • Page 17: Force Left Eye Set

    10 11 12 13 14 15 16 17 18 19 20 21 22 23 0x02 0x30 value Fields value Allowed values: 0: Left eye mode is active 1: Default behavior, right eye mode is active Receive Packet 10 11 12 13 14 15 16 0x01 0x30 Revision 7 Vuzix Corporation...
  • Page 18: Force Left Eye Get

    0x31 Receive Packet 10 11 12 13 14 15 16 17 18 19 20 21 22 23 0x01 0x31 value Fields value Return values: 0: Left eye mode is active 1: Right eye mode is active Revision 7 Vuzix Corporation...
  • Page 19: Autorotation Set

    10 11 12 13 14 15 16 17 18 19 20 21 22 23 0x02 0x36 value Fields value Allowed values: 0: Autorotation disabled, use the Force Left Eye command to set the device orientation 1: Autorotation enabled Receive Packet 10 11 12 13 14 15 16 0x01 0x36 Revision 7 Vuzix Corporation...
  • Page 20: Autorotation Get

    10 11 12 13 14 15 16 17 18 19 20 21 22 23 0x01 0x37 value Fields value Return values: 0: Autorotation disabled, use the Force Left Eye command to set the device orientation 1: Autorotation enabled Revision 7 Vuzix Corporation...
  • Page 21: Write Button Key Codes

    Description Set the key codes returned by the physical buttons on the device. Figure 3.1 shows the relation- ship between the button names A–D and the physical location on M400C. Saved to non-volatile memory. For default values refer to Table 2.5.
  • Page 22: Read Button Key Codes

    Description Return the key codes assigned to the physical buttons on the device. See Figure 3.1 for the relationship between the button names A–D and the physical location on M400C. Send Packet 10 11 12 13 14 15 16 17 18 19 20 21 22 23...
  • Page 23: Error Report

    Error initializing DisplayPort bridge 0x20 Error initializing DisplayPort bridge 0x2A Error initializing orientation sensor 0x30 0x40 Error initializing scalar FPGA 0x50 Error initializing power supplies 0x80 Error initializing display panel Table 3.3: Error Report Return Codes Revision 7 Vuzix Corporation...
  • Page 24: Touchpad Orientation

    S Scroll direction. Allowed values: 0: Default behavior, two-finger swipe towards buttons scrolls up 1: Two-finger swipe towards buttons scrolls down P Pan direction. Allowed values: 0: Default behavior, two-finger swipe forward pans right 1: Two-finger swipe forward pans left Revision 7 Vuzix Corporation...
  • Page 25 P Pan direction. Return values: 0: Default behavior, two-finger swipe forward pans right 1: Two-finger swipe forward pans left Z Zoom direction. Return values: 0: Default behavior, pinch in to zoom out 1: Pinch in to zoom in Revision 7 Vuzix Corporation...
  • Page 26: Touchpad Enable

    Reserved Reserved Enable Fields Enable Allowed values: 0: Touchpad is disabled 1: Default, touchpad is enabled Receive Packet 0x01 0x73 Reserved Reserved Enable Fields Enable Return values: 0: Touchpad is disabled 1: Default, touchpad is enabled Revision 7 Vuzix Corporation...
  • Page 27: Audio

    3.2 Audio 3.2.1 Description The audio microcontroller on M400C bridges the internal DSP to the USB interface. The micro- controller enumerates as a USB sound card (UAC 1.0) and a virtual COM port (CDC). The micro- controller can receive commands via the COM port to change audio use cases or USB modes.
  • Page 28: Camera

    UVC API. The M400C camera controller also enumerates a HID endpoint with additional custom com- mands that do not use the UVC API. This HID endpoint uses a simple 64 byte buffer to read and write data to the camera controller from a host application.
  • Page 29 The code to accomplish the same Torch On command for an Android application is shown below. The implementation in Kotlin: val bytes = byteArrayOf(2, 9, 1) connection.controlTransfer( 0x21, ^// requestType (write) 0x09, ^// request (set report) 0x0200, ^// value Revision 7 Vuzix Corporation...
  • Page 30 TimeUnit.SECONDS.toMillis(1).toInt() ^// timeout The Java implementation: byte[] bytes = {2, 9, 1}; connection.controlTransfer( 0x21, ^// requestType (write) 0x09, ^// request (set report) 0x0200, ^// value usbInterface.getId(), ^// index bytes, ^// buffer bytes.length, ^// length (int) TimeUnit.SECONDS.toMillis(1) ^// timeout Revision 7 Vuzix Corporation...
  • Page 31: Exposure Compensation Control

    Command Set to 1. Exposure Allowed values: 0: -6/3 1: -5/3 2: -4/3 3: -3/3 4: -2/3 5: -1/3 6: 0 7: +1/3 8: +2/3 9: +3/3 10: +4/3 11: +5/3 12: +6/3 Returns No return value. Revision 7 Vuzix Corporation...
  • Page 32: Flicker Cancel Priority Control

    (AE) or to reduce flicker as much as possible. HID Report Format Priority Command = 2 Fields Command Set to 2. Priority Allowed values: 0: Priority to AE 1: Priority to flicker cancellation Returns No return value. Revision 7 Vuzix Corporation...
  • Page 33: Max Frame Rate Control

    Set the maximum frame rate returned by the camera over USB. HID Report Format Frame Rate Command = 3 Fields Command Set to 3 Frame Rate Allowed values: 0: Disable frame rate control 3–60: Set maximum rate to this value Returns No return value. Revision 7 Vuzix Corporation...
  • Page 34: Af Mode

    Command Set to 4 AF Mode Allowed values: 0: One shot contrast AF 3: Continuous contrast AF 8: One shot contrast and PDAF hybrid AF 15: Continuous contrast and PDAF hybrid AF Returns No return value. Revision 7 Vuzix Corporation...
  • Page 35: Noise Reduction

    Strength Command = 5 Fields Command Set to 5 NR Allowed values: 0: Auto mode 1: Fixed mode Strength Only valid when NR = 1. Allowed values: 0: Weakest … 10: Strongest Returns No return value. Revision 7 Vuzix Corporation...
  • Page 36: Scanner Mode

    Sets the camera capture settings to work better for black and white text documents. HID Report Format Command = 6 Scan Mode Fields Command Set to 6 Scan Mode Allowed values: 0x00 : Normal mode 0x20 : Scanner mode Returns No return value. Revision 7 Vuzix Corporation...
  • Page 37: Color Mode

    Command Set to 7 Mode Allowed values: 0: Color 1: Mono 3: Negative 10: Black and white Threshold Only valid when Mode = 10. Allowed values: 0: Auto 1–255: Gray threshold value Returns No return value. Revision 7 Vuzix Corporation...
  • Page 38: Jpeg Quality

    Command = 8 JPEG Mode Fields Command Set to 8 JPEG Mode Allowed values: 0: Manual 1: Auto Q Factor Only valid when Mode = 0. Allowed values: 13–100: JPEG Q factor Returns No return value. Revision 7 Vuzix Corporation...
  • Page 39: Torch On

    Turn on the LED in torch (flashlight) mode. Only to be used if the camera is off or in video mode. HID Report Format Command = 9 Fields Command Set to 9 Byte 1 Set to 1 Returns No return value. Revision 7 Vuzix Corporation...
  • Page 40: Torch Off

    Turn off the LED from torch (flashlight) mode. Only to be used if the camera is off or in video mode. HID Report Format Command = 10 Fields Command Set to 10 Byte 1 Set to 1 Returns No return value. Revision 7 Vuzix Corporation...
  • Page 41: Torch On (Still)

    Only to be used if the camera is in still capture mode. HID Report Format Command = 11 Fields Command Set to 11 Byte 1 Set to 1 Returns No return value. Revision 7 Vuzix Corporation...
  • Page 42: Flash On

    Force flash on. Front LED will be illuminated during image capture. Only to be used if the camera is in still capture mode. HID Report Format Command = 12 Fields Command Set to 12 Byte 1 Set to 1 Returns No return value. Revision 7 Vuzix Corporation...
  • Page 43: Flash Auto

    Set flash to auto. Front LED will be illuminated during image capture when the scene is dimly lit. Only to be used if the camera is in still capture mode. HID Report Format Command = 13 Fields Command Set to 13 Byte 1 Set to 1 Returns No return value. Revision 7 Vuzix Corporation...
  • Page 44: Flash Off

    Set flash to off. Front LED will not be used during image capture. Only to be used if the camera is in still capture mode. HID Report Format Command = 14 Fields Command Set to 14 Byte 1 Set to 1 Returns No return value. Revision 7 Vuzix Corporation...
  • Page 45: Get Parameters

    21: Default value of all parameters 40: Firmware version and build date Returns Parameter = 1: Exposure Reserved Parameter = 2: Priority Reserved Parameter = 3: Reserved Frame Rate Parameter = 4: Reserved AF Mode Parameter = 5: Revision 7 Vuzix Corporation...
  • Page 46 1: -5/3 2: -4/3 3: -3/3 4: -2/3 5: -1/3 6: 0 7: +1/3 8: +2/3 9: +3/3 10: +4/3 11: +5/3 12: +6/3 Priority Return values: 0: Priority to AE 1: Priority to flicker cancellation Revision 7 Vuzix Corporation...
  • Page 47 CX3 Year CX3 firmware build date year, offset from 2000 (e.g. a value of 21 means the year is 2021) CX3 Month CX3 firmware build date month CX3 Day CX3 firmware build date day of the month Revision 7 Vuzix Corporation...
  • Page 48 ISP Major Major component (X) of ISP firmware version, in X.Y format ISP Minor Minor component (Y) of ISP firmware version, in X.Y format Revision 7 Vuzix Corporation...
  • Page 49: A Block Diagram

    Appendix A Block Diagram Figure A.1: Detailed Block Diagram...
  • Page 50: B Display Edid

    Pixel Clock 91.86 Horizontal Active 1280 Pixels Horizontal Back Porch Pixels Horizontal Front Porch Pixels Horizontal Sync Width Pixels Vertical Active Lines Vertical Back Porch Lines Vertical Front Porch Lines Vertical Sync Width Lines Table B.1: M400C EDID Timing Parameters...
  • Page 51: C Usb Device Tree

    Appendix C USB Device Tree...
  • Page 52 Figure C.1: USB Device Tree Revision 7 Vuzix Corporation...
  • Page 53: D Usb Hid Reports

    Appendix D USB HID Reports D.1 Buttons E0 E1 E2 E3 E4 E5 E6 E7 Key 1 Key 2 Key Codes Key 3 Key 4 Key 5 Key 6 Figure D.1: Button HID Get_Report(Input) Format Caps Scroll LEDs Kana pose Lock Lock Lock...
  • Page 54: Touchpad

    D.2 Touchpad B1 B2 B3 Mouse Wheel AC Pan Key Codes E0 E1 E2 E3 E4 E5 E6 E7 Figure D.3: Touchpad HID Get_Report(Input) Format Revision 7 Vuzix Corporation...
  • Page 55: Orientation Sensor

    X Axis (2 bytes) Gyrometer 3D 131 LSB/(dps) Angular Velocity about Y Axis (2 bytes) 131 LSB/(dps) Angular Velocity about Z Axis (2 bytes) 131 LSB/(dps) Figure D.4: Sensor HID Get_Report(Input) Format (1 of 2) Revision 7 Vuzix Corporation...
  • Page 56 0.001/LSB Data Field: Quaternion Device Orientation Y Component (2 bytes) 0.001/LSB Data Field: Quaternion Z Component (2 bytes) 0.001/LSB Data Field: Quaternion W Component (2 bytes) 0.001/LSB Figure D.5: Sensor HID Get_Report(Input) Format (2 of 2) Revision 7 Vuzix Corporation...
  • Page 57 Reserved for use as Change Sensitivity Absolute modifier range (2 bytes) Reserved for use as Maximum modifier range (2 bytes) Reserved for use as Minimum modifier range (2 bytes) Figure D.6: Sensor HID Get_Report(Feature) Format (1 of 2) Revision 7 Vuzix Corporation...
  • Page 58 Reserved for use as Change Sensitivity Absolute modifier range (2 bytes) Reserved for use as Maximum modifier range (2 bytes) Reserved for use as Minimum modifier range (2 bytes) Figure D.7: Sensor HID Get_Report(Feature) Format (2 of 2) Revision 7 Vuzix Corporation...
  • Page 59: E Errata

    USB audio device missing after re- In certain hosts, if the host device is re- boot booted with the M400C plugged in, the M400C USB audio device may not enumerate properly when the host powers on. Unplugging and re- plugging the M400C will solve the issue.
  • Page 60 Changes February 4, 2022 Devrin Talen Initial release February 28, 2022 Devrin Talen Updated Vuzix and audio USB API details Added Touchpad Orientation command Updated Brightness Set command Updated Force Left Eye commands Updated button mapping Updated audio operation March 24, 2022...
  • Page 61 Bibliography [1] USB Implementers’ Forum. Universal Serial Bus Device Class Definition for Audio Devices, 1.0 edition, March 1998. [2] USB Implementers’ Forum. Device Class Definition for Human Interface Devices (HID), 1.11 edition, May 2001. [3] USB Implementers’ Forum. Universal Serial Bus Device Class Definition for Video Devices, 1.5 edition, August 2012.

Table of Contents