Cellcard (modem) dial-up issues - general solutions?

A

Adam Nofsinger

Good Monday morning, ;-)

Our deployed XPE images are running on SBCs that have a cell card hooked
up to them. They are to maintain an Internet connection and check for
new scheduling / download content using the cell card and windows
dial-up networking.

I've very nearly gotten a bullet-proof, always stay connected solution
by going the Control Panel -> Internet Options -> "Dial whenever an
Internet connection is not available" route. However, this does have a
downside - it pops up a "Connecting to bla..." dialog whenever the
connection is being brought back up by our application and this dialog
sits in front of our applications content (a sort of slideshow /
ad-rotator) for several seconds. This doesn't happen often or for too
long, but it is still annoying and unprofessional in appearance.

I also tried downloading an interface for our application called
RasManager, which supposedly is a Delphi port of a C header file that
directly accessing the RASAPI (Remote access server API). This seemed
to work great, but it will only run for one or two days before it
somehow locks the modem up in the "Connecting" or "Disconnecting" state,
and the application freezes at "Opening Port..." or "Connecting...".
Maybe this has to do with the hardware itself (a Novatel Ovation U720
USB broadband cell modem), or with some problem inherent to USB (I've
never really trusted USB)?

So, has anyone out here come up with a rock-solid approach to
maintaining (or at least obtaining when necessary) an internet
connection using dial-up networking on an XPE image? (KM - I know you
had mentioned going through something like this one ;-) Seems like the
sort of thing MSDN might cover somewhere, but I'm not finding it. I
would be interested even to know what hardware you used, what cellular
service provider, any details you can give.

Thank you so much in advance,

Adam
ims3k.com
 
K

KM

Adam,

I'll start my answer to this post with my usual comment on RasDial functionality - I hate the lack of documentation for MS
implementation of RAS/TAPI.

My experience I mentioned earlier in RasDial area was more pleasant because I did that project in Windows CE :) I basically rewrote
there the rasdial piece completely so that I could get what I needed.
Btw, similar thing can be done on XP (XPe). You will just have to rewrite rasdial.exe and rasphone.exe. Perhaps too much work to get
simple results.

I think what you need is hidden inside rasbook.pbk file. I mentioned that file in this thread:
http://groups.google.com/group/micr...d/browse_thread/thread/5371a510dd908c01?hl=en

The entry you would need to change is ShowDialingProgress under [Dial-up Connection] section. Set it to 0 if you want to hide the
progress (Connecting...) dialog. Please note that since the ras book (pbk) file is read every time the system or an app is trying to
create a dial-up connection, it can be modified dynamically.


Some more control you'd gain (in case you'd need more there) if you monitored the system for the RasDial UI dialogs and subclass it
(e.g., via global hooks). (Assuming you are writing the code for your shell apps) In fact, you don't need to monitor the system
intensively all the time. You better tie it to WM_RASDIALEVENT events (http://msdn2.microsoft.com/en-us/library/aa382348.aspx),
probably starting with RASCS_OpenPort event.
 
A

Adam Nofsinger

Very interesting response KM - Thank you very much.

I wonder, do you think that when (and if) I switch our xpe image to
using our custom application for the shell, that this will conceal or
not show the "Connectin to..." dialog if we stick to using the Control
Panel -> Internet Options

Another question - do the rasphone.exe and rasdial.exe programs in XP
simply use the RAS/TAPI API just like our custom application does? That
is to say, by using the RAS.h (actually Ras.pas since it was a Delphi
port) to access functions like RasDial and RasHangup, are we skipping
around rasphone.exe and rasdial.exe? Does the auto-dialer that comes up
when using the Control Panel -> Internet Options -> Connections settings
actually use rasdial.exe or rasphone.exe? The dialog I get when I
rasphone.exe from a cmd prompt looks totally different then the one that
is popping up occasionally.

Thanks again KM. You're a real asset to this group.
 
K

KM

Adam,

RasDial.exe does use RAS APIs the same way you'd use it in your own Win32 app that has to deal with enumerating and calling out a
RAS connection. Rasdial doesn't have its own UI but uses dialogs that are built in the TAPI library(ies).

RasPhone is a different story. It actually has its own UI and only calls in the RAS Manager APIs and reads the ras book. While
Rasdial provides unattended dialing, the RasPhone supports more features through its richer UI.

However the mentioned ShowDialingProgress flag in my earlier post, applies to both application as well as any other RAS client. You
are not supposed to see the progress dialog while dialing out a RAS (dial-up) connection. You will however see UI dialogs if an
error occurred while establishing the dial-up connection.


Due to old age and legacy support the RAS stack on NT and CE is over complicated nowadays. Call traces for simple user actions are
very long there and hard to track.
On Windows CE there is a feature (driver) implemented that is responsible for auto-dial. That driver basically launches
RasDial.exe - the default auto-dial handler - when requested. Even though the rasdail.exe name is hardcoded there in some Windows
components (WinInet and etc.) it is still possible to change the default handler and provide your own UI or modify system UI on CE.
On XP however it all stays in user mode. When an Internet connection is requested WinInet library will check the flag (Internet
Options settings you mentioned) and will show the dial-up dialog(s) if a dial-up connection needs to be established. I believe this
is being done via TAPI calls directly.
Basically on NT (XP) the Rasdial.exe is not for automating the connection process for any application client (e.g., starting
connection by a shortcut on the desktop, etc.).


Since your own application doesn't use TAPI directly (does it?) but calls into RAS API (RasDial function, etc.) you will see the
same UI the rasdial.exe shows. The ShowDialingProgress flag should hp you to get rid of the annoying dialog, though. (again, it
doesn't safe you from Microsoft UI completely - on error handling and such you will still see Microsoft TAPI UI there).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top