GithubHelp home page GithubHelp logo

wifirm04's Introduction

WiFiRM04 Library

WiFiRM04 library is an Arduino WiFi library for Hi-Link HLK-RM04 module. (http://www.hlktech.com/en/productshow.asp?id=142) This library is compatible with Arduino WiFi library and all examples of Arduino WiFi library could be compiled with this library with just a little modification.

Currently, this library doesn't support UDP feature and assign a static IP in client mode.

All features are tesed with firmware V1.78 and I have no idea if they could work with older firmware.

How to Install

  1. Download the WiFiRM04 library source.
  2. In the Arduino IDE, go to the Sketch -> Import Library... -> Add Library...
  3. Find the directory that contains the WiFiRM04 library source, and open it
  4. Check if you could see "WiFiRM04" under Sketch -> Import Library...

How to Use

Since this library is compatible with Arduino WiFi library, you could check Arduino web site to learn how to use it. (http://arduino.cc/en/Reference/WiFi)

Configuration

First and most important, MUST modify Arduino's serial driver to increase Rx buffer size or add hardware flow control support, because HLK-RM04 will try to output all data at once. If Rx buffer of your serial port is too small(or no hardware flow control support), you will lose those data.

By default, this library will use two UARTs to communicate with HLK-RM04 module. (firmware V1.78 can support two UARTs) If you don't want to use second UART of HLK-RM04, just modify utility/wl_definitions.h and change the definition of MAX_SOCK_NUM to 1. (but the second serial port will still be initialized in utilit/at_drv.cpp)

The serial ports I used are Serial1 and Serial2, you could change them by modifying utilit/at_drv.cpp and change the definition of AT_DRV_SERIAL and AT_DRV_SERIAL1.

Strongly suggest to use ES/RST pin to enter the AT command mode, but if you still want to change mode by sending specific serial data over serial port, just modify utilit/at_drv.cpp and mark #define USE_ESCAPE_PIN.

Others like baud rate and the GPIO used to pull ES/RST pin could be found in the from of utilit/at_drv.cpp. You could understand their usage by checking the source and comments.

Other Resources

User manual of HLK-RM04 module. (http://www.hlktech.net/inc/lib/download/download.php?DId=19)

This user manual doesn't contain the AT commands of lateset official firmware. (V1.78) You could find more useful information from the OpenWrt forum. (https://forum.openwrt.org/viewtopic.php?id=42142)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.