Send/receive data on USB port as Serial

Hello,

I try to send/receive data to an external device by sending commands like in a serial terminal through the USB cable.

In Android, I found Android.Hardware.Usb, but I can't use it in Windows Phone project. I tryed to use System.IO.Ports but I can't compile the project:
The type or namespace name 'Ports' does not exist in the namespace 'System.IO' (are you missing an assembly reference?)

Thanks

Answers

  • YkshLeoYkshLeo USMember ✭✭✭✭

    USB transfer of data i think it's not available for the windows phone like it was for the pocket pc (windows ce). You should use a service like onedrive, drop box, box, google drive, etc to transfer files between desktop and phone.

    This is only a assumption.

    Just go own with your research.

    There is a Windows.Devices.Usb for communication with USB in Windows Store Apps.

    Just try it :smile:

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    Neither System.IO.Ports nor Windows.Devices.Usb are available to Windows Phone.

    Windows Phone does not support application access to the USB port, at least not for second-class applications.

  • Damien_IFTDamien_IFT USMember

    Thanks for your answers.

    I think we misunderstood, Yksh.Leo. I don't want to transfer files. I want to send characters (bytes) through USB like if it was a serial bus. I want to make an app a little bit like USB Serial Terminal on Android (https://play.google.com/store/apps/details?id=com.oneman.freeusbtools&hl=en)

    The classes in Windows.Devices.Usb are available for all devices families in UWP, but UWP is only available for Windows 10 and it's too recent for my needs

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    @Damien_IFT , have you found a solution to send chars via USB?

  • Damien_IFTDamien_IFT USMember

    @AlessandroCaliaro said:
    @Damien_IFT , have you found a solution to send chars via USB?

    Unfortunately not.

  • Saran16Saran16 INMember

    Hi.. I need to read the weight value from a weight machine to my windows phone mobile through rs232 port in xamarin c#. pls guide me.

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    @Saran16 - that functionality is not available for Windows Phone as was already stated in this thread.

Sign In or Register to comment.