Access serial port in Windows store app
-
Monday, September 17, 2012 7:59 AM
hi,ervry one,
i have read all about the topic of the seial port access in the forum.
conclude that metro can't access the serial port in any way!
but i have a secnario which must access the serial port please give me some solutions.
i have a GPS device which only have a serial port interface,all the data transfered by the serial port.
This is a on board device.
in fact it's a smart phone with a GPS device which connect to the CPU with the serial port.
we just konw that the windows store app don't support the data transfer with the serial port.
how can i use my GPS device?
All Replies
-
Tuesday, September 18, 2012 1:48 AM
Does metro support USB ?
If so you could use a USB to serial port converter.
n.Wright
-
Tuesday, September 18, 2012 2:37 AMModerator
The WinRT API does not support serial or USB.
Best Wishes - Eric
- Edited by Eric Hanson-MSFTMicrosoft Employee, Moderator Tuesday, September 18, 2012 2:37 AM
- Marked As Answer by Eric Hanson-MSFTMicrosoft Employee, Moderator Tuesday, September 18, 2012 2:37 AM
-
Thursday, September 20, 2012 2:54 AM
Eric,thank you for your reply.
i just learn the access the custom driver sample released by Microsoft.
it give me a idea that if i can use "custom driver + WinRT C++ component + Windows Store app" to achieve my purpose???
first i build a custom driver to the serial GPS device.Use the driver to wrap the operation of the serial.
second i build the WinRT C++ component to access the driver.From that sample,we use the CreateDeviceAccessInstance to access the device.
finally,we can use the WinRT API---Windows::Device::Enumeration,to enumerate the device and than open it by the ID.
does this solution can work???? give me some comment.
thank you.
-
Tuesday, September 25, 2012 12:21 AMModerator
This isn’t a scenario we targeted. The option of last resort – is you write a custom driver, which isn’t an option for everyone, and even then it can only be accessed by one privileged app declared in device metadata. A desktop app may be a better answer.
Best Wishes - Eric
- Marked As Answer by Eric Hanson-MSFTMicrosoft Employee, Moderator Tuesday, September 25, 2012 12:21 AM
-
Saturday, December 01, 2012 8:26 AM
To add to this conversation, I've been investigating how to get a USB GPS device to work with the Surface RT, and there seems to be a bunch of challenges to overcome.
To begin, there are no drivers available for the USB GPS devices which I've been looking at. So one way to go about dealing with this, would perhaps be to write a Windows Store Device App, but apparently 'I' (meaning me) won't be permitted to do that because my understanding is that only OEMs and IHVs can do so. Okay fine,,, so in speaking with some of these GPS manufacturers, they seem to be claiming that Microsoft is not allowing them to do so either,,, what's up with that?
So Eric, you indicated the possibility of writing a 'custom driver', but this isn't permitted (at least with Win RT)unless you're an OEM or IHV, am I under a misconception?
Another problem we have here is that even if appropriate drivers were available, according to this post, there's no method by which a windows store app can make use of a USB connected device, is that correct? That just totally bins all the nav app possibilities, as well as all the enterprise apps which need GPS accuracy, which are (or could be) in the Windows store, from running on the Surface RT. So Microsoft's flagship product is a bit adrift on the high seas here.. If I'm correct in my assessment this is really a bit of problem - please say it aint so?
Ideally I'd like to see drivers for 2 or 3 of the more popular USB GPS products (okay just give me at least one) and an update for WinRT which will allow a Windows Store App access to ONLY these specific 2 or 3 GPS products. This is a good solution and should happen.
Thanks.
-
Tuesday, December 25, 2012 6:32 AMI think Microsoft wants us to buy only tablets with the GPS embedded so it doesn't accept USB attached GPS devices for Windows RT tablets. I wonder if the Surface Pro will have a GPS embedded or not. If not, then attaching a USB to it seems much more possible but will Windows Store Apps have access to the GPS location information via the Geolocation APIs automatically?
-
Tuesday, December 25, 2012 8:39 AM
The Surface Pro is (will be?) a normal Win8, not the RT abomination. So it should support the stock USB to serial converters and most of USB devices that work with Win7.
-- pa
About use of GPS: see also this question.


