LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mobile device

I have to continuously read files from a folder located in a mobile device. The device is connected to my pc via usb cable. Labview seems not to accept a path to a mobile device, giving error 1430 "The path is empty or relative. You must use an absolute path." As you can see in the attached image, the mobile device (TelecoSHM) has not a root folder like C: or similar, so..anyone knows how can I fix this problem?

Thank you in advance

0 Kudos
Message 1 of 11
(4,222 Views)

I expect you will need to "force" Windows to treat the device as a mass storage device.

I would try to do it manually in the device manager (you can use the generic USB mass storage driver or something like this).

 

Be careful - playing with drivers might be tricky so remember to back up your data!

 

You can also check if the device cannot be switched into a mass storage mode.

Message 2 of 11
(4,188 Views)

Dear stockson,

the link you posted just looks like what I need. After editing the code, what do I have to do with the cfadisk.inf file? Where do I have to put it?

Thank you

0 Kudos
Message 3 of 11
(4,160 Views)

I'm afraid I don't know the procedure. I expect it should work just like regular manual driver installation but it would be best if you checked on the creators website.

0 Kudos
Message 4 of 11
(4,112 Views)

@matteo.bart wrote:

After editing the code, what do I have to do with the cfadisk.inf file? Where do I have to put it?


As stockson pointed out, it should be performed like a manual driver installation.

Once after you make the two changes as below,

%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DSCM-11000__________________________SC2IC801
%Microdrive_devdesc% = cfadisk_install,USBSTOR\DISK&VEN_SANDISK&PROD_CRUZER&REV_7.01

Replace DISK&VEN_SANDISK&PROD_CRUZER&REV_7.01 with your device ID.

This can be found in device manager, in disk drives, look in the details tab of your device.

Have you done all these?

 

Can you share the device manager screenshot?

 

Mathan

0 Kudos
Message 5 of 11
(4,101 Views)

I'm assuming that the device appears as an 'MTP' class device. If you, you might be able to use .NET or some other external library for transferring files.

 

If you search for ".NET MTP" it returns quite a few results/ideas for you to try.

 

Also, my phone allows me to select the 'driver mode' when a USB cable is connected (e.g. MTP, Mass Storage) and I can also set the default each time it is plugged in.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 6 of 11
(4,094 Views)

Actually after performing the procedure Windows Mobile Device Center wasn't able to establish the connection with the device any more. It was just a driver issue because in Device Manager a yellow exclamation point had appeared and it said "This device is not working properly because Windows cannot load the drivers required for this device. (Code 31)".

Then I performed the System Restore to revert the computer's state to that of a previous point in time, and now the device is correctly detected again but still I can't read files in it with labview.

0 Kudos
Message 7 of 11
(4,048 Views)

The problem is that I can't absolutely change device's settings, it's not a phone but a quite old device with WinCE 6.0 operating system. I can't set select "driver mode" in it. I can work on the pc only.

0 Kudos
Message 8 of 11
(4,033 Views)

    I know it has been some time since you posted this thread. I came across it because also face the same problem. I'm a beginner in LabView but I need to learn this for my project .

 

    I need to connect my mobile phone to my laptop. The mobile will act as a source of images that I will process in Labview.  I want to know how am I going to get the images from my mobile phone? When I'm trying to select a path from  my phone, LabVieW does not accept it. Is there any other way to do it aside from the option stated above? Thank you~ 

0 Kudos
Message 9 of 11
(2,014 Views)

If you connect your mobile to your computer, the Windows shell will recognize it typically as a Mobile Device. It will make it available in Windows Explorer, which is the user facing interface to the Windows shell. However as far as the Windows kernel is concerned, this device is not a disk volume and therefore it will not be accessible from the file IO API as such.

 

The device in Windows Explorer is a virtual device and all the operations you perform on it from the Explorer window are done in the shell. LabVIEW has no built-in interface to this shell interface as it is a Windows Explorer mechanisme. Accessing it through the Windows API is only in very limited ways possible. The entire Windows shell operates completely on COM/DCOM instead, the basic technology that is used to implement OLE and ActiveX. However the Windows shell interface is NOT ActiveX compatible as it lacks the necessary type library support that makes a COM interface actually ActiveX compatible.

 

Considering your expertise with LabVIEW and programming in general I think the most promising solution is likely to try to find a .Net library that you can interface to. I did in the past develop my own MTP access library but that is a DLL implemententation and was developed for a specific project and can't be shared as is. Besides it is pretty low level and only really useful if you really know what you are doing. I didn't implement double safety nets and hand rails. If you use that API wrong, LabVIEW simply dies. But as it was for my own consumption only I didn't bother to make it more user friendly than absolutely needed.

 

 

Rolf Kalbermatter
My Blog
Message 10 of 11
(1,955 Views)