Alguien conoce HLK-RM04, WIFI sencillo y barato para Arduino ????

Hola

24€ con Wifi via serial (parece que tiene una web embebida), más sencillo imposible. Y además ethernet. Parece muy interesante. Pero no encuentro nada por aquí. ¿Nadie lo ha probado?

¿Es que hay cosas mejores?

Estoy buscando algo para enlazar dos arduinos por el escaso rango del nrf24l01 (ni 10m), busco algo que por lo menos cubra un hogar.

Saludos,
Antonio

Es la primera vez que veo ese modulo, mira también unos "minirouters" WR703N que puedes instalares OpenWrt y se hacen bastante versátiles.

El rango del chip nRF24L01 depende, de si esta el chip a "pelo" o tiene amplificador. Busca por nRF24L01 PA LNA

PA : power amplifier
LNA : low noise amplifier

Un saludo!

Gracias por la info JRodrigo.
Al final me he pedido un PA+LNA de esos (y el necesario DC-DC de 5 a 3,3v), por ebay.

Saludos

I just got my HLK-RM04, and I can log in to the configuration page via WiFi, but I get no response when sending AT commands through the serial ports from the Arduino. I'm wondering if the HLK-RM04 needs to be in a certain mode to respond to AT commands. My Bluetooth adapter doers not respond to AT commands when there is an active BT connection.

If anyone else as tried Serial2Net function, please post your results.

I'm using the Mega 2560 and Serial3:

HLK-RM04 Arduino 2560
1 (5V in) 5V
2 (GND) GND
19 (UART RX) 14 (Serial3 TX)
20 (UART TX) 15 (Serial3 RX)

My Arduino code is here:

String command = "";

void setup() {
Serial.begin(9600); //computer side com port
while(!Serial){}
Serial.println("Type in AT commands!");

Serial3.begin(115200, SERIAL_8N1);

}

void loop() {
if (Serial3.available()){
while(Serial3.available()){
command+=(char)Serial3.read();
}
Serial.print(command);
command = "";
}

if (Serial.available()>0){
char out = Serial.read();
Serial3.print(out);
}

if(Serial.available()){
delay(100);
Serial3.write(Serial.read());
}
}

Hi Kevin07003
I am still waiting for my HLK-RM04 so no hands on

I am not sure if you are using Arduino Shield for HLK-RM04 or wired directly to Mega. So this may not be your issue but the data sheet http://www.hlktech.com/en/news.asp?tid=120 -> http://www.hlktech.com/en/news.asp?tid=120 show microcontroller need to be powered 3.3v not 5v (section 7.1). I asked http://www.aliexpress.com/store/211069 and response was 3.3v

I bought Arduino shield which I assume has some kind of level converter but with direct connection plan to use Level Converter http://www.ebay.com.au/itm/251307455684

do share results
Peter

Peter,
Sorry for the late reply. The problem I had earlier was that the datasheet from the vendor's website was for a different firmware version. On my HLK-RM04, the RX/TX pins are 20/21, not 19/20. I wrote another little sketch to just see if I could communicate with it and run some AT commands. The sketch is below. When you first run it, the HLK-RM04 is in transparent mode and everything input to the serial port goes to WiFi. Input "x" on the Arduino's serial port monitor to exit transparent mode, and there you can enter AT commands to configure the module. I remember having to play around with the Arduino serial port monitor's EOL settings to get it to work. I also seem to remember that the module would only recognize upper case AT commands (or maybe it was lower case). I didn't actually use it in my project yet, but I plan on using it by the end of 2013 or early 2014. Please let me know of your discoveries. I also plan to make a breadboard adapter PCB for it.

Kevin

String command = "";

void setup() {
  Serial.begin(9600); //computer side com port
  while(!Serial){}
  Serial.println("In transparent mode. Enter x to exit transparent mode and enter AT commands!");
  
  Serial3.begin(115200, SERIAL_8N1);
}

void loop() {
  if (Serial.available()>0){
    char out = Serial.read();
    if (out != 'x'){
      Serial3.write(out);
    }else{
      exitTransparentMode();
    }
  }
}

void serialEvent3(){
  while(Serial3.available()){
    command+=(char)Serial3.read();
  }
  Serial.print(command); 
  command = "";
}

void exitTransparentMode(){
  Serial.println("Exiting Transparent Mode...");
  delay(500);
  Serial3.write("+");
  delay(20);
  Serial3.write("+");
  delay(20);
  Serial3.write("+");
  delay(500);
  Serial3.write(0x1b);
  delay(20);
  Serial3.write(0x1b);
  delay(20);
  Serial3.write(0x1b);
  delay(20);
  Serial3.write(0x0d);//not documented, but seems to need CR here
  delay(500);
  Serial3.write("at+ver=?\r"); //not working
}

I have received couple of HLK-rm04 and so far tried these with arduino using hlk-rm04 arduino shield
Outcome is Chrome shows web screen send back from Arduino but still shows 'hour glass/waiting'. IE does not display anything, just 'hour glass/waiting'. Here is more details

I am using HLK-RM04 in Serial Net mode as TCP Server
So in browser I enter Request eg (192.168.1.99:8081) which connects -> Router->Wifi->RM04 -> Serial -> Arduino. i.e. RM-04 is connected on one side via WiFi to my router and the other to Arduino using serial pins

Arduino Code basically waits for serial data terminated with blank line (http request). Once is received it sends HTTP 200 OK response to RM-04 followed by web page to be displayed on client

Problem I have
• Chrome show OK web screen send back from Arduino but cursor is ‘hourglass/waiting’. Chrome on Android Mobile same
• Internet explorer do not display web page, it just waits…

I suspect the problem is with incorrectly formatted http 200 OK packet send back from Arduino or incorrectly formatted subsequent web page. Any suggestions would be appreciated

Debug info:
Request Received by Arduino on serial from HLK-RM04
GET / HTTP/1.1
Host: 192.168.1.99:8081
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Safari/537.36
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
<>

Response I send from Arduino via serial to HLK-rm04
HTTP/1.1 200 OK
Content-Type: text/html
Connection: close
<>

Lets go...

Hello:

In Chrome I get this http web screen, in IE nothing
Lets go...
Hello: