5

I couldn’t decide which site to post this on, but figured this was the best fit.

I’m trying to set up a testing environment for an embedded system running ChibiOS. This embedded system expects a USB OTG device (USB flash drive) with a file on it. This file is created on a PC and need to be transferred to the embedded system.

The current method:

  • Take a USB flash drive, insert it into the PC.
  • Copy the file from a directory to the USB flash drive.
  • Eject/unmount the USB flash drive.
  • Physically move the USB flash drive from the PC to the embedded system.

This is tedious and happens dozens of times per day. I’d like to script it, but need a solution to physically moving the USB flash drive from one host port to another.

I thought I was onto something with the following type of USB device (Sony USM-SA3) with two USB connectors.

enter image description here

However, there’s a disclaimer:

*Note: Do not connect SA series to PC and mobile devices simultaneously.

This is what I want to do, so this won’t work.

In short, the device I’m looking for would have two USB ports.

  • Plug both USB ports into your PC.
  • Two USB flash drives are mounted and show up as 2 devices.
  • A file copied to one device shows up simultaneously on the other device.

This DIAMOND PC To PC USB File Transfer Adapter looks like exactly what I’m looking for, but seems to rely on specific software likely because there’s no onboard storage.

Any other solutions would be welcome, of course.

3
  • Both descriptions are valid. I was trying to ask in a different way with that second bulleted list. It's how someone who doesn't have my embedded controller can verify the device fits my requirements. The device has two male USB type-a connectors and some amount of storage (say, 4GB). Connecting these two USB type-a connectors into two different ports on the same PC results in two distinct devices mounted on the same operating system with mirrored device contents.
    – Jeff Lamb
    Oct 6, 2015 at 18:51
  • The embedded device runs ChibiOS and we have to write all the drivers ourselves. We have some solutions on how to achieve this, but it ends up being a significant amount of software development, as we'd basically develop this weird device ourselves. Implement shared OTG flash storage with two OTG controllers. Just found a "Lindy 4 Port USB 2.0 Auto Switch" - looks promising, but I'm not sure how the autoswitch works.
    – Jeff Lamb
    Oct 6, 2015 at 19:06
  • So what you want is a "USB peripheral sharing switch" You may have to press a button.
    – Yorik
    Oct 6, 2015 at 19:58

2 Answers 2

1

This is an interesting problem even if it is a few years old.

I've seen people use single board computers with USB-OTG ports as a storage device allowing a portion of its drive appear as USB storage to another computer. The files could be modified by both systems but care had to be taken to avoid both writing at once. The Linux "USB gadgets" project is one scheme to allow this.

I've seen USB switches that could help in avoiding the motions of having to move the drive back and forth. Some could be controlled by software to allow scripting.

If some people that knew enough low level hardware and firmware then they could create a dual port USB drive. Maybe do this on some kind of FPGA development board, or crack open some flash drives and put a soldering iron to them. I have some ideas but I'm not sure I should give my half baked ideas to anyone else.

The option one would choose depends on where one feels most comfortable. Linux USB gadgets would be a software heavy solution. Some kind of FPGA is a firmware solution. Hacking up some flash drives with a xacto knife and a soldering iron is a hardware solution.

The link to the PC to PC USB transfer cable is broken so I don't know for sure what that's about. My guess is it's emulating a serial or network connection, not storage, and so would not likely work in this case. For one computer to serve up files to another that is expecting to see a USB drive would require something like the Linux USB gadgets and an OTG cable to work.

Again, I know this is old but I happened across it, found it interesting, and thought I might share ideas on where someone with a similar problem could look for solutions.

0

This is what we did a few years ago, in a similar situation.

Put some software on the USB storage, that will be a first stage boot loader. It instructs the embedded device to load the OS from a network file server, and where from.

Every time you build a new OS, have the build copy it to the file on the boot server. Then press the reset button on the embedded device.

Look at bootp.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .