7. LW3 Programmers’ Reference
MMX4x2 series – User's Manual
130
Applied firmware package: v1.6.0b19 | LDC software: v2.5.13b5
7.24. USB 2.0 Switch Configuration
DIFFERENCE:
This section refers to the MMX4x2-HDMI20-USB-L model only.
7.24.1.
Setting the Active USB Host
The command below is for selecting a USB B-type port (host computer) that will be connected to the USB
peripherals (USB A-type ports).
Command and Response
#usb
ç
SET·/MEDIA/USB/USBSWITCH.HostSelect=
<host_nr>
æ
pw·/MEDIA/USB/USBSWITCH.HostSelect=
<host_nr>
Parameters
Parameter
Parameter description
Value
Value description
<host_nr>
USB B-type port number.
1-4
port number
0
off state
Example
ç
SET /MEDIA/USB/USBSWITCH.HostSelect=2
æ
pw /MEDIA/USB/USBSWITCH.HostSelect=2
7.24.2.
Power Switch Delay
After switching between the hosts, certain connected USB peripherals need to be reset to operate properly.
Enable the power switch delay function, then the 5V power of all the devices is off for 2 seconds. This forces
the devices to restart, thus you do not have to physically unplug/re-plug the connected USB device.
Command and Response
ç
SET·/MEDIA/USB/USBSWITCH.DelayedSwitch=
<delay_state>
æ
pw·/MEDIA/USB/USBSWITCH.DelayedSwitch=
<delay_state>
Parameters
Parameter
Parameter description
Value
Value description
<delay_state>
2 sec power-cut towards the devices
if host is changed
true
power cut-off is active
false
power cut-off is inactive
Example
ç
SET /MEDIA/USB/USBSWITCH.DelayedSwitch=2
æ
pw /MEDIA/USB/USBSWITCH.DelayedSwitch=2
7.24.3. Querying the Host Presence
The USB B-type ports can be queried to check if there is a USB host device connected to a port. The 5V signal
presence of a connected USB host device can be queried as follows:
Command and Response
ç
GET·/MEDIA/USB/USBSWITCH.
<host_pc>
æ
pr·/MEDIA/USB/USBSWITCH.
<host_pc>
=
<status>
Parameters
Parameter
Parameter description
Value
Value description
<host_pc>
The ID of the host PC
Host5vSensePc1
Host5vSensePc2
Host5vSensePc3
Host5vSensePc4
<status>
5V signal presence of the
connected host
true
5V is detected
false
5V is not detected
Example
ç
GET /MEDIA/USB/USBSWITCH.Host5VSensePc1
æ
pr /MEDIA/USB/USBSWITCH.Host5VSensePc1=true
7.24.4.
Setting the 5V Sending to the USB Peripherals
The 5V power towards the USB A-type ports can be enabled or disabled as follows:
Command and Response
ç
SET·/MEDIA/USB/USBSWITCH.
<device_pwr>
æ
pw·/MEDIA/USB/USBSWITCH.
<device_pwr>
=
<status>
Parameters
Parameter
Parameter description
Value
Value description
<device_pwr>
5V output parameter of the
USB A-type port
Device5vEnable1
Device5vEnable2
Device5vEnable3
Device5vEnable4
<status>
5V power towards the USB
peripheral
true
5V is sent
false
5V is not sent
Example
ç
SET /MEDIA/USB/USBSWITCH.Device5vEnable1=false
æ
pw /MEDIA/USB/USBSWITCH.Device5vEnable1=false