No Preferred List Found

A

Andy Baker

I am using the OpenNetCF 2.1 library when with a VB.NET 2005 application to
connect my CE device to a wireless printer. Occasionally when connecting, I
get the error messages AdapterException in SetWirelessSettingsEx - 'No
Preferred List Found' My code uses SetWirelessSettingsEx to set up the
connection, then BindAdapter. It has recently been upgraded from VB.NET 2003
/ OpenNetCF 1.4, and the connecting process is much more reliable as a
result, but this error message is one that I haven't seen before. What could
be causing this - as far as I know, there is a preferred list, and I was
under the impression that SetWirelessSettingsEx would add the device to the
preferred list if it was not already in it. Thanks in advance.

Andy Baker
 
P

Paul G. Tobey [eMVP]

I think you're going to have to trap the exception in the debugger and see
where it came from. Set the debugger to stop on all exceptions and I think
it should show you the line in the SDF where it's thrown.

Paul T.
 
A

Andy Baker

I have today managed to get the problem on my system, and when I came out of
my application and looked in Network connections in CE, the network card was
no longer visible, although the card was enabled. This explains the 'No
preferred list' error, as there is not a network card, but what would cause
it to disappear from the connections list. Disabling and re-enabling the CF
slot fixed the problem, but I would like to know what happened to cause it
in the first place.

Andy Baker

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:%23UF6%[email protected]...
 
P

Paul G. Tobey [eMVP]

Could be that you made a registry change to the driver entries for the card
and then unbound or rebound the adapter. Could be that there was an
exception in the driver and so the device manager no longer had it loaded.
Those are the only two I can think of...

Paul T.

Andy Baker said:
I have today managed to get the problem on my system, and when I came out
of my application and looked in Network connections in CE, the network card
was no longer visible, although the card was enabled. This explains the 'No
preferred list' error, as there is not a network card, but what would cause
it to disappear from the connections list. Disabling and re-enabling the CF
slot fixed the problem, but I would like to know what happened to cause it
in the first place.

Andy Baker

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:%23UF6%[email protected]...
I think you're going to have to trap the exception in the debugger and see
where it came from. Set the debugger to stop on all exceptions and I
think it should show you the line in the SDF where it's thrown.

Paul T.
 
A

Andy Baker

I think I have found the problem. We had been getting problems reconnecting
the printer once the user had tried to print when out of range. To try and
force a reconnection, I had called the OpenNetCF UnbindAdapter() and
BindAdapter() in succession. This was ok with VS2003 and OpenNetCF 1.4, but
with VS2005 and 2.1 the UnbindAdapter is causing the network card to
'disappear'. Is this supposed to happen, or is it a driver problem as you
suggested previously? However, taking the call to UnbindAdapter out doesn't
seem to affect the reconnection anyway!
On another (related) topic, we are sometimes getting problems when
switching WiFi connections between a printer (ad-hoc) and LAN
(infrastructure), that require the device to reboot before it will connect.
Our device supplier says that ad-hoc mode is unreliable and we shouldn't be
using it, and has suggested that I install a battery powered WiFi access
point in a vehicle and use infrastructure for the printer connection as
well. This seems to me be alot of cost/effort/complication - and we only get
the problem with his devices/WiFi cards. Is what he is saying true, or is he
just trying to fob me off with something that he knows I won't be able to do
quickly? Thanks for all your help.

Andy Baker


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:egyUh%[email protected]...
Could be that you made a registry change to the driver entries for the
card and then unbound or rebound the adapter. Could be that there was an
exception in the driver and so the device manager no longer had it loaded.
Those are the only two I can think of...

Paul T.

Andy Baker said:
I have today managed to get the problem on my system, and when I came out
of my application and looked in Network connections in CE, the network
card was no longer visible, although the card was enabled. This explains
the 'No preferred list' error, as there is not a network card, but what
would cause it to disappear from the connections list. Disabling and
re-enabling the CF slot fixed the problem, but I would like to know what
happened to cause it in the first place.

Andy Baker

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message
I think you're going to have to trap the exception in the debugger and
see where it came from. Set the debugger to stop on all exceptions and I
think it should show you the line in the SDF where it's thrown.

Paul T.

