0
votes

In Qt Application I've developed to run on an embedded ARM-based system, I have to detect when USB pendrive has been inserted and what it contains, since I'd like to show contained files on a windows and allow the user to choice one of them. In order I have to:

  1. detect when USB is inserted;
  2. USB identification;
  3. USB file contained in.

Try to explain: I have a file to save and restore in an external device. It contains some settings related to my app developed using Qt for an embedded system (based on ARM microcontroller). I'm already done tyhe same for SD card, because I know exactly what kind of device will be opened, its path, its name etc. Problem exist if I wanna do the same using a USB pendrive, since every one has its own name. Thus I don't know firstly its path (I supposed "/media/myusername", i.e. where I found my USB when it's inserted), and how to open it. I'm starting making some trials using the QFileSystemWatcher library: I connect the directoryChanged Signal to a slot that shows me folder. It works, but it's not enough to proceed further. Any solution?

How to do this?

1
@The question is too broad, you need to focus on one problem.KernelPanic

1 Answers