How shall I understand the protocol stack - bluetooth-lowenergy

Recently, I attempt to use nRF52832 to develop the BLE program.
I need to flash down "s132_nrf52_7.2.0_softdevice.hex" firstly before using the MDK to write my BLE codes.
Is "s132_nrf52_7.2.0_softdevice.hex" called as the protocol stack including BLE function libraries?
Why should I flash down the hex file firstly, while my project has consisted of some .c and .h files of BLE.
ble project structure
I want to learn about the purpose of the hex file in detail.

Related

Login Form With Fingerprint Sensor Using VB6 And Arduino UNO

How can I interface my Fingerprint Sensor using VB6? I've already made a login form but I need help using the fingerprint sensor for the security. Please help me, thanks in advance.
Here's a good starting point: Getting Started with Optical Fingerprint Reader – R305. It's for the 305 but the overall setup should be very similar if not identical. Most importantly you will find an SDK for R30X modules in the Resources section of this page. It includes drivers, demos (with source code), SYNO API, user manual, etc.
Also, Vishnu M Aiea wrote a C++ library to handle communication with the R307 sensor: R30X Arduino Library. You should consider using this to handle the communication aspect since it's already been built for you. You might need to get it compiled into a DLL to use with VB6.
There's also an article he wrote about the whole setup process: Interfacing R307 Optical Fingerprint Scanner with Arduino
These links thoroughly explain how to set everything up. I think with all this information you should be able to make a lot of progress and come back to Stack Overflow with more specific questions.

What is the difference between "ESP8266WiFi.h" and AT Commands?

I am confused that some people use ESP8266WiFi.h library and some people use AT commands for connecting a WiFi module to Arduino.
Do they work the same or not?
Is there is any problem with the library, or is the library for some different purpose and AT commands for other purpose?
That's a great question. It's definitely not obvious from much of the code and many of the questions people post.
When the ESP8266 first came out, it was only used to connect other processors to Wifi. It shipped running software that provided TCP/IP and Wifi support. You'd wire it up to an Arduino or other processor and control it with AT commands. But you would not change the software that ran on the ESP8266 itself.
Many people still use it this way, but it turns out that the ESP8266 is as capable as (or more capable than) some of the processors that used it to connected to Wifi. So developers put together toolchains for building software to run on the ESP8266 itself. They even ported the Arduino SDK so that you could run "Arduino" programs on it (even though it's not an Arduino).
ESP8266Wifi.h is a header file intended for software that's built to run on the ESP8266, as opposed to software built to run on an Arduino or other processor that uses the ESP8266 to connect to Wifi. When you build software to run directly on the ESP8266, it replaces the software that implements the AT commands - though you can reinstall that later if you want.
So when you see a project using ESP8266.h, it's meant to build for and run directly on the ESP8266. When you see a project using AT commands, it's meant to run on a second processor (most likely an Arduino) that uses the ESP8266 for communications.
There are also libraries like https://github.com/itead/ITEADLIB_Arduino_WeeESP8266 which help an Arduino talk to an ESP8266 - they hide the AT commands and provide a simple set of function calls to do what the AT commands do. This runs on the Arduino, the AT commands are still used but the programmer doesn't have to worry about them.
There are also other languages like LUA and Python that run on the ESP8266 itself. Again, these replace the AT software that it first came with.

Arduino Uno debugging

I'm absolutely new to microcontroller development and currently want to:
Understand a typical process of the development
Set I/O and tune all tools for the development.
Currently I'm using Arduino Uno (ATmega328 based)
I found PlatformIO. It looks useful for me to work with microcontrollers on different platforms
Qt Creator is a favorite IDE, and I'd prefer to continue using this for AVR programming (PlatformIO can also generate Qt Creator's project template)
I've tried to build and run first sketch there, it works. So the only question is still there is a debugging.
Correct me if I'm wrong, two primary ways to do this is a JTAG and debugWire, and both ones are "hardware" debug, correct? And, of course, require additional devices.
In other hand, Qt Creator has a "bare metal" plugin which can work (debug) with a devices who can "behaves" as gdbserver.
I also found this article where the author suggests own implementation for a library for an Arduino project, which emulates gdbserver for a PC GDB client via the usual serial connection. Of course, I'll try this way as a preferable in my case.
So the question is - please confirm that all assumptions are correct.
And probably someone uses this way (maybe without this IDE).

What development options are there for proprietary BTLE profiles?

I'm working on a bluetooth le project that will bind to android and iOS. I looked at the TI CC2540 dev kit, but I am not sure what I need to do to prototype with it. Are there alternatives to the IAR compiler? If not, how easy/friendly is it to push firmware/profiles? Can I change the CC2540 module roles (have one as a peripheral and one as a broadcaster)?
Essentially, can I use the CC2540 dev kit (with IAR if need be) and program write a really simple application that with use the GATT protocol and stack?
The kit that you have quoted is simply a demo that helps you to evaluate the TI solution. The two devices are programmed with two different firmwares: the first one works as a Peripheral while the other one works as a Central.
TI provides you also a large number of demos with related source code, hence using IAR you can develop your application.

Using Google 'Protocol Buffers' in Arduino

Is it possible to make Google Protocol Buffers work in Arduino?
I have been trying for about a week and can't make it work, and I would like to know if it's even possible.
This should fit on an Arduino:
https://github.com/nanopb/nanopb
I've managed, after several attempts, to compile google protocol buffers for Arduino (using lite runtime), and still, the resulting code size was way over the 32k limit. So, for now, GPB isn't a viable option for Arduino projects. (maybe on Arduino Mega?)
I suggest you look at MQTT for a suitable replacement (I'll do that).
Looking at the link provided it says it has bindings for C++. This is essentially what the arduino is programed in. I see no reason why it wouldn't work. If you were to post some details (the data object your trying to process and the C++ code the system generated) we might be able to help. What exactly isn't working?
If you are looking for a tutorial on using Protobuf on Arduino, you can check out my article: A simple Arduino IoT example with Protobuf. The code is available on Github.
The tutorial uses my library Embedded Proto. You have to copy the Embedded Proto to the Arduino library folder, and it will build. Full details in the tutorial.
If you have any questions, let me know.

Resources