User Tools

Site Tools


arduino:wio-setup-en

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
arduino:wio-setup-en [2020/04/01 10:41] – [Display] rjversluisarduino:wio-setup-en [2024/04/07 11:14] (current) – [CAN] rjversluis
Line 1: Line 1:
 +[[:english|{{ :hardware.png}}]][[:english|{{ :rocrail-logo-35.png}}]]
 [[:arduino:wio-setup-fr|{{ icons:fr.png|French Version}}]][[:arduino:wio-setup-de|{{ icons:de.png|Deutsche Version}}]][[:arduino:wio-setup-en|{{ icons:uk.png|English Version}}]] [[:arduino:wio-setup-fr|{{ icons:fr.png|French Version}}]][[:arduino:wio-setup-de|{{ icons:de.png|Deutsche Version}}]][[:arduino:wio-setup-en|{{ icons:uk.png|English Version}}]]
 ======WIO - Setup====== ======WIO - Setup======
-[[:english|{{ :hardware.png}}]][[:english|{{ :rocrail-logo-35.png}}]] +[[:wio:overview-en|{{ :wio:wiologo.png}}]] 
-[[:english|Content]] -> [[:hardware-en#arduino|Arduino]] +**[[:wio:overview-en|WIO Overview]]** 
-  * [[:arduino:wio-overview-en|WIO Overview]] **[[:arduino:wio-setup-en|WIO Setup]]** | [[:arduino:wioctrl-en|WIO Control]] | [[:arduino:amp-en|User Bitmaps]] | [[:arduino:wio-en|WIO Firmware]] | [[:arduino:wio-cam-en|WIO CAM]]+  * **[[:arduino:wio-setup-en|WIO Setup]]** | [[:arduino:wioctrl-en|WIO Control]] | [[:arduino:amp-en|User Bitmaps]] | [[:arduino:wio-en|WIO Firmware]] | [[:wio:wio-ledscript-en|LEDScript]]
  
  
Line 15: Line 16:
   * This documentation is based on WIO 1.x firmware.   * This documentation is based on WIO 1.x firmware.
  \\  \\
 +<html><a name="query"/></html>
 =====Query===== =====Query=====
 With a query all active WIO devices will respond with there ID, Type and configuration.\\ With a query all active WIO devices will respond with there ID, Type and configuration.\\
-{{:arduino:wio-query-en.png?800}}\\+{{:arduino:wio-query-en.png?801}}\\
 ====Set==== ====Set====
 With the Set button the ID, name and Type can be changed.\\ With the Set button the ID, name and Type can be changed.\\
 ^ Type ^ Functions ^ ^ Type ^ Functions ^
-RIC | Throttle |+Control | Throttle using short IDs |
 | LED | 32 I2C I/O and FastLED | | LED | 32 I2C I/O and FastLED |
 | SERVO | 32 I2C I/O and Servos | | SERVO | 32 I2C I/O and Servos |
 | RFID | 32 I2C I/O and RFID | | RFID | 32 I2C I/O and RFID |
-| DCC | 32 I2C I/O and DCC |+| DCC | 32 I2C I/O and DCC CS or Booster |
 | Mobile | 32 I2C I/O and PWM to control a H-Bridge or RC ESC | | Mobile | 32 I2C I/O and PWM to control a H-Bridge or RC ESC |
-| CAM | ESP32-CAM board support, no I/O possible. | 
 | CAN | WiFi-TCP interface between 250kb CAN and Rocrail on port 5550 | | CAN | WiFi-TCP interface between 250kb CAN and Rocrail on port 5550 |
 +| Ext | ESP32: CANIO + LED + SERVO + RFID |
 +| S88 | Märklin sensor bus |
 +| IO16 | All-rounder |
  
 ====Reboot==== ====Reboot====
 Reboots the selected WIO module.\\ Reboots the selected WIO module.\\
  
 +
 +====DeepSleep/Shutdown====
 +Shutdown the selected WIO module.\\
 +All WIO modules will shutdown in case the **All** option is selected.\\
 +
 +
 +
 +====Report====
 +{{ :arduino:wio-report.jpg?200}}
 +A usage report is generated for all WIO modules in the query.\\
 +The default program wil be started to view the CSV file.\\
  
 ====WEB Browser==== ====WEB Browser====
Line 41: Line 56:
 http://<IP>:8081/stream http://<IP>:8081/stream
 </code> </code>
 + \\
 +
 +====Show====
 +The selected WIO will flash its LED faster until the Show command is send again by pushing this button.\\
 +
 + \\
 +=====WIO Type=====
 ====CAN==== ====CAN====
 {{ :arduino:wio-mbus-can-en.png?200}} {{ :arduino:wio-mbus-can-en.png?200}}
 The extra service on port 5550 can be used to communicate with a CAN bus like MBUS.\\ The extra service on port 5550 can be used to communicate with a CAN bus like MBUS.\\
 A power off command is send to CAN if the WiFi or Rocrail connection is lost.\\ A power off command is send to CAN if the WiFi or Rocrail connection is lost.\\
-====OTA==== 
-Put the selected WIO module in OTA mode for updating the firmware over the air.\\ 
    
  \\  \\
 +<html><a name="setup"/></html>
 =====Setup===== =====Setup=====
-{{:arduino:wio-wio-en.png}}\\+{{:arduino:wio-wio-en.png?800}}\\ 
 +====Pulse==== 
 +Count of 100ms for setting the output pulse length.\\ 
 +Also used for dual coil switch motors.\\ 
 + 
 ====Serial==== ====Serial====
 The RX/TX pins on the ESP8266 are the same as used by the serial monitor.\\ The RX/TX pins on the ESP8266 are the same as used by the serial monitor.\\
Line 77: Line 103:
 It will power off automatically in case no DCC signal is detected.\\ It will power off automatically in case no DCC signal is detected.\\
  
-===RailCom cutout=== +===RailCom=== 
-Enable the cutout to enable RailCom.\\+Enable RailCom cutout in the preamble and idle packet.\\ 
 +Disable this option in case none RailCom decoders are used.\\ 
  
 +===Fast PT===
 +Only one packet stream instead of 4 x reset plus 6 x program are send to the PT.\\
 +**Note:** Not all decoders will accept this none NMRA conform sequence.\\
  \\  \\
 ====Mobile servo PWM==== ====Mobile servo PWM====
-  * ESC PWMIn case of WIO Mobile, this option will set servo compatible PWM on the D5 pin, which can be used to connect a RC ESC. (Electronic Speed Control)+===ESC PWM=== 
 +In case of WIO Mobile, this option will set servo compatible PWM on the D5 pin, which can be used to connect a RC ESC. (**E**lectronic **S**peed **C**ontrol)\\
  
  \\  \\
Line 98: Line 129:
 Put WIO Control into deep sleep after a time out of x minutes.\\ Put WIO Control into deep sleep after a time out of x minutes.\\
 ===Synchronize=== ===Synchronize===
-Synchronize locomotive and function field events.\\+Synchronize speed and function field events. __Disable in case of a slow network to avoid slider jumping.__\\ 
 +:!: This option will only work well in case the used Command Station reports speed changed at once. In all other cases the WIO-Control cannot set the loco speed.\\
  
  \\  \\
-====Board==== + 
-The board layout is automatically selected in case the selections does not fit to the architecture.\\ + 
-Only architecture ESP32 can be of different layouts.\\+====Stepmotor==== 
 +3 Wire Fast uses a timer interrupt for a higher stepper frequency.\\ 
 +Check the USERCNF.h for settings.\\
  
  \\  \\
-====CAM==== 
-Select the desired camera stream framing size.\\ 
-The WIO CAM must be rebooted to make this selection active.\\ 
  
 +====CAN====
 +===I/O===
 +  * For WIO-02 with an ESP32. See also: [[:arduino:wio-en#esp321|CAN Tx/Rx]].
 +  * [[:wio:wiopico-io16can-en|Pico CAN]]
 +===USB-Bridge===
 +Interfacing between USB and CAN.
 +  * RCAN bps=250000
 +  * MCAN bps=500000
 +===Pico CAN===
 +Option for the [[:wio:wiopico-io16can-en|WIO-Pico-CAN]] PCB to get the right pin mapping and 20MHz MCP2515 crystal.\\
  \\  \\
 +
 ====Set==== ====Set====
 With the Set button the pulse length, options and the selected I2C field can be changed.\\ With the Set button the pulse length, options and the selected I2C field can be changed.\\
  \\  \\
 +
 +
 + \\
 +<html><a name="maintenance"/></html>
 +=====Maintenance=====
 +Setup the basic connections can be done on this tab:\\
 +{{:arduino:wiosetup-maintenance-en.png?600}}\\
 +  - Plug in the ESP/PicoW cable into an USB port on the computer
 +  - **Query devices**
 +  - Select the ESP/PicoW USB device from the list
 +  - **Connect**
 +  - Type in the connection parameters and push **Set**
 +
 +The WIO is ready for use.\\
 +
 +**Note 1:** Automatic Server needs an active __**[[:networking-en#setup|R2RNet]]**__.\\
 +**Note 2:** The Identify Number must be set unique among all WIO's.\\
 +
 +====Query Devices====
 +Query serial USB devices, and try to preselect one.\\
 +Click on Connect after selecting the right device to be able to communicate with the ESP/Pico.\\
 +**Note:** //Under Windows serial devices are scanned up to COM20. Higher COM ports can be typed in manually in this field.//\\
 +====Connect====
 +Try to make a 115200 baud connection with the selected serial device.\\
 +__**Notes:**__ 
 +  * //Make sure the user is in the [[:faq-en#serial_device_user_access_linux|dialout group]] to be able to connect ot the serial device.// 
 +  * //If some other process(Arduino IDE Monitor) has already a connection with the selected device, it is not possible todo the Maintenance.//
 +====DTR====
 +Activates the "Data Terminal Ready" to signal the connected microcontroller that it can send data.\\
 +//This option is temporare and should be left checked.//\\
 +
 +====Disconnect====
 +Disconnect from the serial device. This will be done automatically on closing the WIO Setup dialog.\\
 + \\
 +====WLAN====
 +===Name===
 +SSID name, without blanks, to use for the WiFi connection.\\
 +Max. length is 32 characters incl. the zero termination.\\
 +:!: //Only **[[https://en.wikipedia.org/wiki/ASCII|7 bit ASCII]]** is supported.//\\
 +===Scan===
 +Let the connected WIO module search for available networks. This will fill up the Name combobox.\\
 +===Password===
 +The password for the selected SSID name without blanks. Activating the checkbox will makes the password readable.\\
 +Max. length is 32 characters incl. the zero termination.\\
 +:!: //Only **[[https://en.wikipedia.org/wiki/ASCII|7 bit ASCII]]** is supported.//\\
 +===Set===
 +Sends the SSID name and password to the connected WIO module.\\
 +
 + \\
 +====Server====
 +===Name=== 
 +The DNS name or IP address of the Rocrail server.\\
 +===Automatic===
 +Use UDP Multicast, R2RNet, to find a Rocrail server.\\
 +:!: //Multicast must be enabled in the network router to be able to find the Rocrail server automatically.//\\
 +===R2RNet===
 +User besides TCP also UDP Multicast for RASCII communication. (WIP)\\
 +===Set===
 +Sends the server name to the connected ESP.\\
 +
 + \\
 +====Identity & Type====
 +===Number===
 +Unique node ID.\\
 +===Name===
 +Optional node name.\\
 +===Type===
 +WIO main function.\\
 +===Set===
 +Sends the ID and type to the connected ESP.\\
 +===Export===
 +Export settings in a CSV file.\\
 +===Import===
 +Import settings from a CSV file.\\
 +
 + \\
 +==== ? ====
 +Refresh the terminal with the ?<enter> command.\\
 +
 + \\
 +==== I/O ====
 +Port usage.\\
 +===Set===
 +Sends the port usage to the connected ESP.\\
 +
 + \\
 +====Debug/Info====
 +Switch between Info and Debug trace level.\\
 +
 + \\
 +====SoD====
 +Sends a start of day command to the connected ESP.\\
 +
 + \\
 +====Reset====
 +Reset the part of the Flash memory on which the WIO configuration is located.\\
 +**Tip:** //Use this if the ESP/Pico was loaded before with another sketch to get the default WIO configuration.//\\
 +
 +
 +
 + \\
 +<html><a name="update"/></html>
 +=====Update=====
 +WIO binaries for ESP8266 and ESP32 can be uploaded by OTA.\\
 +{{:arduino:wiosetup-update-en.png?600}}\\
 +  - Select the WIO on the Query tab.
 +  - Goto the Update tab.
 +  - Select the target binary; Can be downloaded __**[[https://wiki.rocrail.net/rocrail-snapshot/|here]]**__.
 +  - Adjust the OTA password if needed. (Default is "12345678")
 +  - Push the OTA button.
 +
 +====Start OTA====
 +if the file name is left empty the selected WIO module will be set in OTA mode for updating the firmware over the air by other tools like the Arduino IDE.\\
 +The number, at the right of the "Start OTA" button, is the pause in seconds between activating OTA and uploading the binary. Some microcontrollers need some more time to prepare. (ESP8266)\\
 +
 + \\
 +=====OTA from Scratch=====
 +To avoid bothering with the needed libraries for the WIO Sketch this {{:wio:rrota.zip|WPS-OTA-Sketch}} can be used for binary OTA:\\
 +( The Sketch can also be downloaded from https://gitlab.com/rocrail/rrota )
 +
 +  - Install the Arduino IDE.
 +  - Add the ESP boards: __**[[:arduino:wio-en#boards_manager|ESP Boards]]**__.
 +  - Flash this Sketch on the target ESP.
 +  - Open the Arduino serial monitor with 115200 baud.
 +  - Put the WiFi router/repeater in WPS mode. Alternatively, the SSID and password can be entered in Sketch, then set #define WIFI_WPS to "false".
 +  - Wait for the IP Address in the serial monitor.
 +  - Select on the Update tab in the WIO Dialog the WIO binary.
 +  - Set the IP address and port on the Update tab.
 +  - Start OTA.
 +  - Ready to setup the rest of the WIO on the Maintenance tab.
 +
 +Alternatively a mDNS browser can be used for point 4 and 6.\\
 +| {{:wio:mdns-browser-rrota.jpg}} | {{:wio:arduinoide-mdns-rrota.jpg?300}} |
 +|  Discovery  |  Arduino IDE -> Tools -> Ports -> Network Ports  |
 +
 + \\
 +=====Trouble Shooting=====
 +
 +====WiFi Connection (DE)====
 +Im FritzBox WEB Oberfläche gibt es ein Möglichkeit um WiFi Verbindungen zu protokollieren:\\
 +FritzBox -> System -> Ereignisse -> WLAN\\
 +Option //"Auch An- und Abmeldungen und erweiterte WLAN-Informationen protokollieren"// dazu schalten und übernehmen.\\
 +Danach der WIO versuchen lassen eine Verbindung auf zu bauen. Dann auf "Aktualisieren" klicken um nach zu schauen wie es um dem Verbindungsversuch gelaufen ist.\\
  
arduino/wio-setup-en.1585730460.txt.gz · Last modified: 2020/04/01 10:41 by rjversluis