Quantcast
Channel: 1 Technophile
Viewing all articles
Browse latest Browse all 25

ADAPTATION of RF WIFI GATEWAY USB STICK

$
0
0
For this new article we will adapt a new device; the SMART RF & WIFI GATEWAY or SMART HOME MODEM (difficult to have the real name with this kind of generic product ...)

The shape of the stick and its theoretical abilities attracted me at first time in aliexpress, I was asking myself what kind of microcontroller handle the wifi and RF on this size.

A simple package with a short user manual and the USB Stick.

At the rear a link enable to download an app, but it is not the way I want to go.


If with a screw driver or a knife we open it, we can see a surprise !


It seems to have an ESP on it.

We can see also a buzzer, a button and 2 leds. At the right we see the 433mhz antenna with its decoder.

The part of the uC back that we can see looks like a lot with the back side of an ESP12

.We see also 4 small holes that remind us the kind of programming holes present on the SONOFF devices. Do they enable to flash the chip?

By checking with a multimeter and seeing the pinout we can verify that the first one is connected to GND (black), second one to RX (yellow), third one to TX (orange).
Regarding VCC power we will use a separate power supply through the USB plug.

Once this check done I connected an FTDI following this principle:

  • BOARD GND - FTDI GND
  • BOARD RX - FTDI TX
  • BOARD TX - FTDI RX
Image result for esp12e pinout

I tried to upload many times without success, after rechecking the flashing prerequisites of the ESP12 I saw that GPIO0 must be at connected to ground, and it is not the cas per default of this board.

Let's connect GPIO0 to GND and see what happens


And it is flashed!!

Let's go in deep into this flashing process:
  1. Connect the FTDI to the board and the ground to GPIO0
  2. Connect the FTDI to your computer
  3. Power the board with an external power source through USB
  4. Open your arduino IDE or platformio
  5. With platformio  type the following command:  platformiorun--targeterase
  6. With the arduino IDE :Erase flash "All flash content"  & DOUT mode
  7. And now you can flash it with OpenMQTTGateway
The board is an ESP8266, here is the configuration used with PIO in the platformio.ini file:

[env:rf-wifi-gateway]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
  ${com-esp.lib_deps}
  ${libraries.rc-switch}
  ${libraries.esp8266_mdns}
build_flags = 
  ${com-esp.build_flags}
  '-DZgatewayRF="RF"'
  '-DGateway_Name="OpenMQTTGateway_ESP8266_RF"'
  '-DRF_RECEIVER_PIN=5'
board_build.flash_mode = dout

The RF receiver use the GPIO5, after some test we can see that:
the buzzer is on GPIO15, 
the blue LED on GPIO14
the red LED on GPIO16.

But I didnt found  which pin the button is connected to ...

After some tests of sending RF signals the device doesn't seems to support it.

Indeed I can't see any dedicated circuit for sending.

Nevertheless this ESP8266 board with an integrated RF receiver is quite interesting and fully compatible with OpenMQTTGateway.


Viewing all articles
Browse latest Browse all 25

Trending Articles