I am using a nRF52840 dongle for a BLE-based project. Is there a possibility that the dongle could work as both Client and Server?
That is, I would like the node to advertise and connect to a mobile phone and collect data first. After collecting the data, I need the dongle to send the data to another server that is advertising. The second server is also a nRF52840 dongle.
Yes nRF52840 can have multiple roles. Either one at a time or simultaneously.
Related
I have created a BLE peripheral that exposes a GATT service. It uses BlueZ 5.50, but it seems that only one device can connect to the GATT service. When the device is connected, then other devices can't see it anymore. It's not showing up in a scan anymore and if it was already scanned, then I can't connect to it anymore.
It seems to be a limitation or configuration issue in BlueZ, because when using the Paypal GATT library it can handle multiple connections. As far as I know, the RPi3 BLE chip should be able to handle up to 10 connections.
Does anyone know if this can be done using BlueZ?
The Paypal GATT library directly connects to the HCI device and bypasses most of the kernel stuff. BlueZ depends on kernel drivers and user-space applications and is capable if the driver reports that the controller allows multiple connections. You need a decent BLE controller and a recent kernel to make it work.
More information can be found in https://github.com/bluez/bluez/issues/12.
Hello.
I have recently been trying to mount a home automation station on a raspberry.
I need to communicate with the station via SMS. To do this, I order a 3G dongle (UMTS / GSM / 3G / 4G etc ...) operating on the country's network (verified frequencies). I connect to the network via wifi. But when connecting the 3G dongle, here I am blocked on access to Wifi.
My first question is therefore: is this normal?
And my second is: is it possible to make both work in parallel?
Thx all
It depends on the exact use case or requirement and type of device in hand.
In general, the device will choose/use the wireless connection with better connectivity strength as per its design/specification and also it depends on the support at device.
In case you have the option of WiFi Hotspot tethering enabled, it is possible that most of the devices nowadays allow you to use 3G for the internet communication and at the same time, it allows WiFi hotspot sharing with the help of WiFi from your device.
Also, few devices have support for file sharing between device to device whereby they provide support for wifi direct and wifi sharing while 3G connectivity with internet is still fine. Few devices from Samsung, support an application called "Download Booster" that allows your device to download files using WiFi connection and a mobile data connection simultaneously.
Few devices from Apple starting iOS 7 introduced Multipath TCP enables users to have their streaming music to never get interrupted while on high mobility or in trains and other vehicles with changing connectivity whereby no manual switch from between WiFi and Cellular is required in which case, the device shall stay connected over both cellular and WiFi simultaneously and whenever the WiFi connection fails, the cellular connection shall continue with streaming operation without any interruption.
There is also a app called 'Speedify' in android that uses channel bonding technology to combine multiple Internet connections together for increased throughput & redundancy and thereby it can merge WiFi and Cellular connection simultaneously. Here, a Speedify client software is used to establish a connection to a Speed Server in cloud that acts as a middleman between you and the rest of the internet. The Speedify client software then works together with Speed Server to distribute your internet traffic and deliver the combined speed of all available internet connections.
We can update the firmware wirelessly using the OTA updates. But for updating the firmware, the esp32 device needs to be on a local network.
Is there any way or source to update the firmware of the device which is not on the local network?
There is also a way to update ESP32 firmware over the internet without any additional update server (with public and static IP address) and without port forwarding. It is based on Husarnet p2p VPN service.
The instruction is here: https://docs.husarnet.com/blog/internet-ota-esp32
Assuming the ESP32 OTA works very similar to ESP8266 which I have used. This can be accomplished in at least two ways.
This link: http://esp8266.github.io/Arduino/versions/2.1.0/doc/ota_updates/ota_updates.html
gives details on using the browser to deploy the update to the device. You would need to forward your port 80 traffic from your public IP to your internal device IP address. Then you can access your ESP through the browser and your public IP address. The better option is to publish your updated firmware to an externally available HTTP server and change your ESP OTA codde to check that external server for updates. This method is detailed in the "HTTP Server" section of the above document. This is just general guidance to the general question you asked. I believe the solutions above would work, but I have not tried them myself yet.
Yes, absolutely. OTA has no requirement of the device being on a local network. You just need to host your firmware .bin file on a web server, then have the ESP32 connect to the server and send a GET request. Espressif's example project for OTA is pretty good, but I'm assuming you're using the ESP32 Arduino libraries and not the ESP-IDF.
I'm guessing you're using this. I'd take a look at the AWS OTA example which I believe is one of the standard ESP32 Arduino examples. It's under Examples, Examples for SparkFun ESP32 Thing, Update, AWS_S3_OTA_Update. It looks like it allows you to OTA from an Amazon Web Services hosted server, which should do exactly what you want.
You can make an app that fetches the update file from the internet or elsewhere then transfer the file via BLE to the ESP32. In this case, the ESP32 will need to be connected to the phone via BLE only (no WIFI needed).
Here is the example Arduino code for the ESP32 and the Android app code
how the bellow connection can be done , what the protocol that must be used to send bytes from computer through it's serial WiFi and receive the bytes in Arduino using ESP8266-01 WiFi Serial Transceiver Module.
computer AND esp8266 WITH arduino
It depends on what you want to accomplish, and what roles you want the computer and the arduino/esp combi to play. You can put the ESP in station or access point mode (or mixed), and have it talk to the arduino via the serial interface. The communication with the PC will indeed go via wifi/tcp protocol, but depending on your specific requirements you will have to decide one the roles. Then you can make the ESP a web client or a web server, mainly depending on the direction of the flow of information.
I assume you want to query the Arduino from the PC, in which you can send a HTTP/GET request from the PC to a simple web server on the ESP.
There are various examples in the Arduino examples that do just that to give you a start, available when you install the ESP library in the Arduino IDE, see: https://github.com/esp8266/Arduino
HTH
I have Sim900 modem which have TCP/IP stack. I have developed website which return data in json. like if you hit my url;
http://mywebsite.com/?id=8&certkey=Hljhph895D5
then it will return value like
{'name':'Ali', 'Age':23}
I would like to know how to fetch data using Sim900 modem. any help would be appreciated.
The GSM (GPRS, UMTS etc) connection is lower level than the IP connection. So you need to make a GPRS or UMTS data connection from your modem to the operator's network, and an IP connection on top of that (usually both connections are done with one single connect command to the modem).
Then you can use this IP connection like any normal internet connection, and retrieve your json data.
How you make the GPRS/UMTS and IP connections, depends upon your platform.
As you are using C#, I guess it's Windows.
If the modem supports newer Windows interfaces, you can use Windows Mobile Broadband API on Win 7 or 8(desktop).
If the modem doesn't support Mobile Broadband API, then you can use AT commands. There is lots of help on the internet for that.