**Wireless Sub Vendo** Wireless sub-vendo/coinslot uses **ESP8266** board as the controller. You can also connect LCD and keypad to the **ESP8266** board for E-loading setup. The **ESP8266** will automatically connect to the machine given that it has the correct **ssid** config and has matching **token** or **encryption key**. Connected ESP8266 devices will show in the **Sales**->**Payment Portals**->**Wireless Payment Portals ** page. Click on the edit or pencil icon on the device to show the LCD menu settings. ====== Installation ====== Please follow the steps to build your wireless sub-vendo: - **[[sub-vendo#_flash_esp8266| Flash your ESP8266 board]]** - **[[esp8266_configuration_guide#1._configure_esp8266| Configure your ESP8266]]** - **[[sub-vendo#_wiring_diagram| Wiring Diagram]]** - **[[sub-vendo#_payment_portal_settings| Payment Portal Settings]]** ===== Flash ESP8266 ===== Supported ES8266 boards: - WEMOS - NodeMCU ==== Two ways to flash: ==== - [[sub-vendo#using_pc| Using PC]] - [[sub-vendo#using_android_phone| Using Android Phone With OTG]] === Using PC === Softwares to Download: - Install [[ https://github.com/marcelstoer/nodemcu-pyflasher/releases | PyFlasher ]] - Download [[ https://drive.google.com/drive/u/3/folders/1KmsQfa8vosGkMO-e7BNSLOiIr2V8JwkU |ESP8266 Firmware ]]. Choose the latest bin file. The one suffixed with D8-reset is if you want to use D8 for physical reset button. The one suffixed with D8-buzzer is if you want to use D8 for buzzer module. After downloading the needed softwares, connect the ESP8266 Board to your PC and determine the **COM Port**. {{ :4.0.0-beta.1:pc-flash-arduino-1.png?direct&600 |}} Open **PyFlasher**. Set proper **COM PORT**. Browse the ESP8266 firmware you downloaded (__esp8266-firmware-xxxxx.bin__). Set the **Baud Rate** to __115200__. {{ :4.0.0-beta.1:pyflasher-1.png?direct&600 |}} ---- === Using Android Phone === Softwares to Download: - Install [[ https://play.google.com/store/apps/details?id=com.bluino.esploader | ESP8266 Loader ]] - Download [[ https://drive.google.com/drive/u/3/folders/1KmsQfa8vosGkMO-e7BNSLOiIr2V8JwkU |ESP8266 Firmware ]]. Choose the latest bin file. The one suffixed with D8-reset is if you want to use D8 for physical reset button. The one suffixed with D8-buzzer is if you want to use D8 for buzzer module. After downloading the needed softwares, connect the **ESP8266 Board** to your Android phone via **OTG**. Make sure you enable the OTG setting on your android. Open **ESP8266 Loader App** and tap **Allow** on the permission prompts. Then tap on the source item to select the esp8266 firmware. {{ :4.0.0-beta.1:esp8266-loader-s1.png?direct&600 |}} Tap the **green upload icon** at the right to start uploading. {{ :4.0.0-beta.1:esp8266-loader-s2.jpg?direct&600 |}} ===== Wiring Diagram ===== === Basic Diagram === Materials needed: - NodeMCU or WEMOS - Universal Coin Acceptor {{ :4.0.0-beta.1:ado-wireless-basic.pdf | Download Diagram}} {{ :4.0.0-beta.1:ado-wireless-basic.png?direct& |}} === Wiring Diagram With Keypad E-loading === Materials needed: - NodeMCU or WEMOS - Universal Coin Acceptor - Arduino Uno or Nano ([[arduino_for_keypad|Flashed with this firmware ]]) - 4×3 Membrane Keypad Module - ST7920 128×64 LCD Display Module - Bill Acceptor {{ :4.0.0-beta.1:ado-wireless.pdf | Download Diagram}} {{ :4.0.0-beta.1:ado-wireless.png?direct& |}} **Important Note**: All the modules should be in common grounds, or use common power adapter. For bill acceptor, don't directly connect the inhibit wire into the ESP8266 as it can damage your board. Use a relay to ON and Off the ground connection to the inhibit. **PIN D8** can be use for **Buzzer** or for **Physical Reset button** (use the correct binary file, suffix with D8-reset or D8-buzzer). For a **Reset Button**, connect to 3V on button press. When pin D8 is HIGH, payment que session will be cancelled same as clicking "Cancel" on the captive portal payment que. For a **Buzzer**, it usually has 3 wires 2 for power(+/-) and 1 for input which is PIN D8. Please refer to [[ :4.0.0:buzzer-module | Buzzer module guide]] ---- ===== Payment Portal Settings ===== {{:screen_shot_2020-11-29_at_7.31.51_pm.png?nolink|}} **Some wireless subvendos find it hard to connect to long WiFi SSID name and/or with special characters. Please make the Wifi SSID simple and short for the subvendo to easily connect. ** ** Also, some token character combinations will not work. If the subvendo cannot connect, try using different character combinations for the token. ** === Open (auto-accept connections) === By default, your NodeCMU is set to auto scan. It means it will automatically scan wifi ssids and attempt to connect. If this setting is turned ON, your main vendo will automatically accept the connection request from sub-vendo. You will only turn this ON for setup purposes. After the sub-vendo has connected to your main vendo, fill the **Token** field and check/tick **Automatically apply changes to connected devices** and hit **Save Changes** === Security Token === Security token is the pre-shared token by your main vendo and your sub-vendo/s. Main vendo will only accept connection request from sub-vendos if they have matching security token, unless (auto-accept connection) is enabled.