USB Switch - Host or Device

I understand it that way:

USB Switch - Device : Several devices are connected in parallel and the software selects the desired device.
USB Switch - Host : One device is connected to several hosts via the switch and can be assigned to one host alternately. This is also available as LAN version with virtual USB over Ethernet driver.

Host is for connecting other peripheral such as usb drive, usb printer, usb camera etc…

Device is ROCK Pi 4 as a peripheral connecting to other PC, such as you can export the eMMC/sdcard to be read by the PC as MTP device.

2 Likes

Jack,

Thank you that’s clear now.

Useful too !!!

Little off topic but any plans for you (RADXA) to release a sealed case we can use when the lareg heat sink is fitted ? … Large Heatsink with Case

Wait, what?! That’s great option!

well, this is the default behaviour on android as MTP device.

Jack,

“Device is ROCK Pi 4 as a peripheral connecting to other PC, such as you can export the eMMC/sdcard to be read by the PC as MTP device.”

This works … thats great but balenaEtcher wont see this a drive … can SD cards be flashed via windows and balenaEtcher this way ???

In theory, it’s possible. There is a command in the u-boot, which can export the emmc/sd card to host PC. Then, you can use dd or etcher.

To export eMMC to host PC, you can input the following command in u-boot serial console.

ums 0 mmc 0

I haven’t actually tried dd the whole image, but we use it to replace/update kernel/dtb in debugging.

“u-boot” … assume this is edited on the Pi itself … can i do this via the android Distro ???

ok, I know what you want. What you want, is actually install images from the USB OTG port, right? Here is the solution for you:

https://wiki.radxa.com/Rockpi4/dev/usb-install

You can write from PC with rkdeveloptool. Make sure you are writing the image ends with -gpt.img.

From your link I went onto https://wiki.radxa.com/Rock/flash_the_image

This worked well until i tried to Flash the firmware and got “match device type failed”

That page is mostly for the rock rk3188. Are you using Windows? We can write a new tutorial for the GPT image with Windows Rockchip tools. Let’s just abandon the private rkupdate image format.

Jack,

That would be amazing. Useful for others too.

Yes using Windows

The reason I’m trying to flash the card this way is since flashing the card via balenaEtcher in windows via the card reader/writer It is now no longer detaected by windows. This isnt soemthing ive seen before as usiully you just re-flash an SD card.

Neither windows (Disk Manager/File Explorer) or balenaEtcher see the card that has been flashed.

Not sure if its the card so I do have one arriving today as a secondary.

I’d like to try a few DISTROS with the Pi4 TBH

Off topic again … sorry …

Any news on a Large Heatsink compatible official case yet ?

Looks like you (RADXA) are looking at options … Large Heatsink with Case

Sorry, USB can only flash to eMMC, not SDcard. I think for your case, maybe the SDcard is corrupted. Is your SDcard bootable on ROCK Pi now?

Jack it was the card … new card lets me re flash it any number of times …

Just have an issue with Blank screen now after tweaking Reslution … is there a reset ? I reflashed to another Android version (your TV version) and again same black screen !!!

Hi, Jacob

If you reflash to a new Android TV, you should boot into recovery and wipe data for the first time.

My Upper USB3.0 port does not recognize USB drives in either position of the switch.
The drives work OK in any of the other ports.

  • Is change in the switch immediate or do I have to reboot?
  • might it be the case that the switch is defective?
  • which logs besides dmesg and /var/log/messages can I see the switch behaviour?

The switch should be immediately, you may need to replug the USB drive. You can use dmesg -c and then dmesg to check if the usb status is detected and changed.

Thanks, so dmesg should show the switch switching, even if no device is plugged?

No. If no device plugged in, there is not dmesg. Plug in the usb device and switch, the dmesg will show usb disconnect if you switch to device side.

1 Like