无线断开问题 [英] Wireless Disconnection Problem

查看:99
本文介绍了无线断开问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好:

我遇到一个问题,即我的无线连接在一段但不可预测的时间段后断开连接。 从1小时到1天的任何地方我都失去了无线连接。据我所知,问题是由于COM板上的Marvell固件和
有一天会在BSP中修复。



但是现在来解决这个问题,直到它被修复,建议我在无线连接断开时发出以下两个命令。



     ndisconfig适配器unbind wlan1

     ndisconfig adapter rebind wlan1



这一切都很好,花花公子我可以轻松创建一个程序,可以运行一个执行那些的批处理文件。 $ b两个命令,但我不想手动运行它,特别是因为这些单元在客户安装时运行。我想提供一个程序,可以在无线连接丢失时系统地执行这些命令。



理想情况下,我希望能运行一个可以测试的程序查看无线连接是否已丢失,然后在发生这种情况时运行这些命令。



我的下一个选择是定期运行这两个命令,也许每30分钟。



但在任何一种情况下,我不能发生的事情是这些命令会干扰可能发生的任何网络流量。实际的用户应用程序正在运行,这可能是在我运行这些
两个命令的同时通过网络传输数据。我猜测,如果发生这种情况,数据会丢失。



所以
b

一:

    我可以编写什么样的程序来测试无线网络是否已关闭。



两个:



    使用WaitForSingleObject类型命令可以捕获的任何类型的系统事件是否表明运行这两个命令是安全的?例如,是否存在我可以捕获的系统事件,表示系统
已空闲,比如5分钟。在捕获该事件后,我可以假设没有人使用该设备,发出这两个命令以断开连接并重新连接到无线是安全的。



我是只是寻找有关如何执行此操作的建议。



谢谢。

 

I have a problem that my wireless connection disconnects after a certain, yet unpredictable, time period.  Anywhere from 1 hour to 1 day I lose my wireless connection. From what I am told the problem is due to the Marvell firmware on the COM board and will someday be fixed in the BSP.

But for now to get around this problem until it gets fixed it was recommended that I issue the following two commands when the wireless connection gets disconnected.

    ndisconfig adapter unbind wlan1
    ndisconfig adapter rebind wlan1

This is all fine and dandy and I can easily create a program that can run a batch file that executes those
two commands but I don't want to have to manually run this, especially since these units are running at a customer installation. I want to provide a program that can systematically execute these commands when the wireless connection is lost.

Ideally I'd like to be able to run a program that can test to see if the wireless connection has been lost, and then run these commands when that happens.

My next choice would be to just run these two commands on a periodic basis, maybe every 30 minutes.

But in either case, what I can't let happen is for these commands to interfere with any network traffic that might be occurring while the actual user application is running, which could be transferring data over the network at the same time I am running these two commands. I am guessing that if that happened the data would get lost.

So

One:
    What kind of program could I write would test to see if the wireless network is down.

Two:

    Is there any kind of system event that I can capture with a WaitForSingleObject type command would indicate the it would be safe to run these two commands? For example, is there an system event I can capture that indicates that the system has been idle for lets say 5 minutes. Upon capturing that event, I could assume that no one is using the device and it is safe to issue these two commands to disconnect and reconnect to the wireless.

I am just looking for recommendations on how to do this.

Thanks.
 

推荐答案

使用这些命令的断开连接将破坏正在进行的任何通信。解除绑定适配器意味着它不再具有IP地址,因此您可以想象它的作用。最好的选择是让可能发送
或接收数据的应用程序执行操作。这样你就有机会完成"修复"。以适当的顺序发送和接收。

A disconnect using those commands will break any communication in progress. Unbinding the adapter means that it no longer has an IP address, so you can imagine what that does. The best choice is to have the application program that might be sending or receiving data perform the operation. That way you have a chance to accomplish the "fix" in appropriate ordering with sends and receives.

绑定/解除绑定操作很容易在代码中重复。您应该有一个或多个发送IOCTL_NDIS_UNBIND_ADAPTER和REBIND_ADAPTER的示例。

The bind/unbind operation is easily duplicated in code. You should have one or more samples that send IOCTL_NDIS_UNBIND_ADAPTER and REBIND_ADAPTER.

您所做的某些代码"网络启动"检测,但我不记得确切的代码。它可能位于telnet服务器中,也可能位于time-clock / SQL Server同步示例中。我记得有几种方法支持
代码和一种基于#define设置选择的方法。也许有一个系统托盘应用程序显示网络状态?这需要弄清楚连接状态。

Some piece of code you have does the "network up" detection but I can't remember exactly which code. It could be in the telnet server or maybe in the time-clock/SQL Server synchronization sample. As I recall there were several methods supported by the code and one chosen based on #define settings. Maybe there was a system tray application that showed the network status? That would need to figure out the connection state.

Paul T。


这篇关于无线断开问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