I am using the OpenNetCF 2.1 library when with a VB.NET 2005 application
to connect my CE device to a wireless printer. Occasionally when
connecting, I get the error messages AdapterException in
SetWirelessSettingsEx - 'No Preferred List Found' My code uses
SetWirelessSettingsEx to set up the connection, then BindAdapter. It has
recently been upgraded from VB.NET 2003 / OpenNetCF 1.4, and the
connecting process is much more reliable as a result, but this error
message is one that I haven't seen before. What could be causing this -
as far as I know, there is a preferred list, and I was under the
impression that SetWirelessSettingsEx would add the device to the
preferred list if it was not already in it. Thanks in advance.

Andy Baker
 
P

Paul G. Tobey [eMVP]

Hmmm. It's possible, I guess, that the unbinding is broken in one or the
other. Really, what you want is RebindAdapter(), though. You can't just
call unbind, then bind, because the unbinding doesn't complete
synchronously, so you may be calling bind before it's done unbinding and who
knows what will happen then.

I've never used ad hoc for anything but testing the occasional request, like
yours, for device-to-device direct connection. I don't think that most
people ever use it. I can't think of any reason why it would be
less-reliable, unless there are just things that Windows CE itself doesn't
handle as well, perhaps because of the less-defined nature of 'when do I
connect', and 'to whom', etc. I can't figure out why his card/device would
be any more likely to see a problem with ad hoc than any other. All of the
frequencies are the same, etc. If you can localize the problem to just his
device, that seems like enough reason to either have him fix whatever is
going on or replace his devices.

Paul T.

Andy Baker said:
I think I have found the problem. We had been getting problems reconnecting
the printer once the user had tried to print when out of range. To try and
force a reconnection, I had called the OpenNetCF UnbindAdapter() and
BindAdapter() in succession. This was ok with VS2003 and OpenNetCF 1.4, but
with VS2005 and 2.1 the UnbindAdapter is causing the network card to
'disappear'. Is this supposed to happen, or is it a driver problem as you
suggested previously? However, taking the call to UnbindAdapter out doesn't
seem to affect the reconnection anyway!
On another (related) topic, we are sometimes getting problems when
switching WiFi connections between a printer (ad-hoc) and LAN
(infrastructure), that require the device to reboot before it will
connect. Our device supplier says that ad-hoc mode is unreliable and we
shouldn't be using it, and has suggested that I install a battery powered
WiFi access point in a vehicle and use infrastructure for the printer
connection as well. This seems to me be alot of cost/effort/complication -
and we only get the problem with his devices/WiFi cards. Is what he is
saying true, or is he just trying to fob me off with something that he
knows I won't be able to do quickly? Thanks for all your help.

Andy Baker


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:egyUh%[email protected]...
Could be that you made a registry change to the driver entries for the
card and then unbound or rebound the adapter. Could be that there was an
exception in the driver and so the device manager no longer had it
loaded. Those are the only two I can think of...

Paul T.

Andy Baker said:
I have today managed to get the problem on my system, and when I came out
of my application and looked in Network connections in CE, the network
card was no longer visible, although the card was enabled. This explains
the 'No preferred list' error, as there is not a network card, but what
would cause it to disappear from the connections list. Disabling and
re-enabling the CF slot fixed the problem, but I would like to know what
happened to cause it in the first place.

Andy Baker

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
DOT com> wrote in message
I think you're going to have to trap the exception in the debugger and
see where it came from. Set the debugger to stop on all exceptions and
I think it should show you the line in the SDF where it's thrown.

Paul T.

I am using the OpenNetCF 2.1 library when with a VB.NET 2005
application to connect my CE device to a wireless printer. Occasionally
when connecting, I get the error messages AdapterException in
SetWirelessSettingsEx - 'No Preferred List Found' My code uses
SetWirelessSettingsEx to set up the connection, then BindAdapter. It
has recently been upgraded from VB.NET 2003 / OpenNetCF 1.4, and the
connecting process is much more reliable as a result, but this error
message is one that I haven't seen before. What could be causing this -
as far as I know, there is a preferred list, and I was under the
impression that SetWirelessSettingsEx would add the device to the
preferred list if it was not already in it. Thanks in advance.

Andy Baker
 

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