ESP32 smart wifi configuration via esp32 wifi AP(Access Point) - node.js

I want to make a React-Native application to provide wifi-credentials to esp32 module via esp32 wifi access point.
I see there are some library of npm that we use to provisioning wifi config to esp32.
For ex.
react-native-esp32-idf
react-native-esp-idf-ble-provisioning-rn
But i'm confuse how to use them and may be these are provide credentials via BLE or Bluetooth but I want to provide SSID and PASS via wifi.
Means, I have a esp32 module and at begining i use it as a wifi-access-point then my application would be connected to esp32 by wifi automatiically then by communition through wifi-hotspot b/w app and device i provide cred. to device-esp32.
Thats it!
So how i make this application in react-native?

A simple approach would be like the following:
ESP32 is powered up
ESP32 opens a Wi-Fi access point
ESP32 starts an HTTP server acting as REST API
Any HTTP/REST client (including the react native app) can set the
Wi-Fi password and SSID using via the REST API
Once the Wi-Fi password and SSID are set, ESP32 restarts as a Wi-Fi
station and tries to connect to the configured Wi-Fi password and
SSID.
This way on your react native app you'll only need to use a simple HTTP/REST client

Related

How to structure an app which uses a mobile phone to transmit audio via UDP

I need some help structuring an App that allows for a speaker who can send audio via his/her phone mic and then for users to listen to this audio stream. I don't want to upload anything to the cloud as there may be bad internet reception.
What technologies to use? How do they talk to together?
Currently I have:
Have a mobile dongle that everyone connects to
host a server on this dongle?
Send an live audio stream to this server via UDP
Users listen to this server
Ideally it would be great if I could build this in React Native, which I think is possible. I am not sure how to host a server on a dongle though or even if this the best method?

Connecting to Web Bluetooth

I'm trying to connect a bluetooth device (ESP32, peripheral) with Web Bluetooth (central). I send an addvertising packet and I can see the device on the web page, but I fail to connect to it. My code for the ESP32 looks like this: (MicroPython)
ble.gap_advertise(interval_us=100, adv_data=bytearray(b'\x02\x01\x06\x06\x08\x45\x53\x50\x33\x32\x11\x07\x26\x6c\x34\x7f\xb2\x38\x61\x82\xbe\x4d\x1d\x64\xf1\xf7\x93\x16\x02\x19\x80'),resp_data=None, connectable=True)
In Web Bluetooth (JavaScript) I just request a device and try to connect to the gatt.
Can anyone help me out?
Thanks in advance!
The JavaScript does work with another bluetooth peripheral. (RN4678)
And in JavaScript I can find the peripheral (ESP32) after filtering, but I can't connect to it.
JavaScirpt:
server = await device.gatt.connect()
The code stops at that point.
MicroPython:
The GATT is defined using:
ble.gatts.register.services()
I'm trying to use my own service, not a SIG defined one. So I advertise b'(x...') which contains the flags, the service and the device name. And it works with the nRF Connect App. I can send and recive data. But it doesn't work with the bluetooth enabled web browser.
Thanks for your help!

Web Sockets communication using nodejs for connection between a web app and a charging device

I want to create an application in which my web app will work as remote , a node based web socket server will work as CMS(central management system) and an electric vehicle charger which will be my device. I want help in how to send instruction to my device according to the commands i receive from it.
You can use socket.io on your server, it is easy to use and has a socket client implementation in almost languages that exist.

RTSP Camera P2P Connection without Port Forwarding and Console Application

I am trying to connect Remote RTSP Stream from IP Camera, but unable to get it without port Forwarding or Client Application. Is there any procedure to connect RTSP stream from one network to other network without port forwarding?
I have already tried with application client from hikvision and checked Wireshark streams but unable to get it
cam = cv2.VideoCapture("rtsp")
Take a look at the Nabto P2P platform, it is designed exactly to solve this problem, free for personal use and test / R&D. The Nabto blog has specific examples for setting up RTSP P2P tunnelling on cameras, Raspberry Pi devices and ESP32 devices:
You can either install the Nabto P2P reverse proxy in front of your RTSP service on the camera as a standalone process - or you can integrate it into an existing application. Full source is available in github.
On the client side, you can use an existing Nabto enabled RTSP client - or build your own based on the client SDKs, available for most popular platforms. Existing client apps available in github and in App store / Google Play.

BluetoothSerial ionic2 - can't connect to device

i'm trying to use Bluez (python) on a raspberry pi to receive data with bluetooth from a ionic2 app. I'm using the built in Bluetooth from "native ionic" which is the bluetoothSerial framework from Cordova
I can't receive any data on the rasp. I'm using list() to check if the device is connected to the rasp (it return true).
I'm using write to send a "hello world" message.
The Ionic2 script:
BluetoothSerial.connect("B8:27:EB:F7:3B:B5");
BluetoothSerial.write("hello world").then(this.success, this.failure);
After the write, my callback succes is called which means that the data was correctly sent.
I was wondering on which bluetooth port the ionic2 app send the data. Bluez need a specific port to listen to.

Resources