Barracuda App Server & SharkSSL FreeRTOS/lwIP ESP32 IDE

(Educational Tool)

The SharkSSL ESP32 C source code IDE provides an easy to use C development environment for compiling SharkSSL IoT C code examples and for uploading the compiled examples to an ESP32. The IDE provides a complete development environment with no other tools required!

ESP32 Lua IDE

The Barracuda App Server and the LSP Application Manager C source code projects are included in the SharkSSL ESP32 IDE. The code is compatible with ESP32 WROVER. The LSP Application Manager Lua IDE, running on the ESP32, simplifies Lua development. See details below.

The SharkSSL FreeRTOS/lwIP ESP32 IDE is designed to run in a virtual machine (VM). The download is provided as an OVA file, which is compatible with any virtualization engine that can load the Open Virtualization Format. The VM has been tested in VmWare and VirtualBox.

Figure (video) 1: VirtualBox running the virtual machine and connected browser running the IDE


Download SharkSSL ESP32 IDE

Note: the download is 2.3 Gigabytes.

The SharkSSL ESP32 IDE lets you fast track your understanding of the SSL/TLS protocol, Certificate Management, and secure IoT communication. The IDE includes several IoT C source code example programs that you can either compile "as is" or modify to suit your requirements. After working with a few examples, you will be an expert in using SSL for secure communication on a SharkSSL/FreeRTOS/lwIP powered device. Start your SharkSSL IoT development today with this easy to use IDE.

How Does The SharkSSL IDE Work?

The virtual machine (VM) runs Linux and comes pre-installed with all required tools. Linux experience is not required, but advanced users can optionally use the Linux command line and work directly with the official ESP-IDF and the ready to use SharkSSL build tools. The easy to use web based development tools let any developer edit, compile, and upload code via a USB connection to an ESP32.

The VM includes the following GitHub repositories

The IDE includes an easy to use web based graphical user interface for working with the following repositories:

  1. https://github.com/RealTimeLogic/SharkSSL
  2. https://github.com/RealTimeLogic/MinnowServer
  3. https://github.com/RealTimeLogic/BAS
  4. https://github.com/RealTimeLogic/LspAppMgr-ESP32
  5. https://github.com/RealTimeLogic/JSON

Installation Instructions

VmWare

  1. In VmWare, click Player -> File -> Open
  2. Open the SharkSslEsp32Ide.ova file you downloaded
  3. Start the VM
  4. When the VM has powered on, use a browser and navigate to the IP address printed in the VM's console.

VirtualBox

Before opening the OVF file in VirtualBox, make sure you have a Host-only Adapter or select Bridge Adapter when configuring the VM as explained below:

  1. Make sure you have installed VirtualBox Extension Pack (Required for USB connection)
  2. Click File -> Import Appliance
  3. Open the SharkSslEsp32Ide.ova file you downloaded
  4. Click Open
  5. Uncheck DVD and click Import
  6. When the file has been imported, right click the VM and select Settings
  7. Click Network; make sure the Network Adapter is set to one of: Host-only Adapter or Bridge Adapter
  8. Head to the USB tab and select USB 3.0
  9. Click OK
  10. Click Start to power on the VM
  11. When the VM has powered on, use a browser and navigate to the IP address printed in the VM's console.
VirtualBox Network Configuration

Figure 2: Selecting the Host-only adapter in VirtualBox

Loading the SharkSSL IDE

The SharkSSL is loaded by navigating to the IP address printed in the VM's console window.

You will initially be prompted to enter your Wi-Fi configuration settings. The settings will be used when compiling the ESP32 specific Wi-Fi configuration code.

Uploading Firmware to the ESP32

To upload a compiled example, connect an ESP32 using USB and make sure the Virtual Machine has ownership of the ESP32 USB device. The following screenshot shows how to take ownership using VirtualBox. VmWare provides similar configuration options.

Take ownership of the ESP32 USB device

Figure 3a: How to take ownership using VirtualBox

Take ownership of the ESP32 USB device

Figure 3b: How to take ownership using VmWare

VmWare remembers the "take ownership" configuration automatically, but not VirtualBox. You must repeat the above each time you unplug and plug the USB back in when using VirtualBox. However, VirtualBox lets you permanently recognize the USB device by right clicking on the VM and by selecting Settings -> USB. Permanently add the USB device by clicking the second add button as shown in the screenshot below:

Take ownership of the ESP32 USB device

Figure 4: Permanently storing the "take ownership" configuration in VirtualBox

Saved ownership settings

Figure 5: Two ESP32 devices with different USB UART chips permanently saved in VirtualBox

When the ESP32 is connected, the SharkSSL ESP32 IDE's LED switches from red to green.

How to flash the Lua IDE

To Compile and upload the Barracuda App Server example and the Lua IDE, expand "LSP Application Manager" in the SharkSSL IDE's left pane, expand "main" and double click main.c. Click the run button to compile and upload the firmware. Follow the How To Use The Barracuda App Server with ESP32 tutorial when firmware has been uploaded.

Troubleshooting

IDE Connection Issues

The VM is unable to get an IP address using DHCP if no IP address is shown in the VM's console window. Note that it may take some time before you can navigate to the IP address. Please try again if it fails. Something is wrong with the VM's network adapter settings if you are unable to navigate to the IP address after some time.

USB Issues

Some ESP32s require that you keep a boot button pressed when clicking the Run button in the SharkSSL ESP32 IDE. The button must be kept pressed until you see the firmware being uploaded. This process is automatic if the ESP32 does not have a boot button.

With VirtualBox, we had problems with connecting the monitor after the firmware upload process for ESP32 devices with the CP2102 USB UART (See figure 5). We could simply not connect the monitor using VirtualBox. If using VirtualBox, make sure not to use an ESP32 with a CP2102 USB UART. The ESP32 with the CP2102 is the one with the boot button.

How to fix the USB issues

The following is listed in order of preference. See details below Figure 6.

  1. Use an ESP32 WROVER
  2. Press the boot button followed by the reset button
  3. On Windows, connect a terminal such as Putty

Figure 6: VirtualBox USB problems shown in the SharkSSL ESP32 IDE after firmware upload and when monitor tries to connect.

1: Use an ESP32 WROVER

The ESP32 WROVER boards we tested have the CP2104 USB UART chip. These boards do not have the boot button. Uploading and connecting the monitor seems to be automatic with these devices. An additional benefit with the ESP32 WROVER is that you can also run the included Barracuda App Server.

2: Press the boot button followed by the reset button

When you see the error as shown in Figure 6, keep the boot button pressed on the ESP32 and then click the Monitor button in the IDE. You should, after a short time, see the following being printed in the console:

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download

When you see the above text, click the ESP32's reset button. The ESP32 will reboot, and the terminal will keep the connection (no USB connection errors).

3: On Windows, connect a terminal such as Putty

You can connect any serial terminal to the ESP32. When the ESP32 is connected, open the Device Manager and expand "Ports". You should see the COM port being used by the USB UART. Use a terminal such as putty and connect using serial. Enter 115200 as the serial speed and enter the COM port as seen in the Device Manager.

Putty connected to ESP32

Figure 7: SMQ IoT example with a connected browser window and Putty used as terminal

Linux SSH Access

A Linux Web Shell can be accessed by navigating to http://ip-addr/shell/. You can also remote in using SSH. The username and password is esp32.

About

The SharkSSL IDE is powered by the Barracuda App Server and was developed using Lua Server Pages.