Welcome! Log In Create A New Profile

Advanced

$15 serial to wifi module HLK-RM04

Posted by billyzelsnack 
$15 serial to wifi module HLK-RM04
June 09, 2013 10:10PM
This page has some good infos
[www.aliexpress.com]

Someone swapped out the firmware
[forum.openwrt.org]

Here's a little easier to order version on dx.com
[dx.com]

Here's a $25 devkit.
[www.goodluckbuy.com]

It seems like with a little work this could be quite useful for our purposes. Am I missing something?

Edited 1 time(s). Last edit at 06/09/2013 10:11PM by billyzelsnack.
Re: $15 serial to wifi module HLK-RM04
June 10, 2013 10:33AM
What purpose do you have in mind for the modules?

A couple of points to raise

Quote

Someone swapped out the firmware
[forum.openwrt.org]

Have you read the wiki about how this is done? The flash memory must be removed from the board and updated before re-soldering. Thats a pretty tricky job for most folks.

However that does not mean that the unit is useless. I have ordered a couple of dev boards from aliexpress to play around with this module. I will try and report back when I have had a chance to play. Strikes me that if you need wifi access to your printer there may be easier solutions than this one. All the control software that i have seen looks for a Com port. You would need to find a way to send the serial information via ip address.

The manual talks about the module having a transparent mode. This allows you to send serial data to the uart or rs232 interfaces. I have not yet worked out how that is done from the pc end other than it can use tcp/ip
Re: $15 serial to wifi module HLK-RM04
June 10, 2013 11:38AM
WIFI via other routes is much more heavyweight and more expensive. I think it would be interesting to see the module on a controller board. Maybe you could even set it up so you can upload firmware to the controller. If so you could get rid of FTDI chip on the controller board.

As for modifying the firmware on the module that's just cake.
Re: $15 serial to wifi module HLK-RM04
June 10, 2013 01:20PM
The module is communicated to via udp or tcp/ip. I don't know of a way to alter the tool path of say arduino or similar to output raw tcp. If there is a way to emulate a company port with a tcp socket client/server that might work.

*** Edit ***

Google is my friend

Edited 1 time(s). Last edit at 06/10/2013 01:28PM by Justblair.
Re: $15 serial to wifi module HLK-RM04
June 10, 2013 01:47PM
Looks like you can get that module on an arduino shield too.
[www.goodluckbuy.com]
Re: $15 serial to wifi module HLK-RM04
June 10, 2013 02:07PM
Holy Arduino compatible markup!

Same component count, double the price...
Re: $15 serial to wifi module HLK-RM04
July 02, 2013 09:25AM
Well the modules I ordered arrived. I have not had a lot of success with the so far confused smiley

They appear operational, I have as yet been unable to ping them as the instructions suggetst that I should be able to do. I also have been unable to communicate to them with the Arduino. My logic analyser is telling me that the Arduino is sending characters as per the sketch. So it would appear that there is some function.

I will keep trying as I get spare moment or two...
Re: $15 serial to wifi module HLK-RM04
August 11, 2013 05:38PM
Just to give you an update...

I have not had as much time to work on this I would have liked.

Here is the good news.

I can setup the module to work as a serial connection to the Arduino and talk to it over either wifi or ethernet. This is pretty good going and allows me to use these modules as connected sensors. Not only that they can extend my home wireless network as well! The Serial that they create can be spoken to using a TCP connection. So i can talk to the Arduino using Putty (As a raw connection type)

What is really cool is that I can use this HW VSP - Virtual Serial Port Application to create a Virtual Com Port that I can then talk to through a serial terminal (for instance the one in the Arduino environment)

Now for the bad news.

When pronterface (for that is what I use) connects to the printer it attempts to connect to the Arduino. As far as I can tell it expects the CTS or RTS lines to reset the Arduino and then runs some sort of handshake with the Marlin Firmware. And here i think lies the problem. The serial connection on the HLK-RM04 is a simple affair. It only has RX and TX output on its 1st serial. The documentation hints that there is a second full port. But I have not managed to interface with it so far. It is possible that it is not supported in the firm ware. There is certainly no settings exposed in the web interface that you use to set up the HLK-RM04. Therefore it never got beyond the "Connecting" dialogue. sad smiley

Unfortunately i dont know Python at all. I have scanned the code, but i can't work out how pronterface decides that it is connected or otherwise to the Arduino. It may be possible to reconfigure it so that it checks the connection differently to the printer.

I have been focussing on trying to reset an Arduino remotely so that it can be programmed wirelessly. I have managed to get it to reset a couple of times when sending long strings of text to it when I have the reset connected to pin 9 on the HLK-RM04. Pin 9 (Documented as GPIO1) i had hoped would be the DTR pin, not sure it is though. Might just be a fluke.

There does seem to be some progress with the guys who are trying to run openwrt. They look like they have a partially functioning port. The bit that definitely is not working for them is the second (full) serial port. ie the one that i want to connect to the Arduino! I will keep watching their progress.
Re: $15 serial to wifi module HLK-RM04
August 12, 2013 05:17AM
There is no technical need for auto-reset. It's more a convenience for easy firmware upload. In fact, Melzi has a jumper to turn this off.

If you don't reset, you find the controller in exactly the same state you left it the last time after reconnecting. Or in the just-after-reset state if you cut the power in between. Works fine for printing.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: $15 serial to wifi module HLK-RM04
August 12, 2013 08:34AM
Traumflug Wrote:
-------------------------------------------------------
> There is no technical need for auto-reset. It's
> more a convenience for easy firmware upload. In
> fact, Melzi has a jumper to turn this off.
>
> If you don't reset, you find the controller in
> exactly the same state you left it the last time
> after reconnecting. Or in the just-after-reset
> state if you cut the power in between. Works fine
> for printing.

Thanks for the info. You are of course correct. I had a little more time today to look at it. I remade all the connections and tried again. With a little bit of encouragement I managed to cajole the HLK-04 into life.

And guess what.... It works! Not only that but with a little port forwarding I can now control the printer from anywhere in the world! Not sure that I want to, but technically it appears possible. Great if you are on your way home I suppose. You can pre-heat the printer smiling smiley Not sure I would want my printer exposed to hackers though... Gawd only knows what prints you would come home to (Assuming they did not burn down your house!)

That is cheap web control. Thanks to the OP for bringing this one up. i will create a guide for this tonight and post it on my website.

Here is a guide to getting this up and running

Edited 1 time(s). Last edit at 08/12/2013 04:50PM by Justblair.
Re: $15 serial to wifi module HLK-RM04
August 15, 2013 10:17PM
Excellent work and nice writeup.
Re: $15 serial to wifi module HLK-RM04
August 21, 2013 04:03PM
billyzelsnack Wrote:
-------------------------------------------------------
> Excellent work and nice writeup.


Thanks, if you see anything obviously wrong please tell me. Are you going to partake in some wifi goodness?
Re: $15 serial to wifi module HLK-RM04
September 02, 2013 04:26PM
> Are you going to partake in some wifi goodness?

Yes. I am still waiting for my board to arrive.
Sorry, only registered users may post in this forum.

Click here to login