Wireless connections can sometimes be less straightforward than Ethernet connections. Here are a few suggestions that could help you implement a more robust wireless connection.
- Active Scan Mode - in our library, when you start the wln_start() process, one of the options is to operate in passive-scan or active-scan mode. We recommend that you always put it into active-scan mode unless there are specific reasons for using the passive-scan mode. There are two reasons behind this:
- Active-scan mode allows connection to hidden SSID.
- The connection process is faster in active-scan mode, which could lead to more stable initialization to AP with more strict timing requirements.
- Turn Keep-alive ON - In the library, there’s an option where you can enable keep-alive. This is important especially if you have an AP with a more strict association termination rule. In a lot of cases, the keep-alive feature will allow your Tibbo device to stay associated with the AP even if there is extended idle time. This is important in that when an AP disassociates a device, the TCP connection is not closed gracefully. So, it is possible that one side still thinks that it has a valid TCP connection when in truth it was already interrupted by the disassociation.
- Watch Dog - In some finicky networks, even with Keep-alive turned ON, there might still be a break in the association on an idle connection. If quick reconnection is important and you are not using either WM2000 or WS1102, which automatically handles the wireless connection process, we would recommend utilizing the sock object event “on_wln_event” to capture when the association is detected and immediately initiate the re-association.
Comments
0 comments
Please sign in to leave a comment.