Determining Wi-Fi Module Type
|Top Previous Next|
Since the wln. object supports two hardware modules — GA1000 and WA2000 — you app will need to know what module it is dealing with. The GA1000 and WA2000 are closely related, but they still have a number of differences (detailed in Quick Reference: WA2000 vs. GA1000). The wln.getmoduletype method allows you to check the module type.
Internally, the wln. object only needs to determine the module type once. This determination takes around one second and is performed during wln.getmoduletype or wln.boot invocation, whichever happens earlier after the hardware reset of the Wi-Fi module. Consider this example:
Finally, if wln.boot is executed first, then the module type is detected then and there:
In practice, your app will always call wln.getmoduletype first. This is because you need to know the module type before booting up the hardware.