Wiffi210/v2.2 connection & disconnection (urgent)

What is the proper way of disconnecting from a Network??
I set up my WIFI-module as a server, with these commands:
Connect to WiFi-network:");
AT+WWPA=password
Disable DHCP:\n");
AT+NDHCP=0
set module Ip-Address and Gateway IP:\n");
AT+NSET=192.168.1.1,255.255.255.0,192.168.1.2
set Wifi-parameters for auto-connect:");
AT+WAUTO=2,MYadhocNetwork,,0
Connect:
ATA
Connection is made...
Now i want to disconnect again.
Sending AT+WD (According to the manual), but the module is in-responsive. Do i need to send another command to get it out of data mode or something similar?
Note: i want to disconnect via command, and not via pressing a resetbutton!!
Question#2:
If i connect my computer to the adhoc-network first, it says "waiting for user". As soon as i connect the WIFI-module (with ATA), the connection is made and the computer says "connected".
But if i connect the module first and then the computer, no connection is made. The computer says "waiting for user..." and nothing happens.
Any ideas?
i could use the AT+PING command to see when the computer is connected, but how do i force a connection?
I set up my WIFI-module as a server, with these commands:
Connect to WiFi-network:");
AT+WWPA=password
Disable DHCP:\n");
AT+NDHCP=0
set module Ip-Address and Gateway IP:\n");
AT+NSET=192.168.1.1,255.255.255.0,192.168.1.2
set Wifi-parameters for auto-connect:");
AT+WAUTO=2,MYadhocNetwork,,0
Connect:
ATA
Connection is made...
Now i want to disconnect again.
Sending AT+WD (According to the manual), but the module is in-responsive. Do i need to send another command to get it out of data mode or something similar?
Note: i want to disconnect via command, and not via pressing a resetbutton!!
Question#2:
If i connect my computer to the adhoc-network first, it says "waiting for user". As soon as i connect the WIFI-module (with ATA), the connection is made and the computer says "connected".
But if i connect the module first and then the computer, no connection is made. The computer says "waiting for user..." and nothing happens.
Any ideas?
i could use the AT+PING command to see when the computer is connected, but how do i force a connection?
2013-12-28 05:07:44 Thanx Grey,
But i've already managed to switch between the data-command modes ( i think i mentioned that earlier!?).
You just send "+++" to exit data-mode. The key here is as you wrote, one have to wait at least 1 sec before sending anything else to the module.
When exititing the data-mode, the connection is still active, but no longer recieves data from the WIFI.
To disconnect, use ATH (or AT+WD).
to get back to data-mode again, use ATA
Now... my problem is my Question#2 in my first post.
I MUST connect the PC to the adhoc network first, and then the WIFI-module. Otherwise i will never get a connection.
I need a way to find out when the pc is connected and ("waiting for user") as it says. Then i just do a ATA and the connection is made. Or, simply force the pc to connect to the WIFI-module... some way.
One way would be:
Setup the module
connect to the adhoc-network
if no HTTP-request comes in within X seconds, exit data-mode
send ping to see if pc is connected. If not, wait and send more pings.
As soon as the pc starts to respond to the pings (is connected).... enter data-mode again via ATA.
This would work (havn't tried it yet), but there must be easier way of doing this..!?
/H
hobbex
But i've already managed to switch between the data-command modes ( i think i mentioned that earlier!?).
You just send "+++" to exit data-mode. The key here is as you wrote, one have to wait at least 1 sec before sending anything else to the module.
When exititing the data-mode, the connection is still active, but no longer recieves data from the WIFI.
To disconnect, use ATH (or AT+WD).
to get back to data-mode again, use ATA
Now... my problem is my Question#2 in my first post.
I MUST connect the PC to the adhoc network first, and then the WIFI-module. Otherwise i will never get a connection.
I need a way to find out when the pc is connected and ("waiting for user") as it says. Then i just do a ATA and the connection is made. Or, simply force the pc to connect to the WIFI-module... some way.
One way would be:
Setup the module
connect to the adhoc-network
if no HTTP-request comes in within X seconds, exit data-mode
send ping to see if pc is connected. If not, wait and send more pings.
As soon as the pc starts to respond to the pings (is connected).... enter data-mode again via ATA.
This would work (havn't tried it yet), but there must be easier way of doing this..!?
/H

2013-12-28 01:21:06 I got a good idea.
GPIO29 button can change the status of the module.
it realize the change via the hardware connect.
If we connect GPIO29 to one pin (eg P12). And in void setup()
set the pin to high value; when you want to change another mode.
just need "digitalWrite(12, LOW)"
then we can make a software switch
What do you think?
Grey.CC
GPIO29 button can change the status of the module.
it realize the change via the hardware connect.
If we connect GPIO29 to one pin (eg P12). And in void setup()
set the pin to high value; when you want to change another mode.
just need "digitalWrite(12, LOW)"
then we can make a software switch
What do you think?

2013-12-27 20:19:48 Thank you, hobbe
I have checked the manual
[quote]AT+XEHT=2,1,0,3 (HW Trigger-GPIO29, ButtonAction-GPIO21)
But when you use GPIO29(GPIO10) for data/command mode transition, there should be no
UART input in 300mS before and after sending signal to GPIO29(GPIO10) for mode
transition time and buffer processing time.
[/quote]
I have tried this command, but it didn't back to the command mode
And why you need to use PING command?
I remember PING is used to check whether the net is work or not.
You said you use Mega 2560 as the MCU.
It is a good idea to make connect function. Every time ,after you have used "PING" let the arduino to connect automatically.
Grey.CC
I have checked the manual
[quote]AT+XEHT=2,1,0,3 (HW Trigger-GPIO29, ButtonAction-GPIO21)
But when you use GPIO29(GPIO10) for data/command mode transition, there should be no
UART input in 300mS before and after sending signal to GPIO29(GPIO10) for mode
transition time and buffer processing time.
[/quote]
I have tried this command, but it didn't back to the command mode
And why you need to use PING command?
I remember PING is used to check whether the net is work or not.
You said you use Mega 2560 as the MCU.
It is a good idea to make connect function. Every time ,after you have used "PING" let the arduino to connect automatically.

2013-12-27 04:33:45 Hi Grey,
I'm building a "hand-unit" for a customer.
It consists of a CPU (Arduino Mega during development), and Touch LCD, an Bluetooth dongle and a WIFI-module.
The idea is that a user can read some measurement values from a mikrometer over the bluetooth. An Supervisor can then communicate with the hand-unit in the background and download a table + CSV-file with all the data.
That's all i can say without breaking the confidential-agreement with my customer.
Since i'm working in ad-hoc mode, the hand-unit is the server and the Supervsor-PC is the client.
The server has the IP:192.168.1.1 and the client :192.168.1.2
The connection and the HTTP-communication is working fine (in Chrome at least, still having issues in IExplorer). Me and Jose worked together on that one and managed to solve it in the end. We more or less built a Web-server where the CPU does all the hard work.
Got an answer from Wiznet: It is NOT possible to send AT-commands during data-mode, so the ping-command is kind of useless in my case.
I have to exit the data-mode, send the ping and then connect again.
Merry Christmas to you to.
[quote="Grey"]
Thank you.
Would you mind telling your project?
I mean what are you trying to accomplish and with what exact hardware?
I saw your gateway is "192.168.1.2"? And ip address is "...1.1"? Is that right?
Do you succeed in connecting the network?
Anyway, Merry Christmas!
[/quote]
hobbex
I'm building a "hand-unit" for a customer.
It consists of a CPU (Arduino Mega during development), and Touch LCD, an Bluetooth dongle and a WIFI-module.
The idea is that a user can read some measurement values from a mikrometer over the bluetooth. An Supervisor can then communicate with the hand-unit in the background and download a table + CSV-file with all the data.
That's all i can say without breaking the confidential-agreement with my customer.
Since i'm working in ad-hoc mode, the hand-unit is the server and the Supervsor-PC is the client.
The server has the IP:192.168.1.1 and the client :192.168.1.2
The connection and the HTTP-communication is working fine (in Chrome at least, still having issues in IExplorer). Me and Jose worked together on that one and managed to solve it in the end. We more or less built a Web-server where the CPU does all the hard work.
Got an answer from Wiznet: It is NOT possible to send AT-commands during data-mode, so the ping-command is kind of useless in my case.
I have to exit the data-mode, send the ping and then connect again.
Merry Christmas to you to.
[quote="Grey"]
Thank you.
Would you mind telling your project?
I mean what are you trying to accomplish and with what exact hardware?
I saw your gateway is "192.168.1.2"? And ip address is "...1.1"? Is that right?
Do you succeed in connecting the network?
Anyway, Merry Christmas!
[/quote]

2013-12-26 02:05:51 Thank you.
Would you mind telling your project?
I mean what are you trying to accomplish and with what exact hardware?
I saw your gateway is "192.168.1.2"? And ip address is "...1.1"? Is that right?
Do you succeed in connecting the network?
Anyway, Merry Christmas!
Grey.CC
Would you mind telling your project?
I mean what are you trying to accomplish and with what exact hardware?
I saw your gateway is "192.168.1.2"? And ip address is "...1.1"? Is that right?
Do you succeed in connecting the network?
Anyway, Merry Christmas!

2013-12-26 01:23:00 [quote="Grey"]
Sorry, Hobbex
Jose is on Christmas Holiday,
I am repeating your project.
But I am not very familiar with this module,
Please be more patient.
Thank you
[/quote]
Thanx Grey,
I'll try to get some support from Wiznet meanwhile.
I have a big deadline coming up 2/1, so it's hard to be patient! :)
Let me know if you find anything though. I'll continue trying on my own aswell.
hobbex
Sorry, Hobbex
Jose is on Christmas Holiday,
I am repeating your project.
But I am not very familiar with this module,
Please be more patient.
Thank you
[/quote]
Thanx Grey,
I'll try to get some support from Wiznet meanwhile.
I have a big deadline coming up 2/1, so it's hard to be patient! :)
Let me know if you find anything though. I'll continue trying on my own aswell.

2013-12-26 01:04:35 Sorry, Hobbex
Jose is on Christmas Holiday,
I am repeating your project.
But I am not very familiar with this module,
Please be more patient.
Thank you
Grey.CC
Jose is on Christmas Holiday,
I am repeating your project.
But I am not very familiar with this module,
Please be more patient.
Thank you

2013-12-26 01:03:10 Nevermind.. i solved it.
I had to issue a AT+XDUM=0 command first to enable UART-messages.
Then, the +++ works.
The question with AT+PING= is still not solved though.
How can i send ping in connected/data mode (server-mode + adhoc) when the module is not listening to the UART commands (despite of AT+XDUM=0-command). In order to get the Ping to work, i have to exit data-mode, whereas the connection is broken.
hobbex
I had to issue a AT+XDUM=0 command first to enable UART-messages.
Then, the +++ works.
The question with AT+PING= is still not solved though.
How can i send ping in connected/data mode (server-mode + adhoc) when the module is not listening to the UART commands (despite of AT+XDUM=0-command). In order to get the Ping to work, i have to exit data-mode, whereas the connection is broken.

2013-12-26 00:44:34 The manual says:
The serial host may gain control of the interface by issuing the escape sequence “+++”,
followed by a one-second gap where no characters are received on the serial port. When
this sequence is encountered, the Adapter exits data mode and resumes command
processing. The host then makes changes in the network configuration or other parameters...
I can't get this to work. Nothing happens when i try to send UART-commands in data-mode.
Btw: where is Jose? I've bought over 10pcs of v2.2 just because of his great support and his service-mind! Nowadays, you guys won't even answer the support-emails nor giving proper responses in here! That sucks!
hobbex
The serial host may gain control of the interface by issuing the escape sequence “+++”,
followed by a one-second gap where no characters are received on the serial port. When
this sequence is encountered, the Adapter exits data mode and resumes command
processing. The host then makes changes in the network configuration or other parameters...
I can't get this to work. Nothing happens when i try to send UART-commands in data-mode.
Btw: where is Jose? I've bought over 10pcs of v2.2 just because of his great support and his service-mind! Nowadays, you guys won't even answer the support-emails nor giving proper responses in here! That sucks!
