SetUSB
The Device.SetUSB command enables the USB port on the device so it can send raw data (data packets) to a USB connected device / printer using the Device.SendUSB command.
The Device.SetUSB and Device.Send USB commands are currently only supported on Android devices.
When the client connects to the printer, a pop-up requesting permission to access the printer will display. Once the authorization is granted, the user is not prompted again. Permissions are required only once per a session.
Group: Device Extensions
Syntax: bOK=Device.SetUSB (bEnabled, vDevice)
bEnable (Boolean) - True enables the USB technology on the device; False disables the connection.
vDevice (Variant) is the name of the peripheral device (i.e. printer) connected to the USB.
Example
On Error Resume Next
Dim sZPL as String
Device.SetUSB(True, "PC43t") 'This enables the USB connection between the client device and peripheral (i.e. printer).
sZPL = "^XA^PRB^FS^PFO^FS^BY3,2.0^FS" 'Lable format in Zebra programming language
sZPL = sZPL & "^FT100,120^B3N,N,102,N,N^FD1234-5678^FS"
Device.SendUSB(sZPL, "PC34t") 'This sends the Zebra print command over USB to the connected peripheral (printer).
Versions Supported: RFgen 5.2.2.1 and newer.
Devices Supported: Android