|
|
|
start date: Mon, 16 Jul 2007 22:39:40 -0700,
posted on: microsoft.public.dotnet.framework.compactframework
back
| Thread Index |
|
1
Chris
|
|
2
Paul G. Tobey [eMVP] p space tobey no spam AT no instrument no spam DOT com
|
|
3
Chris
|
|
4
Paul G. Tobey [eMVP] p space tobey no spam AT no instrument no spam DOT com
|
|
5
Chris
|
Determining the type of expansion card currently in use
Hello all,
I'm working on a mobile application that uses an RFID chip reader, and
now has to support multiple readers. I've found the pattern example at
MSDN for bar code scanners to be an excellent analog (http://
msdn2.microsoft.com/en-us/library/aa446489.aspx), and intend to model
my solution after that. However, it requires the ability to
distinguish between the different types of cards that may be plugged
in to the device.
I've found multiple articles regarding detecting the insertion/removal
of cards, but I feel that won't be sufficient for my situation. The
card is likely to have been inserted when the application isn't
running, so I need to be able to determine the installed card after
the fact.
This post:
http://groups.google.com/group/microsoft.public.dotnet.framework.compactframework/browse_thread/thread/b17ae0d508772609/d53e04dbcd13a987?lnk=gst&q=detect+card&rnum=11#d53e04dbcd13a987
....indicates that a potential source of information is the registry,
specifically the HKLM\Drivers\Active branch. I have confirmed that
there are two different entries that show up, one for each card. I
feel like this is probably workable, but as I'm very new to working
with hardware, I'm not sure if there are unforeseen pitfalls.
Is this the approach you'd take? Is there a better or more "proper"
way that I can determine the installed card?
The current version of my application supports a reader in a Compact
Flash form factor. The new card is Secure Digital. Neither have
storage, so they do not enumerate as directories.
I'm working on a Windows Mobile 5 PDA, using .NET Compact Framework
SP2.
Any help or advice is much appreciated!
Cheers,
Chris
Date:Mon, 16 Jul 2007 22:39:40 -0700
Author:
|
Re: Determining the type of expansion card currently in use
The only way to know if this is the best answer would be to know all about
the RFID cards that you want to use and, perhaps more important, *how they
are connected to your device*. RFID could be handled via ordinary RS-232,
in which case there would be no difference in the registry between one and
the next, although you might be able, once you opened COM2 or whatever, to
send a message and get information about the reader. If the only ways to
connect a reader that you're going to support are SD and CF, yes, you're
probably safe checking how the Active key set in the registry changes.
Paul T.
"Chris" wrote in message
news:1184650780.000647.188440@i13g2000prf.googlegroups.com...
> Hello all,
>
> I'm working on a mobile application that uses an RFID chip reader, and
> now has to support multiple readers. I've found the pattern example at
> MSDN for bar code scanners to be an excellent analog (http://
> msdn2.microsoft.com/en-us/library/aa446489.aspx), and intend to model
> my solution after that. However, it requires the ability to
> distinguish between the different types of cards that may be plugged
> in to the device.
>
> I've found multiple articles regarding detecting the insertion/removal
> of cards, but I feel that won't be sufficient for my situation. The
> card is likely to have been inserted when the application isn't
> running, so I need to be able to determine the installed card after
> the fact.
>
> This post:
> http://groups.google.com/group/microsoft.public.dotnet.framework.compactframework/browse_thread/thread/b17ae0d508772609/d53e04dbcd13a987?lnk=gst&q=detect+card&rnum=11#d53e04dbcd13a987
>
> ...indicates that a potential source of information is the registry,
> specifically the HKLM\Drivers\Active branch. I have confirmed that
> there are two different entries that show up, one for each card. I
> feel like this is probably workable, but as I'm very new to working
> with hardware, I'm not sure if there are unforeseen pitfalls.
>
> Is this the approach you'd take? Is there a better or more "proper"
> way that I can determine the installed card?
>
> The current version of my application supports a reader in a Compact
> Flash form factor. The new card is Secure Digital. Neither have
> storage, so they do not enumerate as directories.
>
> I'm working on a Windows Mobile 5 PDA, using .NET Compact Framework
> SP2.
>
> Any help or advice is much appreciated!
>
> Cheers,
> Chris
>
Date:Tue, 17 Jul 2007 08:57:48 -0700
Author:
|
Re: Determining the type of expansion card currently in use
Hi Paul,
Thanks for your insight. To my knowledge, there are no plans to
support RFID readers that aren't connected via CF or CD (of course, we
all know requirements change).
I've ran across mention of using the "Storage Manager" to query
devices attached to the PDA. Are there standard bits of information
that can be gleaned from attached devices? For instance, I'm aware
that most USB-connected peripherals on the desktop provide a "Device
ID," which I believe is part of the USB standard. Is there something
similar to a Device ID that I could get via the Storage Manager?
I haven't found any documentation on the Storage Manager, so I'm not
even sure where to start with it.
-Chris
On Jul 17, 10:57 am, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
no instrument no spam DOT com> wrote:
> The only way to know if this is the best answer would be to know all about
> the RFID cards that you want to use and, perhaps more important, *how they
> are connected to your device*. RFID could be handled via ordinary RS-232,
> in which case there would be no difference in the registry between one and
> the next, although you might be able, once you opened COM2 or whatever, to
> send a message and get information about the reader. If the only ways to
> connect a reader that you're going to support are SD and CF, yes, you're
> probably safe checking how the Active key set in the registry changes.
>
> Paul T.
>
> "Chris" wrote in message
>
> news:1184650780.000647.188440@i13g2000prf.googlegroups.com...
>
> > Hello all,
>
> > I'm working on a mobile application that uses an RFID chip reader, and
> > now has to support multiple readers. I've found the pattern example at
> > MSDN for bar code scanners to be an excellent analog (http://
> > msdn2.microsoft.com/en-us/library/aa446489.aspx), and intend to model
> > my solution after that. However, it requires the ability to
> > distinguish between the different types of cards that may be plugged
> > in to the device.
>
> > I've found multiple articles regarding detecting the insertion/removal
> > of cards, but I feel that won't be sufficient for my situation. The
> > card is likely to have been inserted when the application isn't
> > running, so I need to be able to determine the installed card after
> > the fact.
>
> > This post:
> >http://groups.google.com/group/microsoft.public.dotnet.framework.comp...
>
> > ...indicates that a potential source of information is the registry,
> > specifically the HKLM\Drivers\Active branch. I have confirmed that
> > there are two different entries that show up, one for each card. I
> > feel like this is probably workable, but as I'm very new to working
> > with hardware, I'm not sure if there are unforeseen pitfalls.
>
> > Is this the approach you'd take? Is there a better or more "proper"
> > way that I can determine the installed card?
>
> > The current version of my application supports a reader in a Compact
> > Flash form factor. The new card is Secure Digital. Neither have
> > storage, so they do not enumerate as directories.
>
> > I'm working on a Windows Mobile 5 PDA, using .NET Compact Framework
> > SP2.
>
> > Any help or advice is much appreciated!
>
> > Cheers,
> > Chris
Date:Wed, 18 Jul 2007 13:06:13 -0700
Author:
|
Re: Determining the type of expansion card currently in use
CD?
The Storage Manager is for storage devices. I won't do anything unless
there's a filesystem on the device.
Since you can't settle on one interface, there's no one answer, nor is there
going to be an absolutely unique ID. If your CF slot is PCMCIA, there's the
device ID from the card and you might be able to get to that, if you knew
that a card was there, etc. by contacting the PCMCIA bus driver. I don't
have any experience with that, however, so I'm not sure that it would work.
SD cards have something similar for identifying what sort of a card they
are. There's no central API that I can bring to mind that would allow you
to say, find me an RFID reader and tell me what type it is. You have to
write the code that will do that.
Paul T.
"Chris" wrote in message
news:1184789173.017149.291760@e9g2000prf.googlegroups.com...
> Hi Paul,
>
> Thanks for your insight. To my knowledge, there are no plans to
> support RFID readers that aren't connected via CF or CD (of course, we
> all know requirements change).
>
> I've ran across mention of using the "Storage Manager" to query
> devices attached to the PDA. Are there standard bits of information
> that can be gleaned from attached devices? For instance, I'm aware
> that most USB-connected peripherals on the desktop provide a "Device
> ID," which I believe is part of the USB standard. Is there something
> similar to a Device ID that I could get via the Storage Manager?
>
> I haven't found any documentation on the Storage Manager, so I'm not
> even sure where to start with it.
>
>
> -Chris
>
>
> On Jul 17, 10:57 am, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
> no instrument no spam DOT com> wrote:
>> The only way to know if this is the best answer would be to know all
>> about
>> the RFID cards that you want to use and, perhaps more important, *how
>> they
>> are connected to your device*. RFID could be handled via ordinary
>> RS-232,
>> in which case there would be no difference in the registry between one
>> and
>> the next, although you might be able, once you opened COM2 or whatever,
>> to
>> send a message and get information about the reader. If the only ways to
>> connect a reader that you're going to support are SD and CF, yes, you're
>> probably safe checking how the Active key set in the registry changes.
>>
>> Paul T.
>>
>> "Chris" wrote in message
>>
>> news:1184650780.000647.188440@i13g2000prf.googlegroups.com...
>>
>> > Hello all,
>>
>> > I'm working on a mobile application that uses an RFID chip reader, and
>> > now has to support multiple readers. I've found the pattern example at
>> > MSDN for bar code scanners to be an excellent analog (http://
>> > msdn2.microsoft.com/en-us/library/aa446489.aspx), and intend to model
>> > my solution after that. However, it requires the ability to
>> > distinguish between the different types of cards that may be plugged
>> > in to the device.
>>
>> > I've found multiple articles regarding detecting the insertion/removal
>> > of cards, but I feel that won't be sufficient for my situation. The
>> > card is likely to have been inserted when the application isn't
>> > running, so I need to be able to determine the installed card after
>> > the fact.
>>
>> > This post:
>> >http://groups.google.com/group/microsoft.public.dotnet.framework.comp...
>>
>> > ...indicates that a potential source of information is the registry,
>> > specifically the HKLM\Drivers\Active branch. I have confirmed that
>> > there are two different entries that show up, one for each card. I
>> > feel like this is probably workable, but as I'm very new to working
>> > with hardware, I'm not sure if there are unforeseen pitfalls.
>>
>> > Is this the approach you'd take? Is there a better or more "proper"
>> > way that I can determine the installed card?
>>
>> > The current version of my application supports a reader in a Compact
>> > Flash form factor. The new card is Secure Digital. Neither have
>> > storage, so they do not enumerate as directories.
>>
>> > I'm working on a Windows Mobile 5 PDA, using .NET Compact Framework
>> > SP2.
>>
>> > Any help or advice is much appreciated!
>>
>> > Cheers,
>> > Chris
>
>
Date:Wed, 18 Jul 2007 13:38:41 -0700
Author:
|
Re: Determining the type of expansion card currently in use
Oops. CD == SD.
Thanks, Paul. I appreciate all your help. It looks like my best bet
for now will be to look in the Drivers\Active registry key; it may not
continue to work if we add additional readers, but we can't always
make everything 100% future-proof!
Best regards,
Chris
On Jul 18, 3:38 pm, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
no instrument no spam DOT com> wrote:
> CD?
>
> The Storage Manager is for storage devices. I won't do anything unless
> there's a filesystem on the device.
>
> Since you can't settle on one interface, there's no one answer, nor is there
> going to be an absolutely unique ID. If your CF slot is PCMCIA, there's the
> device ID from the card and you might be able to get to that, if you knew
> that a card was there, etc. by contacting the PCMCIA bus driver. I don't
> have any experience with that, however, so I'm not sure that it would work.
> SD cards have something similar for identifying what sort of a card they
> are. There's no central API that I can bring to mind that would allow you
> to say, find me an RFID reader and tell me what type it is. You have to
> write the code that will do that.
>
> Paul T.
>
> "Chris" wrote in message
>
> news:1184789173.017149.291760@e9g2000prf.googlegroups.com...
>
> > Hi Paul,
>
> > Thanks for your insight. To my knowledge, there are no plans to
> > support RFID readers that aren't connected via CF or CD (of course, we
> > all know requirements change).
>
> > I've ran across mention of using the "Storage Manager" to query
> > devices attached to the PDA. Are there standard bits of information
> > that can be gleaned from attached devices? For instance, I'm aware
> > that most USB-connected peripherals on the desktop provide a "Device
> > ID," which I believe is part of the USB standard. Is there something
> > similar to a Device ID that I could get via the Storage Manager?
>
> > I haven't found any documentation on the Storage Manager, so I'm not
> > even sure where to start with it.
>
> > -Chris
>
> > On Jul 17, 10:57 am, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
> > no instrument no spam DOT com> wrote:
> >> The only way to know if this is the best answer would be to know all
> >> about
> >> the RFID cards that you want to use and, perhaps more important, *how
> >> they
> >> are connected to your device*. RFID could be handled via ordinary
> >> RS-232,
> >> in which case there would be no difference in the registry between one
> >> and
> >> the next, although you might be able, once you opened COM2 or whatever,
> >> to
> >> send a message and get information about the reader. If the only ways to
> >> connect a reader that you're going to support are SD and CF, yes, you're
> >> probably safe checking how the Active key set in the registry changes.
>
> >> Paul T.
>
> >> "Chris" wrote in message
>
> >>news:1184650780.000647.188440@i13g2000prf.googlegroups.com...
>
> >> > Hello all,
>
> >> > I'm working on a mobile application that uses an RFID chip reader, and
> >> > now has to support multiple readers. I've found the pattern example at
> >> > MSDN for bar code scanners to be an excellent analog (http://
> >> > msdn2.microsoft.com/en-us/library/aa446489.aspx), and intend to model
> >> > my solution after that. However, it requires the ability to
> >> > distinguish between the different types of cards that may be plugged
> >> > in to the device.
>
> >> > I've found multiple articles regarding detecting the insertion/removal
> >> > of cards, but I feel that won't be sufficient for my situation. The
> >> > card is likely to have been inserted when the application isn't
> >> > running, so I need to be able to determine the installed card after
> >> > the fact.
>
> >> > This post:
> >> >http://groups.google.com/group/microsoft.public.dotnet.framework.comp...
>
> >> > ...indicates that a potential source of information is the registry,
> >> > specifically the HKLM\Drivers\Active branch. I have confirmed that
> >> > there are two different entries that show up, one for each card. I
> >> > feel like this is probably workable, but as I'm very new to working
> >> > with hardware, I'm not sure if there are unforeseen pitfalls.
>
> >> > Is this the approach you'd take? Is there a better or more "proper"
> >> > way that I can determine the installed card?
>
> >> > The current version of my application supports a reader in a Compact
> >> > Flash form factor. The new card is Secure Digital. Neither have
> >> > storage, so they do not enumerate as directories.
>
> >> > I'm working on a Windows Mobile 5 PDA, using .NET Compact Framework
> >> > SP2.
>
> >> > Any help or advice is much appreciated!
>
> >> > Cheers,
> >> > Chris
Date:Thu, 19 Jul 2007 07:22:53 -0700
Author:
|
|
|