4 Replies Latest reply on Mar 8, 2017 12:21 AM by Darryn Campbell

    How to access SD Card from .NET program on a PC

    Patrick Cromie

      Hello all,

      We have been running into a few hiccups that I was hoping someone would be able to help us with. We are developing an inventory application on a TC8000 device that requires a SQLITE file to be loaded onto the device from a back office server(Windows 7) and we are having problems figuring out a way to send the file to the device via USB. But first, let me set the stage a bit. The owner of the company needs to have a device at every location and not all locations have wireless AP's. With this being said, we need to find a way to connect the device via USB as wireless is not an option that we have. When we attach the device to the computer, it shows up as a Media Device which means we can not assign it a drive letter and transfer the file within our .NET program. I have done some reading and Android has disabled support as a Mass Storage device in 4.0 apparently. While stumbling through the Profile Manager, I saw a USB section to it and a checkbox for UsbUMSAccessDeviceStorageUsage. Is this something that we can use in order to get the SD card to look like a Mass Storage device? Thank you in advance for any help that you can provide.

        • Re: How to access SD Card from .NET program on a PC
          Darryn Campbell

          Hi Patrick, I can't speak authoritatively as I do not have a device to test with but the docs for USB imply to me that the device has to first support any functionality being exposed from the USB profile manager.  Did you try it? The characteristic would look something like this:

          <characteristic type="UsbMgr" version="4.2"> <parm name="emdk_name" value="USB_test"/> <parm name="UsbModuleUsage" value="1"/> <characteristic type="SelectedAccessDeviceStorageUsage"> <parm name="UsbUMSAccessDeviceStorageUsage" value="1"/> </characteristic> </characteristic>


          Since you have to connect the devices to a PC anyway, would it not be easier to use adb?  adb push myfile /storage/sdcardlocation?  I'm not sure which location is the SD card as it can vary between devices but you should be able to push files that way.

            • Re: How to access SD Card from .NET program on a PC
              Patrick Cromie


              The whole purpose was to keep the communication process enclosed inside of a .NET application. The application would be running on the back office and waiting for the Scanner to be docked. When the scanner is docked, it would then fire an event that would start the communication process to the handheld. I'm not sure of a way to use adb within a .NET application. We would have to fire off a batch file that would start the communication process. Logically, that would not make sense as we would like to perform some testing to make sure that the correct SQLITE file is getting sent to the gun prior to the communication. Alternatively, yesterday I was looking at the TC8000 cradle and noticed an Ethernet port on the back side and was wondering if we could use that instead for the communication. When the Inventory scanner is cradled, we should be able to theoretically PING the device and transfer the file accordingly within the .NET application. Although, if you have any suggestions on how to set a static IP address to the TC8000 programmatically, I would love some suggestions. As for my previous problem, I will mark your answer as the correct answer as that would theoretically provide a way to push files to the device.