Is ESP32-based boards suitable for both Classic and BLE functionality? - esp32

I have an RPi4 which has an onboard BT/Wifi module produced by Cypress (Cypress CYW43455).
By using BlueZ on the RPi, I can run the following commands to use both Classic and BLE functionality:
l2ping MAC //this uses classic bluetooth
hcitool lescan //this uses BLE scan
gatttool //this uses BLE also
Now I don't know how Cypress CYW43455 is interfaced with RPi4's CPU, but I want to reach the same functionality with using ESP32 with RPi4 (probably via UART).
So my question is: (how) are ESP32-based boards capable of providing the same functionality as the Cypress one?
I mean how:
are they need to interface with RPi? (via UART? via USB? other?)
is BlueZ working with ESP32 or other software is needed?
What I actually need is to
be able to "l2ping" a classic BT device
be able to read and write GATT data from/to a BLE device
be able to monitor BLE advertisement packages

The Cypress chip is connected over UART to RPi. You can connect an ESP32 in the same way (using UART) and then use hciattach to attach it to the kernel.
Note that you need to flash the ESP32 with a firmware that connects hci to the uart port.

Related

Is there any simulator for ESP32-S2 or ESP32 chips?

I am working on an esp project and compiled my code by using the esp32s2 toolchain and created a binary that ready to run on a real device. But I don't have a real device to test my binary. Is there any simulator to simulate the ESP32-S2 chip or the ESP32 chip?
You can use Wokwi to simulate the ESP32, and soon also the ESP32-S2.The Wokwi is a free online simulator for electronics, and it runs in your browser. This means you can simulate code that interacts with 3rd-party sensors, display modules, LEDs and many other common parts. There's also initial support for WiFi simulation, and the developers are working on extending it to support connecting to any host on the internet (e.g. HTTPS/MQTT)
Simulator Examples
Arduino Examples
Blink
Seven segment counter
APA102 Color Cycles (TinyPico Board)
WiFi Scanning
MicroPython Examples
SSD1306 Example
NeoPixels
WiFi Scanning
ESP-IDF Examples
The following examples use the ESP-IDF functions. They are compiled using Arduino ESP32 Core:
Blink using FreeRTOS API
Binary LED counter using FreeRTOS tasks
GPIO button input + interrupts
https://docs.wokwi.com/guides/esp32
You can try QEMU from https://github.com/espressif/qemu or https://github.com/Ebiroll/qemu_esp32
Not sure if they are supporting ESP32-S2, but it seems to be working with ESP32.

Connect esp32 cam to pc

I would like to know if there is a way to connect an esp32 cam via an esp32 to the pc to program it.
I have only found tutorials to connect it via an arduino or FTDI...
ESP32-CAM doesn't have USB->serial converter so the only way to program ESP32 for the first time is via serial. After uploading sketch via USB-TTL converter you can use OTA to update ESP32 via Wi-Fi but if you don't have FTDI converter it's useless.
Another solution is to use arduino board as USB-TTL converter because converter is already included on most of the arduino boards (nano, UNO..).
Yes, you can connect it to a PC - but, as you said, only using an Arduino or FTDI.
You can't connect it directly.
The ESP32-CAM doesn't support USB for communications. FTDI allows the PC's USB connection to communicate with the ESP32-CAM's serial port. They can't communicate without some kind of adapter - that's what FTDI or an Arduino are for.

How to use gamepad by STM32?

I'm a very beginner of using STM32 and now I'm trying to move a robot by using STM32F4.
Now I can move a robot by controlling a device such as motor, encoder and other devices.
However, I don't have any idea about reading gamepad (HID device of USB).
I'm trying this because I want to control a robot by gamepad.
Is it possible to read gamepad which use USB by STM32F4?
If there are a page which write about this problem, I'm afraid you tell me the URL.
Thank you.
It is possible if your uC has the USB interface which can be configured as a host device. Check with your micro DS. but you have to remember - it is not an easy task, you will have to learn USB deeply, and implement the host stack.

Bluetooth MIDI - Windows

I am trying to connect a Bluetooth Low Energy enabled MIDI hardware to wirelessly send data to a Windows PC and get it to detect as a MIDI device in Windows. Currently, the device is able to pair with my Windows 10 laptop and I am able to read the incoming data off of it.
The same hardware is configured and working fine as a wireless MIDI device on Mac and iOS devices(which natively supports MIDI over Bluetooth). I am trying to get this feature implemented on Windows(which doesn't support MIDI over Bluetooth, although it was promised in Windows 10).
The device, when is paired, is showing up in the 'Bluetooth devices' section in device manager, I am trying to make this device showing up as a MIDI device in 'Sound, video and game controllers' section.
Any help/resources somebody can provide to help me crack this problem is highly appreciated.
Following is my current thought process to implement this.
Pair the device and read the data off of it. (Already implemented)
Create a virtual MIDI port. (Don't know how to implement this, I am currently checking out rtpMIDI)
Send the MIDI data which was read from the BLE device to the virtual MIDI port. (Still don't know how to implement this)
Any suggestions/comments on the above thought process as I am absolutely new to Windows Driver Development.

Arduino, johnny-five, can it work without connected computer?

I am new guy on Arduino and johnny-five. I am not clear about the way johnny-five work. JS code will run on computer or run directly on Arduino board? Besides, can we use johnny-five for IoT? because I have not found any component to support Arduino uno connect to internet(call rest api or Azure service,..)
Thanks,
johnny-five uses Firmata. The Javascript code is running on your PC, and the Arduino is basically used as a peripheral — the Firmata firmware allows software on your PC to interact with all of the Arduino's inputs and outputs, but there isn't any real "intelligence" running on the Arduino.
Yes, it's possible to use REST APIs on an Arduino without the help of an attached computer, if the Arduino has an Ethernet Shield or some other method of connecting to the internet, but do keep in mind that the Uno only has 2kB of RAM and 32kB of ROM, so there's a limit to how complex you can make things.
You can connect arduino to a raspberry, it is not expensive.

Resources