PCMCIA device notification to user mode

Hi All,

I have to develop controlling application for the PCMCIA modem compatible
with standard 16450/550 UART. So, I’ve been told that no device driver is
necessary, modem appear as a regular serial COM.
My app shall catch the modem insertion and removal event and also switch off
the modem if it is idle for some predefined time. The function of switch
on/off is done by sending command to the modem COM.
My questions are:

  1. How can I get notification on the PCMCIA card insertion/removal at user
    mode ?
  2. How can my app monitor the packets sent to the modem from other apps
    (required to implement switch off on idle) ?
  3. My app needs to unload itself when the modem card is removed, and reload
    when its inserted back in. Do I need a service to implement it ?

Thanx for any help,
Stas.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi All,
Answering part of my own message:
Removal/Insertion of device can be monitored by WM_DEVICECHANGE message but
this raises another question. What could be done in non pnp system (NT4) ?
Regards,
Stas

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Stas Desy
Sent: Thursday, May 31, 2001 10:58 PM
To: NT Developers Interest List
Subject: [ntdev] PCMCIA device notification to user mode

Hi All,

I have to develop controlling application for the PCMCIA modem compatible
with standard 16450/550 UART. So, I’ve been told that no device driver is
necessary, modem appear as a regular serial COM.
My app shall catch the modem insertion and removal event and also switch off
the modem if it is idle for some predefined time. The function of switch
on/off is done by sending command to the modem COM.
My questions are:

  1. How can I get notification on the PCMCIA card insertion/removal at user
    mode ?
  2. How can my app monitor the packets sent to the modem from other apps
    (required to implement switch off on idle) ?
  3. My app needs to unload itself when the modem card is removed, and reload
    when its inserted back in. Do I need a service to implement it ?

Thanx for any help,
Stas.


You are currently subscribed to ntdev as: xxxxx@actcom.co.il
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> 1) How can I get notification on the PCMCIA card insertion/removal at user

mode ?

IIRC WM_DEVICECHANGE

  1. How can my app monitor the packets sent to the modem from other apps
    (required to implement switch off on idle) ?

Maybe a filter driver will be necessary for this.

  1. My app needs to unload itself when the modem card is removed, and
    reload
    when its inserted back in. Do I need a service to implement it ?

Do not unload the app on modem removal - just hide all UI.
WM_DEVICECHANGE handler on modem arrival will cause all UI to be shown back.

Otherwise, I don’t think there are ways to ask the OS to run an EXE on
device arrival.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Max,
Thanx.
I have to create some kind of universal solution to this, the one that will
run on 95, 98, NT4, 2k.
Unfortunately, there is no WM_DEVICECHANGE on NT.
Does anyone have ideas how to do it on all the aforementioned platforms.
Regards,
Stas
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Maxim S. Shatskih
Sent: Friday, June 01, 2001 1:44 AM
To: NT Developers Interest List
Subject: [ntdev] Re: PCMCIA device notification to user mode

  1. How can I get notification on the PCMCIA card insertion/removal at user
    mode ?

IIRC WM_DEVICECHANGE

  1. How can my app monitor the packets sent to the modem from other apps
    (required to implement switch off on idle) ?

Maybe a filter driver will be necessary for this.

  1. My app needs to unload itself when the modem card is removed, and
    reload
    when its inserted back in. Do I need a service to implement it ?

Do not unload the app on modem removal - just hide all UI.
WM_DEVICECHANGE handler on modem arrival will cause all UI to be shown back.

Otherwise, I don’t think there are ways to ask the OS to run an EXE on
device arrival.

Max


You are currently subscribed to ntdev as: xxxxx@actcom.co.il
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

>Unfortunately, there is no WM_DEVICECHANGE on NT.

There is NO dynamic PCMCIA slot support in NT. There is very limited
support for devices present at boot time.

You will have to use third part PCMCIA slot services for NT, and last I
checked there were a couple, and they all did things in their own style.

  • Jan

You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> >I want to write a multimedia keyboard driver for Windows NT.Can any body

>suggest me how to start ? which books i should refer for that ?

First of all, the NT DDK includes source for a complete keyboard driver,
which you can use as the basis of yours. Note that the Win2000 DDK keyboard
driver has some significant enhancements (specifically, support for the
KEYBOARD_HOOK IOCTLs), so if you are building a driver for Win2000, make
sure you use that source.

Next, Annabooks has published two binders with the specfics of the codes
and formats which are sent to the keyboard driver, and with other info
about quirks that driver writers should know. Contact them to see if these
binders are still available.

Avi Shmidman
Excalibur Systems, Inc.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Hi Jan and All,
Jan, you’d said that there were couple can you please point where did you
see them.
Thanx,
Stas

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Jan Bottorff
Sent: Sunday, June 03, 2001 3:43 AM
To: NT Developers Interest List
Subject: [ntdev] Re: PCMCIA device notification to user mode

Unfortunately, there is no WM_DEVICECHANGE on NT.

There is NO dynamic PCMCIA slot support in NT. There is very limited
support for devices present at boot time.

You will have to use third part PCMCIA slot services for NT, and last I
checked there were a couple, and they all did things in their own style.

  • Jan

You are currently subscribed to ntdev as: xxxxx@actcom.co.il
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

>Jan, you’d said that there were couple can you please point where did you

see them.

A couple of NT PCMCIA card service products are:

http://www.unicore.com/products/cardware/cardwarent.cfm

and

http://www.systemsoft.com/l-2/l-3/products-cardwizard.htm

A while back there was a third product, but can’t offhand find info about
it. My experience is the Cardware product supplies a fancy card services
API that’s pretty close to the PCMCIA spec. CardWizard is much more a
proprietary and simpler API.

My experience also was none of the products worked exactly correctly. As I
was developing a NT driver at the time, I learned the subtle bugs all too
well. For example, the Cardware product would fail certain API calls if you
inserted certain cards (like modem’s) in a different slot, causing the
device to fail application requests. Specifically, I believe it would not
let you change the memory window for the first card until you exited from a
driver read/write/ioctl call, if the second card was inserted while you
were processing in a driver.

Perhaps they have matured some. I’d recommend especially heavy testing of
any custom driver that depends on these.

I’d also say the PC Card (PCMCIA) support in Windows 2000 had quite a few
bugs too. Don’t know if they ever fixed them. For example, on Windows 2000
it was impossible to tell which physical slot a card was inserted in if you
were using a PCI controller. IRP’s to the PDO always reported slot zero.
The Microsoft PC Card bus controller driver also would fail memory
read/write requests using the config memory IRP, if the request crossed a
4K boundary.

  • Jan

You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> A while back there was a third product, but can’t offhand find
> info about it.

Perhaps you are thinking of the NT4 PCMCIA API is produced by Softex
(www.softexinc.com). We have found theirs to be a high quality product;
and, in addition, their programmers where willing and ready to work with us
to ensure compatibility between our card and their software.

On Windows 2000 it was impossible to tell which physical slot
> a card was inserted in if you were using a PCI controller.

We are still waiting for a solution to this as well. If anybody has
discovered any tips in this regard, please post it!

  • Avi

You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I aggree with Jan about his experience.

The adr: http://www.unicore.com/products/cardware/cardwarent.cfm seems not
to be the original adr of the firm of Cardware, the 3rd party of PCMCIA
supporrt tools. Please use: http://www.tssc.de. We have only positive
experience with this firm.

Nguyen


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com