How to know usb drive detected on qt ?
-
i have to copy file from embedded linux based pc to usb drive.
so for that i need to check that usb drive is detected or not ?
how to ensure that this is usb storage device ?
-
@jsulm i am using df -h command to find that storage device before copying file into it.
because it give me name like
/dev/sda
by this i am ensuring that this is the pen drive and into this i have to copy file.
@Qt-embedded-developer On Linux systems USB drives are usually mounted under /media/USERNAME/DRIVENAME.
-
i have to copy file from embedded linux based pc to usb drive.
so for that i need to check that usb drive is detected or not ?
how to ensure that this is usb storage device ?
@Qt-embedded-developer Qt does not provide this. But you can for example use https://libusb.info/.
-
@Qt-embedded-developer Qt does not provide this. But you can for example use https://libusb.info/.
@jsulm i am using df -h command to find that storage device before copying file into it.
because it give me name like
/dev/sda
by this i am ensuring that this is the pen drive and into this i have to copy file.
-
@jsulm i am using df -h command to find that storage device before copying file into it.
because it give me name like
/dev/sda
by this i am ensuring that this is the pen drive and into this i have to copy file.
@Qt-embedded-developer On Linux systems USB drives are usually mounted under /media/USERNAME/DRIVENAME.
-
@Qt-embedded-developer On Linux systems USB drives are usually mounted under /media/USERNAME/DRIVENAME.
@jsulm actually there are when gnome is disable at that time we not get this way the attached usb drive
so can you tell me efficient way to mount and get the path of that pen drive
-
Hi,
What time is that ?
System startup ?
Before anything else is started ?
Is it separated from your application ?
etc. -
Hi,
What time is that ?
System startup ?
Before anything else is started ?
Is it separated from your application ?
etc.@SGaist my pen drive get automatically get mounted on media path but after writing startup script for start only qt application on my device
It's stopped my usb drive auto mount on media path
So i am looking for this solution.
I want to pass this path to copy my file to pen drive.
But it's stopped working due to start up script.
Can you help how to make it work again?
After running application using start up script I does not have access to terminal also
So this is all I am facing to simply copy file to pen drive using qt application...
-
Will you initiate the update from within your application ?
-
@SGaist sorry I am not getting what you want to say..
Can you elaborate more.
I have updated my previous reply also.
-
The auto mount has not stopped working, it's part of the features of your desktop environment. Since you are not using it anymore, it's something that you have to implement as part of your application or use udev to do that. See this article for an example.
-
The auto mount has not stopped working, it's part of the features of your desktop environment. Since you are not using it anymore, it's something that you have to implement as part of your application or use udev to do that. See this article for an example.
@SGaist this script is doing auto mount of pendrive but unmount of pendrive not working.
so i have decided to use mount and umount on triggering usb drive using ls -l /dev/sd* and then mount this device on media dir and then do umount on successful copy of file to pendrive