Hi, maybe this topic not good for here but it’s a part of a big project (How to control Devices with android).
There are many ways to control other devices via android such as Bluetooth, Wifi and etc.
In this topic we try to focus on Wifi protocol. I have an ESP8266_ESP 201 module and I connected to PL2303 as you can see in fig1.
In this project I tried to create an Access Point with ESP8266 and I set up a server on port 9000, then I wrote an application for Android, so I can communicate with modules. Application after creating the socket communicates directly with the module.
there is a button in application, when you press it application tries to communicate through the socket and LED remains lit as long as the connection is not established.
fig1

PL2303 USB to Serial Converter

Make sure Android device connected to ESPap (pass: 12345678)

Chat between PC (COM port) and Android Device


Android and Arduino Source code (apk file stored in WiFiTelnet\bin\ Dir)
I have been working in something similar using Bluetooth Low Energy.
I am using this module
http://www.aliexpress.com/item/Micro-Bl … eb201560_2
And the Arduino IDE
I use a reprogrammed STM32F103C8 board to act as the SWD programmer
http://www.aliexpress.com/item/STM32F10 … eb201560_2
I am using a free App by RedBearLab for serial, as I have a sketch for BLE written by RedBearLab, but of course i could change the sketch and use another App.
I have been working in something similar using Bluetooth Low Energy.
I am using this module
http://www.aliexpress.com/item/Micro-Bl … eb201560_2
And the Arduino IDE
I use a reprogrammed STM32F103C8 board to act as the SWD programmer
http://www.aliexpress.com/item/STM32F10 … eb201560_2
I am using a free App by RedBearLab for serial, as I have a sketch for BLE written by RedBearLab, but of course i could change the sketch and use another App.
I have also been using HM10 modules, but they only have an AT command set, so are not as useful as devices which are fully programmable.
BLE is short range and does not penetrate walls very well, but I find it is easier to connect to BLE devices as you do not need to change wifi settings
I have also been using HM10 modules, but they only have an AT command set, so are not as useful as devices which are fully programmable.
BLE is short range and does not penetrate walls very well, but I find it is easier to connect to BLE devices as you do not need to change wifi settings
I think although the nRF24L01 uses 2.4GHz it is not Bluetooth and uses a proprietary Nordic Semi protocol to send data to other nRF24L01 devices.
The HM10 uses a TI CC2540 or CC2541 device, but its not possible to compile firmware for this chip unless you have the IAR compiler which costs $$$$$$$$$$.
So most people just use the HM10 module as it comes with some AT Command firmware that allows you to connect via Bluetooth as a Uart.
But the HM10 uses its own BLE GATT profile, so you have to use an App that uses that GATT.
(You can’t use any Apps that use the Nordic UART GATT profile as its not the same as the HM10 GATT profile)
I think although the nRF24L01 uses 2.4GHz it is not Bluetooth and uses a proprietary Nordic Semi protocol to send data to other nRF24L01 devices.
The HM10 uses a TI CC2540 or CC2541 device, but its not possible to compile firmware for this chip unless you have the IAR compiler which costs $$$$$$$$$$.
So most people just use the HM10 module as it comes with some AT Command firmware that allows you to connect via Bluetooth as a Uart.
But the HM10 uses its own BLE GATT profile, so you have to use an App that uses that GATT.
(You can’t use any Apps that use the Nordic UART GATT profile as its not the same as the HM10 GATT profile)
i just looked uo the HC05 and Hc06 and they use a different BLE SoC, by Cambridge Silicon Radio.
But it looks like it uses an expensive proprietary toolchain.
I have now managed to get a demo working for both the types of nRF51822 modules that I have, by using mbed.
However Im still working towards getting all the modules working under the Arduino IDE ( but at the moment one of them still doesnt work with Arduino)
Bottom line it’s easy to build and app for your phone. There’s a couple of YouTube videos on how to do it.
http://ai2.appinventor.mit.edu/
Michael
I have done some programming on Android using Eclipse but that was ages ago, and its not my specialty.
So a visual alternative for simple projects sounds appealing
I must say I don’t miss Eclipse. lol My last job was Java app development using Eclipse for some in-house apps. But I spent more time solving Eclipse issues. It’s very powerful. But just as finicky. lol
If power is not a concern, I’d just use an ESP8266.
IAR has a 1 month evaluation period. I don’t think you are supposed to do anything with any binaries you produce in that month (apart from determining if you want to buy IAR).
Otherwise you can just keep re-registering on a slightly different email address each month and keep on developing….
There is a repo in github called bluebasic which allows you to use the CC2541 as a BASIC interpreter, but I’ve heard its quite buggy ![]()
However it may be good enough for some things.
While is not plug and play, I’ve found it easy to work with. Just an init code with AT commands wich you can save and almost just copy & paste to the upcoming projects. Thes rest is clean UART.
As far as I know, the HC05 (master and slave modes) and the HC06 (slave only) are in fact the same hardware, but with different firmware, despite the different board versions.

