Ebay WIFI module

Rá!
I did!
Solved by changing the module configuration! The tcp link timeout was zero. Infinite time!
It was enough to put one seconds and voila!
It's working perfectly!
Thank you guys!

Good work!

There are so many details to think about when we have no library to start with. Chapeau.

:grin:
Details are complicated but very.
And just because I found nothing on the internet is that you decided to post here what I find. So is the willingness of other people. So do not have to go through what I went through and go straight to assemble your applications!

Look how cool this tutorial:HERE

And see this, imagine the things that would do for: HERE

MK

Sorry if it was long I got the right AT command sequence to get the thing going on the WIFI network. Ill will make some library in the near future that should be pretty much like the WIFI library.

Code:

+++
AT+RSTF
+++
AT+E
AT+WPRT=!0
AT+ATPT=!100
AT+SSID=!NET_SSID
AT+ENCRY=!6
AT+KEY=!1,1,password
AT+Z

the line:

AT+RSTF Is optional if you got a new module. It's there to assure that you start from factory setting.

+++ Is to set your module in AT command mode

AT+E Is to get a Echo from the module to see what you are typing and it's also optional.

AT+WPRT=!0 Is to put the module in Infra network mode, Use !1 to put in ADhoc mode

AT+ATPT=!100 Is the automatically set frame period, set it up according to your network need. For some weird reason this setting is set to 0 by default making the module unable to work correctly.

AT+SSID=!NET_SSID This is were you put your WIFI network name.

AT+ENCRY=!6 Is the encryption type you must set:

0 OPEN
1 WEP64
2 WEP128
3 WPA-PSK(TKIP)
4 WPA-PSK(CCMP/AES)
5 WPA2-PSK(TKIP)
6 WPA2-PSK(CCMP/AES)

AT+KEY=!1,1,password Is where you set the WIFI password. And it goes like this:

AT+KEY=!format,index,key

for the format, 0 = HEX, 1 = ASCII.. The index is a number from 1 to 4, and finally the Key is your WIFI password

To end this right, you must reset your module. To do this:

AT+Z

If you configured every thing well, your module should be connected to you WIFI

To know the module ip address:

+++
AT+LKSTT

AT+LKSTT Return:

**+OK=**status,ip,netmask,gateway,dns

status 0 = not connected 1 = connected
ip is you module ip address
netmask is the network mask
gateway most of the time this is your router address these days
dns is of coarse the dns that your ISP is using.

Now you have your module ip address, it should answer to ping. So

Ping -t your_module_ip

From there, you can use those command:

AT+WSCAN

It should return a list a avalable WIFI network near you this way

**+OK=**bssid,type,channel,b_encry,ssid,rssi

bssid of the routers
type is the type of network
channel is the transmission channel of the WIFI routers
b_encry is the encryption use on the network
ssid is the SSID of the WIFI routers
rssi is the signal strength of each router

the AT+WSCAN command will only work in infa network mode, so when AT+WPRT is set to 0

AT+WJOIN

Will create a ADhoc server if AT+WPRT is set to 1 or join the WIFI network setup by the above setting if AT+WPRT is set to 0. It will also return

**+OK=**bssid,type,channel,b_encry,ssid,rssi

Or

+ERR=-10

if the setting do not match.

Finally, if you want to disconnect from a WIFI network

AT+WLEAV

Return

+OK

N.B.1 The AT command standard is made in such way that it's expecting a at the end of each AT command. If the command pass well you should return +OK, or +ERR if it's not OK. It is very important to wait for the OK other way it might go wrong.

N.B.2 The "!" in the command mean SET, and the "?" mean GET. Example

AT+SSID=?

Will return the SSID that is in the SSID register of the module and

AT+SSID=!SSID_EXP

Will set SSID_EXP in to the SSID register of the module. For some reason, if you don't respect this "!?", it might or might not work when you try to configure your device.

N.B.3 This sequence should also work for the HLK-WIFI-M03 module since it use the same AT command set and procedure. But I would like some feed back from those who has this module to know if it's true or not...

There are other AT command, but to get your WIFI module connected to your WIFI network those are the one you need.

I will get back to you on how to open a socket very soon.

I just started with HLK-RM04 and if you could help me.. It is possible to make the SSID name of HLK-RM04 hidden/invisible?

Thanks

Hey Sergio, Yep, it is possible, but only if you install OpenWRT on it. Then there are full of possibility that become possible, like turning on and off the SSID announcement.

The default firmware is not as good as we could expect considering the device possibility.