usb_modeswitch: control the mode of 'multi-state' USB devices
SERSETUP can handle modem dialing or listen for incoming calls. Once a connection has been established, the driver will invoke the main Doom, Heretic or Hexen executable. In starting game, the driver passes a -net command line parameter. This is used to specify the memory address of a structure inside the driver's memory. Computer Modem drivers and updates with links to manufacturers download pages. When plugged in for the first time, they act like a flash storage and start installing the Windows driver from there. If the driver is installed, it makes the storage device disappear and a new device, mainly composite (e.g. With modem ports), shows up. When plugged in for the first time, they act like a flash storage and start installing the Windows driver from there. If the driver is installed, it makes the storage device disappear and a new device, mainly composite (e.g. With modem ports), shows up.
Command to display
usb_modeswitch manual in Linux:
$ man 1 usb_modeswitch
usb_modeswitch - control the mode of 'multi-state' USB devices
usb_modeswitch [-heWQDIvpVPmM23rwKdHSOBGTNALnsRiuagft] [-c filename]
Several new USB devices have their proprietary Windows drivers onboard,most of them WWAN and WLAN dongles. When plugged in for the first time,they act like a flash storage and start installing the Windows driver fromthere. If the driver is installed, it makes the storage device disappearand a new device, mainly composite (e.g. with modem ports), shows up.
On Linux, in most cases the drivers are available as kernel modules,such as 'usbserial' or 'option'. However, the device initially binds to'usb-storage' by default. usb_modeswitch can then send a provided bulkmessage (most likely a mass storage command) to the device; this messagehas to be determined by analyzing the actions of the Windows driver.
In some cases, USB control commands are used for switching. These cases arehandled by custom functions, and no bulk message needs to be provided.
Usually, the program is distributed with a set of configurations for manyknown devices, which allows a fully automatic handling of a device uponinsertion, made possible by combining usb_modeswitch with the wrapper scriptusb_modeswitch_dispatcher which is launched by the udev daemon. Thisrequires a Linux-flavoured system though.
Note that usb_modeswitch itself has no specific Linux dependencies.
This program follows the usual GNU command line syntax,with long options starting with two dashes ('--'). A summary ofoptions is included below.
- -n. One 'Message' can be added with -Mthat will be transmitted after the eject sequence. Used by many modems
- Just detach the current driver. This is sufficient for some earlydevices to switch successfully. Otherwise this feature canbe used as a 'scalpel' for special cases, like separating thedriver from individual interfaces
- Send a special control message used by older Huawei devices
- Send a specific bulk message used by all newer Huawei devices
- Send an alternative bulk message to Huawei devices
- Send a special control message used by Sierra devices
- Send a special control message used by GCT chipsets
- Send a special control message used by Kobil devices
- Send a special control message used by Sequans chipset
- Send a special control message used by the MobileAction device
- Send a special control message used by Qisda devices
- Send a special control message used by Quanta devices
- -F--pantech-mode NUM
- Send a special control message used by Pantech devices.Value NUM will be used in control message as 'wValue'
- Send a special control message used by some newer Blackberry devices
- Send a special control message used by all Option devices
- Apply a special sequence used by Sony Ericsson devices. Implies option --check-success
- Send a sequence of bulk messages used by Cisco devices
- Send a USB reset command to the device. Can be combined with any switchingmethod or stand alone. It is always done as the last step of all deviceinteractions.Few devices need it to complete the switching; apart from that it may beuseful during testing
- -c--config-file FILENAME
- Use a specific config file. If any ID or switching options are given ascommand line parameters, this option is ignored.In that case all mandatory parameters have to be provided onthe command line
- -f--long-config STRING
- Provide device details in config file syntax as a multiline stringon the command line
- Read the device details in config file syntax from standard input, e.g. redirected froma command pipe (multiline text)
- Don't show progress or error messages
- Print all settings before running and show libusb debug messages
- Changes the behaviour of the program slightly. A success message including theeffective target device ID is put out and a syslog notice is issued. Mainly forintegration with a wrapper script
- -s--check-success NUM
- After switching, keep checking for the result up to max. NUM seconds. If target IDsor target class were provided, their appearance indicates certain success. Otherwisethe disconnection of the original device is rated as likely proof
- Obsolete. Formerly obtained SCSI attributes, now ignored
- -i--interface NUM
- Select initial USB interface (default: 0). Only for testing purposes
- -u--configuration NUM
- Select USB configuration (applied after any other possible switching actions)
- -a--altsetting NUM
- Select alternative USB interface setting (applied after switching). Mainlyfor testing
Mobileaction Modems Driver Jobs
This manual page was originally written by Didier Raboud (didier [at] raboud.com) forthe Debian system. Additions made by Josua Dietze. Permission isgranted to copy, distribute and/or modify this document underthe terms of the GNU General Public License, Version 2 or anylater version published by the Free Software Foundation.
The complete text of the current GNU General PublicLicense can be found in http://www.gnu.org/licenses/gpl.txt
Pages related to usb_modeswitch
- usb_modeswitch_dispatcher (1) - Linux wrapper for usb_modeswitch (not intended for direct invocation)
- usb-devices (1) - print USB device details
- usbguard-applet-qt (1) - USBGuard Qt applet
- usbguard (1) - USBGuard command-line interface
- usbmuxd (1) - Expose a socket to multiplex connections from and to iOS devices.
- usbredirserver (1) - exporting an USB device for use from another (virtual) machine
- use-devel-checklib (1) - a script to package Devel::CheckLib with your code.
Xcfe4 running on Samsung Galaxy Tab 10.1 (p4wifi)
|Name||Galaxy Tab 10.1|
|Original software||Android 3.1 Honeycomb|
|Chipset||NVIDIA Tegra 2 250 T20|
|CPU||2x 1.0 Ghz Cortex-A9|
|GPU||NVIDIA Geforce ULP|
|Unixbench Whet/Dhry score||424.5|
- decatf (inactive)
Users owning this device
- Maxnet (Notes: Variant: GT-P7501, current mainline target)
postmarketOS for the Samsung Galaxy Tab 10.1 runs on mainline Linux kernel fork. The kernel uses both mainline and forward ported drivers. Some peripherals are using mainline device driver where applicable. Some peripherals which are not working on or don't have mainline drivers are using drivers forward ported from the stock 3.1.10 kernel.
How to enter flash mode
Press and hold Power + Volume Down buttons
Choose 'samsung-p4wifi' as target device.Build the image:
Enter flash (download) modeFlash the kernel and system images
As alternative you can flash rootfs to Data partition to use more space, because default system partition is small
The battery in this device is the
max17042. A tear down of the (nearly) identical Galaxy Tab 8.9 reveals that the charger is
Mobileaction Modems Driver Speed
Differences between mainline and downstream drivers:
The downstream kernel provides an early implementation of a driver for the
max17042 battery. The implementation of the battery and charger driver are split across
max17042_battery.c. The downstream charger driver implements additional logic to handle charge full and low battery events which may affect the health of the battery. The implementation details are not clear but the overall functionality appears to dynamically tune the full charge value. The mainline driver does not have this sort of functionality. The downstream driver reports the current in milliamp whereas the mainline driver is in microamp.
max8903 datasheet shows that there are separate GPIOs for USB and DC power connectors. This device has one connect GPIO for both USB and DC mode. The type of connector is determined by reading the
usb-sel GPIOs. It's unclear which piece of hardware the usb-sel is coming from (max8903 / tegra soc / 30-pin connector ???).
Moved to Nvidia_Tegra_2_(tegra20)#Graphics which cover all Tegra 2 devices.
Audio output through headphone and speakers are working. Audio input through the built-in microphone and headset microphone are working.
The ALSA UCM config files were previously generated using the
xml2ucm tool. The
p4wifi.config.xml can be found in this github gist.
pmaports!254 the ALSA UCM config files were created based the wm8994 datasheet and the downstream driver coding of the mixer.
The audio inputs are muted by default. Unmute and set the volume with
alsamixer or set the mixer controls manually with
amixer. The right channel (
IN1R) is the headset microphone. The left channel (
IN1L) is the built-in microphone.
Unmuting the headset microphone:
Note: Plug in the headset mic at boot otherwise the sound driver will not load. Some wm8994 device register writes fail during driver probe unless mic bias GPIO is set to high.
The wifi chip in this device is the Broadcom BCM4330 B1 revision. There is a B2 revision which is much more common. The only distinguishing factor is the firmware. Only the B1 firmware will work on this device. The most common BCM4330 firmware found from various sources (such as
linux-firmware) is for the B2 revision.
The xmm6260 modem was used in quite a few Samsung Android devices from the same era as this tablet. The Samsung Galaxy Tab 10.1 3G (p4) and Samsung Galaxy Tab 10.1 from T-Mobile (p4tmo) are otherwise identical to the WiFi only version of the tablet (p4wifi). The cellular modem is connected via an internal USB interface called USB HSIC. The mainline Tegra USB driver does not implement this functionality. Much of the work in enabling the cellular stack would involve adding USB HSIC support to the mainline USB driver.
The bcm4330 Bluetooth module is supported by the mainline kernel and Bluez 5 stack.
Install bluetooth service:
Pair a Bluetooth device:
Mobileaction Modems Driver License
The following instructions will play audio to a Bluetooth headset.
Check that the Bluetooth audio profiles are working in bluetoothctl:
Play an audio file through a Bluetooth headset:
kxt9f accelerometer driver works pending device tree patches being merged into upstream. There requires a user space daemon such as
iio-sensor-proxy to read the sensor data.
USB OTG mode is not implemented in the mainline USB driver.
Mobileaction Modems Driver Support
Hardware Information & Mainline Driver Status
The Linux mainlining effort contains drivers forward ported from the stock Samsung Linux 3.1.10 kernel which shipped with the device. Some peripheral devices have been transitioned over to the mainline driver. Other drivers are not in the mainline kernel or the device is not compatible with the mainline driver.
|Peripheral Type||Hardware||Mainline Driver|
|Ambient light sensor||bh1721fvc||Y|
|Analog Digital Converter||stmpe811||Y|
|CPU Temperature Sensor||nct1008||Y|
|Wifi / Bluetooth||bcm4330||Y|
|30-pin accessory port||unknown||-|
- 1: kxt9f driver exists in mainline. The driver needs support device tree bindings.
- 2: ak8975 driver exists in mainline. The device id for ak8975c needs to be added to the driver. I (decatf) can't test it because the compass seems to report nonsense data. The compass on my tablet might be broken.
- 3: sii9234 driver exists in mainline. Requires someone with an MHL cable to implement / test it.
Mainline Driver Status Legend
|P||Forward ported driver|
|-||No driver -- driver has not been forward ported|
Latest mainline (just few patches diverged from upstream)
latest kernel (based on grate-linux https://github.com/grate-driver/linux/ ) with rebased patches to test
- !1279 Initial merge request
- #1386 Update linux-samsung-p4wifi to kernel 4.16 (with some comments about what's left to do before we could have a shared mainline kernel)