---
# System prepended metadata

title: MX6412J/MX6210N Dual Role USB
tags: [MX6412J, USB]

---

MX6412J/MX6210N Dual Role USB
===
### 1. Enter BIOS Expert Mode (Alt+F3), enable xDCI and set USB device mode on HS0 and SS0
It seems to work by only enabling xDCI without USB Device/Host Mode Override

### 2. Install Ubuntu 20.04.2 LTS
[Ubunut 20.04](http://www.releases.ubuntu.com/20.04/)


### 3. Run script to export a 2GB USB disk
```bash=
$ cat usb_device.sh
#!/bin/bash
echo -e "\n"
echo "Setup a 2GB vfat.img"
dd if=/dev/zero of=vfat.img bs=1M count=2000 status=progress
#mkdir vfat_mount_point
mkfs.vfat vfat.img
sudo losetup /dev/loop17 vfat.img
#sudo mount /dev/loop17 vfat_mount_point
sudo modprobe g_mass_storage file=/dev/loop17 stall=0 removable=1 iSerialNumber=123456

$ chmod +x usb_device.sh
$ sudo ./usb_device.sh
```

### 4. Connect to remote PC with USB 2.0 or 3.0 Type-A male to Type-A male cable
#### 4.1 Cable Pinout
![](https://engineering.bcmcom.com/CustomerDL/MX6211N/pic/USB3.0_TypeA_to_TypeA_pinout.png)

#### 4.2 USB 2.0 Test Result
USBView
![](https://engineering.bcmcom.com/CustomerDL/MX6211N/pic/USBView_USB_2.0.png "Right click to open auctual size image in a new tab")

Writing to USB
![](https://engineering.bcmcom.com/CustomerDL/MX6211N/pic/USB_2.0_Copy_writing.png "Writing to USB")

Reading from USB
![](https://engineering.bcmcom.com/CustomerDL/MX6211N/pic/USB_2.0_Copy_reading.png "Reading from USB")

#### 4.3 USB 3.0 Test Result
USBView
![](https://engineering.bcmcom.com/CustomerDL/MX6211N/pic/USBView_USB_3.0.png "Right click to open auctual size image in a new tab")

Writing to USB
![](https://engineering.bcmcom.com/CustomerDL/MX6211N/pic/USB_3.0_Copy_writing.png "Writing to USB")

Reading from USB
![](https://engineering.bcmcom.com/CustomerDL/MX6211N/pic/USB_3.0_Copy_reading.png "Reading from USB")

###### tags: `USB` `MX6412J`