BLED 112 - update BGScript based firmware with SDK v1.1.1 - bluetooth-lowenergy

I purchased a BLED 112 dongle from BlueGiga (http://www.bluegiga.com/BLED112_Bluetooth_smart_dongle). I purchased the dongle since I was trying to do a simple POC with an iPhone. I did not want to get into breakout boards or the dev kit just yet.
I am trying to get the heart rate monitor samples working and I am not sure how to load the firmware on the device. I am using the latest version of the SDK (v1.1.1) which states to use the BLE Update tool, not the TI Flash Tool.
However it looks like you need the CC Debugger with the BLE Update Tool to update the SOC. I looked at the CC Debugger and it does not appear to be designed to be used with BLED 112 USB dongle. It appears you need a breakout board to expose the pins to be able to hook the CC Debugger to a BLE 112 module, not a BLED 112.
Lastly, I am not sure if DFU will work without bricking the dongle.
Any advice on how to properly use and program the BLED 112?
Thanks,
G
From the SDK docs:
TI Flash tool should NOT be used with the Bluegiga Bluetooth Smart SDK
v.1.1 or newer, but BLE Update tool should be used instead. The BLE112
and BLE113 and BLED112 devices contain a security key, which is needed
for the firmware to operate and if the device is programmed with TI
flash tool, this security key will be erased.

It is possible to update the firmware on the BLED112 via the USB connection, and without requiring a breakout box or a CC Debugger. However, it is fairly easy to accidentally 'brick' your device in so doing. The problem is that the firmware itself needs to provide the interface to enable DFU mode; if you do an update with your own firmware, and your firmware doesn't provide this capability, you're stuck with the last thing loaded on it.
That being said, here's the process.
The BLED112 dongle is essentially just a BLE112 with an attached USB connection. The BlueGiga SDK ships with drivers that allow the device to be mapped with a simple serial interface, such that the device shows up as a simple COM port (e.g., "COM16") to applications running on the host PC. The SDK also ships with two utilities - BLEGUI, and DFUTOOL - that are able to use this COM port interface to communicate with the device.
(Getting the drivers installed seems like it should be easy, but the process was finicky for me, and I ended up having to mess around with Device Manager, etc., for a while before getting the COM port to show up reliably when I attached the dongle.)
The basic process for building and installing firmware on the BLED112 is:
Compile your BGScript program to an image file using BGBUILD.EXE
Reboot the dongle into firmware update (DFU) mode using BLEGUI2.EXE
After attaching to the appropriate COM port, select Commands | DFU from the menu.
Update the firmware using DFUTOOL.EXE
Before you do this, make sure you read the "Developing Bluetooth 4.0 single-mode applications" and other technotes from BlueGiga's forum (registration required). Specifically around your project configuration:
WARNING:
If the firmware is to be installed into the BLED112 USB dongle the USB
CDC configuration MUST BE included in the project file. If this is not
included in the project file and the compiled firmware is installed
into the BLED112 USB dongle, the USB interface will be disabled and
the dongle stops from working.
Phew. Not necessarily for the feint of heart. I personally found it more appealing to shell out the money for the DKBLE112, which has the BLE112 module mounted on a board with some other accessories, and a CC Debugger for programming. With this setup, you can flash new images to the chip without worrying so much about screwing things up (there's a "reset" button on the board itself).
Other people have reported using breakout boards that are cheaper than the DKBLE112, such as this one from Jeff Rowberg. They also let you program with the CC Debugger, but I have no experience with them.
Have fun!

Based on the information provided, I found the following technote on the BlueGiga support knowledge base.
https://bluegiga.zendesk.com/entries/22810076--HOW-TO-Run-a-BGScript-application-on-the-BLED112-USB-dongle
Thanks
Greg

Related

Platformio which ESP32 board to pick

Hello and happy holiday to all
I am using platformio for an arduino project for the first time. I have purchased this ESP32 borad:
EC Buying ESP32-DevKitC Development Board ,ESP32 Development Board Equipped with WROOM-32D Module Integrated WiFi Bluetooth Module Microprocessor Interface SPI I2C I2S Suitable for Arduino
I am new to all this and need to know what board I should pick in PLATFORMIO for this board. I have loaded the core 32 from Espressif 32 and have the large list of ESP32 boards.
just want to make sure to pick the correct board to match the one purchased. Here is also the link to amazon on the board purchased.
https://www.amazon.com/dp/B0B64SD16T?psc=1&ref=ppx_yo2ov_dt_b_product_details
Thanks to all you wonderful people who can help.
I have not tried any boards listed as I did not what to damage this new board.
You won't damage an ESP32 by choosing the wrong PlatformIO board. The worst that will happen is that you won't be able to flash your program to the board, or it won't run correctly when it's flashed. While it's not impossible to brick an ESP32 by configuring security options, that's not something PlatformIO is going accidentally do to your board.
You can search the list of available boards on the web and look for a close match.
The most important thing is to get the correct processor type - figure out whether you have ESP32, ESP32-S2, ESP32-S3, ESP32-C3 (or eventually some other kind of ESP32). Only consider PlatformIO boards for that specific CPU. Then look for the size of the flash storage. Usually any board that matches that spec will work.
esptool.py, the program PlatformIO uses to flash the firmware to the board, will detect the CPU type, so if you have an ESP32-S2 and try to flash code for an ESP32 to it, it will detect this and report an error.
In your case you might try the generic Espressif ESP32 Dev Module:
[env:esp32dev]
platform = espressif32
board = esp32dev
If your first try doesn't work, it's safe to try another.

Qt Serial Communictaion - communicating with a stm32f0 board over Putty

I need to create a Qt GUI that enables the user to select an option from a comboBox and on pressing a 'send' button, send some data to a STM32f072-Disco board via Serial Communication ( over a COM Port - COM11). I looked at the Qt blockig master, blocking slva eexamples but don't understand them very clearly. Any suggestions on how I can proceed ?
I've managed to make a Qt application with some help from sources on github.. The application is able to send & read data from the stm32 board. The stm32 dev board is configured as a CDC device.
The library provided # https://brosnanyuen.blogspot.in/2016/06/stm32-usb-cdc-vcp.html is useful for CDC communication as the stm32 middleware is slightly complex to use.
The git repor # https://github.com/WalkingFrog/Qt-SerialPort-Programming-Demo is a good start for beginners looking for a start.
I can share my code on any requets.

OTA firmware update with BLE113

I want to do firmware update over the air with BLE113 module. I am using Nordic's nRF Toolbox to test this and I have configured their GATT services and characteristics in BGScript to do OTA update. But OTA updates are not always successful.
I deduce that, according to Nordic there are different file types of file that can be used to upload for OTA update process, which are,
Distribution Packet(ZIP)
Soft Device
Bootloader
Application.
At present I use 'Application' which means I select a bin file and upload with nRF Toolbox app from Android mobile. But this method is mostly unsuccessful (success rate is nearly 10% only). Can anyone suggest me a reliable way to do this? Has file type got to do anything with reliable OTA update process?
EDIT :
I am using a custom made board. I am not sure with antenna, Anyway I shall check this. And I always keep optimum power level. But nRF Toolbox (or I have come up with my own app using Nordic's OTA firmware update library) always shows 'successfully transferred' when I do OTA update and firmware is not updated most of the times.
It looks like you're trying to update a Bluegiga BLE 113 with Nordic's toolbox? That can't work.
Nordic and Bluegiga (now Silicon Labs) have different ways to perform firmware updates over the air, and they're not compatible.
I have a sample iOS app which will let you OTA from an iOS device to the BLE113 (assuming your firmware supports it): https://github.com/RobotPajamas/ble113-ota-ios
Here is a longer explanation of the BLE113 over the air update process: http://www.sureshjoshi.com/embedded/ble113-ota-over-the-air-programming/

How do I program my atmel develper board with sample program on the usb

I have successfully compiled a sample program, which came with a developer board. I have also connected to the board via putty and ran the executable which was on the board from the factory. But I can not push my elf file to the board apparently because the debug/programming interface is missing. I can not figure out what the issue is. I turned off Win7's firewall, and defender before I installed the driver. Enclosed are a couple of pics; do I need to purchase a JTAG to usb cable? Right now, I am just connected to the board via the usb interface which is on the board. But the board comes with JATG, and miniJTAG.
#DigiNinja- I have AT97SC3205T-SDK2. Can you also comment on the firewall? Do I need to keep win firewall and defender off all along or just while I install the USB driver?
I posted a pic of the board with all the other interfaces.
Do I need one of these
Here is a pic of Device Programming options:
#all- Thanks. I have a starting point. I need to read the docs now.
The user guide provides the info you need, and can be downloaded here: http://www.atmel.com/Images/Atmel-8528-TPM-I2C-SPI-Development-Kit-UserGuide.pdf
From the user guide:
"The USB bootloader remains pre-programmed in ROM memory. This bootloader may be used to either reload the TPM demonstration software images or to load the SAM4S ARM demonstration software. The kit has a JTAG connector that can be detached from the kit and connected to the mini JTAG connector on the board. This will allow the reprogramming of the SAM4S ARM."
So that means you should be able to load new software images using the pre-loaded USB bootloader. If you don't want to use the bootloader or it's been removed then you will need to use JTAG.
From the user guide: "For more advanced in-system programming techniques, the In-System Programmer SAM JTAG ICE combined with Atmel Studio® can be utilized over the provided JTAG interface port to exercise complete programming control over the processor."

PIC32 bluetooth

I want to implement bluetooth communication on my final bachelor project, but I'm having a lot of doubts.
One of the requisites of this project is to have a Java application that can talk to the micro via Bluetooth. After a lot of research, I've found one that I think it's very good with a SPP profile, but I still have a lot of questions about it:
All the bluetooth on a PC implements the SPP profile stack?
If you need to develop a Java application that runs on every PC that implements the SPP stack, how would you do it?
We started by trying to use BlueCove and JavaBluetooth.org API, the first one runs great but I don't know if it's just on my PC and the second one sends an error (Stack not initialized). Which one would you use, and why?
We decided to buy this bluetooth module, from Sparkfun, any comments for those of you who already use it?
Thanks
I used a similar product for my senior design project from Sparkfun (RN-41): http://www.sparkfun.com/products/10559
It worked right out of the box as a simple UART. This allowed my team and I to develop a simple C# application that used the .NET SerialPort class (System.IO.Ports) to communicate between an MSP430 and the PC application we were developing. If streaming data is all you care about, these Bluetooth modules work great. Java implements a similar SerialPort class for RS-232 communications. Don't forget that Bluetooth was developed to replace a serial cable.
I hope this answer helps! Good luck.
I personnally achieved to use the Sparkfun's bluesmirf devices to communicate with my own Java application (an Eclipse plug-in). I tested it successfully under Windows, MacOS & Linux based systems.
I used the RXTX Java library to connect to the corresponding serial port once the Bluetooth devices were paired. Under Linux I even achieved to configure rfcomm to automatically pair the Bluetooth devices on demand.
From my experiment I encountered some stability issues... Sometimes it simply fails to connect to the given port even if it exists or refuse to reconnect on it. Sometimes it hangs the whole system...
I never found any good solution to fix those issues that seems to be completely system dependent. I would be interested if any one achieved to use it properly...

Resources