3

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.

  • I understand what you are getting at, but this line near the end is confusing “Plug both USB ports into your PC.” Do you mean, “Plug both USB ports into the PC and embedded device at the same time.” – JakeGould Oct 6 '15 at 18:45
  • 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 '15 at 18:51
  • This isn’t a bad question, it’s also one of those things were I doubt such a device exists. I can’t imagine how a filesystem could be accessed on one USB connecter while another is accessing it as well. Theoretically, one connection would need to be read/write and the other could be read only? But how? FWIW, is it possible for you to share details on the embedded device? 100% sure no networking is possible? – JakeGould Oct 6 '15 at 18:57
  • 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 '15 at 19:06
  • So what you want is a "USB peripheral sharing switch" You may have to press a button. – Yorik Oct 6 '15 at 19:58
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.