WA1000 not seen on WLAN.
Hi there
I'm puzzled about WA1000, I have a dual interface program, using WLN or NET interfaces. If I chose NET everything is OK, while if I chose WLN it doesn't comunicate. I'm able to see that Association is correct, the wln.scan function returns my network SSID, but I'm not able to ping the WA1000, here is the initialization code for my program:
io.num=PL_IO_NUM_51
io.enabled=YES
io.state=LOW
'WLN CS mapping -- do this before enabling power
wln.csmap=PL_IO_NUM_49
io.num=PL_IO_NUM_49
io.state=HIGH
io.enabled=YES
settings_parse
nomewifi=setting_get("WN")
passwifi=setting_get("WP")
passwifi="" 'this is the password for WEP
' nomewifi="" 'commenting this line the program uses the ethernet NIC otherwise the WIFI
if nomewifi<>"" then
wln.mac="2.0.1.35.34.1"
wln.buffrq(3)
romfile.open("wln_fwar.bin")
if wln.boot(romfile.offset)= NO then
pat.play("~R---------------",PL_PAT_CANINT)
end if
While wln.task<>PL_WLN_TASK_IDLE
Wend
if wln.enabled=NO then
pat.play("~R---------------",PL_PAT_CANINT)
end if
select case len(passwifi)
case 0
wln.wepmode =PL_WLN_WEP_MODE_DISABLED
case 10
wln.wepmode =PL_WLN_WEP_MODE_64
case 26
wln.wepmode =PL_WLN_WEP_MODE_128
end select
if len(passwifi)>0 then
wln.wepkey1=passwifi
wln.wepkey2=passwifi
wln.wepkey3=passwifi
wln.wepkey4=passwifi
wln.setwep
end if
While wln.task<>PL_WLN_TASK_IDLE
Wend
end if
if nomewifi="" then
net.ip = setting_get("IP")
net.gatewayip = setting_get("GI")
net.netmask = setting_get("NM")
else
wln.ip = setting_get("IP") '192.168.1.19
wln.gatewayip = setting_get("GI") '192.168.1.1
wln.netmask = setting_get("NM") '255.255.255.0
wln.scan("")
While wln.task<>PL_WLN_TASK_IDLE
Wend
passwifi=wln.scanresultssid 'just to see if we get the SSID (and see in DEBUG MODE
wln.ssid=nomewifi
wln.settxpower(255)
while wln.task<>PL_WLN_TASK_IDLE
wend
wln.bssmode=PL_WLN_BSS_MODE_INFRASTRUCTURE
'wln.defaultibsschannel=6
wln.associate
While wln.task<>PL_WLN_TASK_IDLE
Wend
If wln.associationstate=PL_WLN_NOT_ASSOCIATED Then
pat.play("R-B-R~",PL_PAT_CANINT)
exit sub
end if
end if
sock.num=SOCK_LS
sock.allowedinterfaces="NET,WLN"
pat.play("~G-G-------------",PL_PAT_CANINT)
ser.flowcontrol=DISABLED
ser.mode=PL_SER_MODE_UART
ser.txbuffrq(2)
ser.rxbuffrq(2)
sock.txbuffrq(4)
sock.rxbuffrq(4)
sock.cmdbuffrq(1) 'buffer for incoming inband commands
sock.rplbuffrq(1) 'buffer for outgoing inband replies
sock.tx2buffrq(4)
sock.protocol=PL_SOCK_PROTOCOL_TCP
' sock.targetip=setting_get("DI") ' Get IP setting here
' sock.targetport=val(setting_get("DP"))
sock.inbandcommands=YES
sock.escchar=255
sock.endchar=13
sock.connectiontout=val(setting_get("CT")) * 60 * 2
sock.inconmode=PL_SOCK_INCONMODE_ANY_IP_ANY_PORT
sock.localportlist=setting_get("PN")
sock.reconmode=PL_SOCK_RECONMODE_3
sock.num=SOCK_UDP
sock.allowedinterfaces="NET,WLN"
sock.txbuffrq(1)
sock.rxbuffrq(1)
sock.protocol=PL_SOCK_PROTOCOL_UDP
sock.localportlist="65535"
sock.inconmode=PL_SOCK_INCONMODE_ANY_IP_ANY_PORT
sock.reconmode=PL_SOCK_RECONMODE_3
sock.acceptbcast=YES
sys.buffalloc
'******END ------------------------------------
Regards and thanks
Mauro
I'm puzzled about WA1000, I have a dual interface program, using WLN or NET interfaces. If I chose NET everything is OK, while if I chose WLN it doesn't comunicate. I'm able to see that Association is correct, the wln.scan function returns my network SSID, but I'm not able to ping the WA1000, here is the initialization code for my program:
io.num=PL_IO_NUM_51
io.enabled=YES
io.state=LOW
'WLN CS mapping -- do this before enabling power
wln.csmap=PL_IO_NUM_49
io.num=PL_IO_NUM_49
io.state=HIGH
io.enabled=YES
settings_parse
nomewifi=setting_get("WN")
passwifi=setting_get("WP")
passwifi="" 'this is the password for WEP
' nomewifi="" 'commenting this line the program uses the ethernet NIC otherwise the WIFI
if nomewifi<>"" then
wln.mac="2.0.1.35.34.1"
wln.buffrq(3)
romfile.open("wln_fwar.bin")
if wln.boot(romfile.offset)= NO then
pat.play("~R---------------",PL_PAT_CANINT)
end if
While wln.task<>PL_WLN_TASK_IDLE
Wend
if wln.enabled=NO then
pat.play("~R---------------",PL_PAT_CANINT)
end if
select case len(passwifi)
case 0
wln.wepmode =PL_WLN_WEP_MODE_DISABLED
case 10
wln.wepmode =PL_WLN_WEP_MODE_64
case 26
wln.wepmode =PL_WLN_WEP_MODE_128
end select
if len(passwifi)>0 then
wln.wepkey1=passwifi
wln.wepkey2=passwifi
wln.wepkey3=passwifi
wln.wepkey4=passwifi
wln.setwep
end if
While wln.task<>PL_WLN_TASK_IDLE
Wend
end if
if nomewifi="" then
net.ip = setting_get("IP")
net.gatewayip = setting_get("GI")
net.netmask = setting_get("NM")
else
wln.ip = setting_get("IP") '192.168.1.19
wln.gatewayip = setting_get("GI") '192.168.1.1
wln.netmask = setting_get("NM") '255.255.255.0
wln.scan("")
While wln.task<>PL_WLN_TASK_IDLE
Wend
passwifi=wln.scanresultssid 'just to see if we get the SSID (and see in DEBUG MODE
wln.ssid=nomewifi
wln.settxpower(255)
while wln.task<>PL_WLN_TASK_IDLE
wend
wln.bssmode=PL_WLN_BSS_MODE_INFRASTRUCTURE
'wln.defaultibsschannel=6
wln.associate
While wln.task<>PL_WLN_TASK_IDLE
Wend
If wln.associationstate=PL_WLN_NOT_ASSOCIATED Then
pat.play("R-B-R~",PL_PAT_CANINT)
exit sub
end if
end if
sock.num=SOCK_LS
sock.allowedinterfaces="NET,WLN"
pat.play("~G-G-------------",PL_PAT_CANINT)
ser.flowcontrol=DISABLED
ser.mode=PL_SER_MODE_UART
ser.txbuffrq(2)
ser.rxbuffrq(2)
sock.txbuffrq(4)
sock.rxbuffrq(4)
sock.cmdbuffrq(1) 'buffer for incoming inband commands
sock.rplbuffrq(1) 'buffer for outgoing inband replies
sock.tx2buffrq(4)
sock.protocol=PL_SOCK_PROTOCOL_TCP
' sock.targetip=setting_get("DI") ' Get IP setting here
' sock.targetport=val(setting_get("DP"))
sock.inbandcommands=YES
sock.escchar=255
sock.endchar=13
sock.connectiontout=val(setting_get("CT")) * 60 * 2
sock.inconmode=PL_SOCK_INCONMODE_ANY_IP_ANY_PORT
sock.localportlist=setting_get("PN")
sock.reconmode=PL_SOCK_RECONMODE_3
sock.num=SOCK_UDP
sock.allowedinterfaces="NET,WLN"
sock.txbuffrq(1)
sock.rxbuffrq(1)
sock.protocol=PL_SOCK_PROTOCOL_UDP
sock.localportlist="65535"
sock.inconmode=PL_SOCK_INCONMODE_ANY_IP_ANY_PORT
sock.reconmode=PL_SOCK_RECONMODE_3
sock.acceptbcast=YES
sys.buffalloc
'******END ------------------------------------
Regards and thanks
Mauro
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
Loading Profile...


