Home | |||||||
---|---|---|---|---|---|---|---|
![]() IoT Sensor with STM32F4Discovery and BG BLE113
|
|||||||
How does it work?The STM32F4Discovery board acts as host for the BlueGiga BLE113 module (no need for BG Eval Board, just BLE113 module itself on a STMF4Discovery board). In order to develop BLE IoT Sensor Apps - you need just a STMF4Discovery (USD 15.00) and the BLE113 module, much cheaper as original eval board. The STM board runs inside as FW a Pico-C virtual COM (UART) shell so that we have access to all features via a regular UART terminal program, e.g. TeraTerm. The Pico-C command line interpreter allows to write scripts which are C-language like. In combination with the Qt UARTloader we can talk to STM board and BLE113 via a UART command line shell, including to use the debug signal, to read/write registers or to flash the BLE113 firmware (FW). The Qt UARTloader can also act as:
The BLE113 module is soldered via jumper wires and connected to the STMF4Discovery GPIO pins (mainly the BLE UART and Debug signals, but also SPI or I2C available). The BLE113 module is fliped (up-side-down) in order to have access to the solder pads (see also Schematics). |
|||||||
Schematics
|
|||||||
UARTloader Windows App
The UARTloader can talk to the the STM32F4Discovery board as regular UART terminal (no need to use TeraTerm). It provides functions to read and write BLE113 registers or memory. The UART command line is like a C-language Shell: you can program scripts which are C-language-like. UARTloader provides also commands to flash the (entire or part of) flash memory inside the BLE113. You can erase and program dedicated flash pages or the entire BLE113 flash. |
|||||||
DownloadsThe STM32F4Discovery Firmware project for BLE113 as Cooxox project is here: You have to flash the STM32F4Discovery with it so that the UARTloader can talk to it (STM32F4Discovery FW has to be in sync with the UARTloader App). Download picoc_Discovery_BLE113 project (1.606 MB) The Nokia Qt UARTloader project for Windows is here (Qt version 5.3.1): Download UARTloader_Qtproject (11 KB) Or download the ZIP archive with the final executable (for Windows PC, it needs the STMF4Discovery flashed with the Pico-C firmware): |
|||||||
Flashing the BLE113The UARTloader can also be used in order to flash the FW of the BLE113. The debug signals DC and DD are used in order to access the BLE113 and to manage the flash programming procedure. The STMF4Discovery FW provides the functions to access the BLE113 via the debug signals. A separate CC Debugger is not needed (save your money). |
|||||||
BLE113 UART for BG GUI (BGAPI)If you run the BGAPI inside the BLE113, a UART interface can access the BLE113. The BG GUI can access the BGAPI inside the BLE113 via a UART connection. The UARTloader has a command to bridge the UART: the UART of the BLE113 is forwarded to the PC, as virtual COM port. So, the BG GUI can talk to the BLE113 via the STMF4Discovery board, e.g. using the BGAPI commands. The STM32F4Discovery board acts as a host similar to the BG Eval Board. |
|||||||
Android App |
|||||||
Mobile App DevelopmentI am thinking about: Which tool and language to use so that I can support several platforms, such as Android and iOS? I want to code just once but run it on different target and OS platforms. I am a big fan of Nokia Qt [5] as well as Embarcadero RADStudio [6], coming from Delphi, Pascal backgrounds. Deplhi 7 was a great language and tool. Therefore I am looking for a way to avoid programming in native Android SDK and Android Studio [7], to avoid Java and just supporting at the end one mobile application platform (just Android). Therefore, I am evaluating potential languages, tools and IDEs which can be used in order to write the mobile app independent of any HW platform. Potential candiates are:
|
|||||||
Demo ProjectThe demo project used to evaluate RADStudio XE7 is based on the BLE113 Thermometer (factory setting in BLE Samples) firmware. RADStudio XE7 looks really great and is my favorite to go with. I have spent this huge amount of money for the license. I tried also Xamarin, but too difficult, at the end nothing works (even other demo projects I cannot build). I think it is quite hard to get all requisites together, e.g. VisualStudio 2012 (or never) is needed, the license cost will be higher as mentioned at the end. I tried also Android Studio. I was able to create the BG Android Demo project in Android Studio and it works. I have fixed also an issue - the indicate was never working because one code line was missing in all projects I have found. Now it works nice. Please find here the modified and fixed Android Studio BG Demo project and the related Android APK. Download AndroidStudio BG Demo project (1.4GB) Download BG Demo Android APK - working inidcate (305KB) Please find here as well the BLE113 Thermometer Android App as APK and the related RADStudio XE7 project. |
|||||||
Pictures |
|||||||
References[1] BlueGiga BLE113 [2] Order at Digikey [3] other STMF4 Discovery stuff [5] Nokia Qt [6] RADStudio XE7 |