Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
Here is the chip.... as I find these kind of details matter and are often omitted on these kinds of Internet tutorials and discussions. I will replace this photo (taken quickly with my iPhone) with a screen shot from my computer when I find the USB cable to my little microscope.
In fact, the way I got this test to work (finding a starting point sketch) was to use my microscope to read the model number on the chip: the CC2541
A number of times recently, I received some modules with the model number of the chip "burned off" with a laser, which is really annoying.
Update: Here is the same chip shot using the USB interface to my Mac Pro :
Both "chip shots" were taken though the plastic wrapper around the BLE module... that is why the image is a bit blurry)
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
To test Arduino BLE on the iPhone (my trusty 6S), I installed and tried a number of Arduino BLE apps from the Apple store, including these five apps:
BLE 101
LightBlue
ArduinoBlue
Blynk
Adafruit Bluefruit
Of all these IOS apps, I found ArduinoBlue to be the best, by far:
For example, in their basic sketch, with PIN setup as follows (TX, RX pins reversed from the first sketch above, FYI - which I changed to match the ArdunioBlue defaults):
I set up two buttons and two sliders just like in the instructions, and everything worked "out of the box" (much better than all the other IOS BLE Arduino apps I tested). For example, here is the Arduino serial monitor output:
Side Note: I'm starting too like all these cheap Chinese shields from AliExpress
This is the ArduinoBlue test setup on the iPhone:
With the basics out of the way on the iPhone (for now), next I think I will look for / find / modify or write a Python app so I can play Arduino BLE from my desktop MacPro. Also, in that search, I'll also check to see what kinds of macOS apps are good for this caper (so far, I've not found any suitable BLE app for macOS, so my guess is I'll end up writing or modifying a Python project for BLE on the Mac).
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
Update and Issues:
Having some problems with the ArdunioBlue IOS app because I cannot find any method / sketch to send data from the Arduino BLE module to IOS. However, sending data to the Arduino BLE module from IOS works fine. Unless I am missing something huge, the ArduinoBlue IOS app is "one way communications" only, as far as the user is concerned. I sent an email to the developer, but it bounced as "undeliverable". I would prefer to have BLE comms bidirectional, obviously.
Edit(Update): I found more docs on ArdunioBlue and then found a method (which I have tested and it works) to send messages from the Arduino back to IOS:
But after many tries, I cannot get the Blynk IOS app to connect to the Arduino BLE module, even thought it works fine with other IOS BLE apps, so I posted a question on this in the Blynk Community:
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
Update:
Well, I seem to have been wrong. I thought Blynk was a BLE app, but it's not. From the website:
Quote:
Blynk is a hardware-agnostic IoT platform with white-label mobile apps, private clouds, device management, data analytics, and machine learning.
My experience is that apps which try to be "all things to all platforms" often end of "nothing special for most platforms", so I think I will probably drop the Blynk line of investigation for BLE.
In fact, I may put the HM-10 BLE module back in my "module drawer" and move on to a new Arduino module soon. I have too many Arduino modules to test and my attention span is not very high for module testing, LOL
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
Update:
Have downloaded, installed and tried a number of python git repos for BLE and macOS. Could not get any of around four python BLE repos to work as I had expected or hoped "out of the box" (for example, no discovery or device listing worked) so I'm going to move this little HM-10 BLE module into temporary storage for now and move on to testing a different Arduino module / shield.
I may return to the HM-10 BLE module if I want to build a BLE app to control some relays with my iPhone, since I was happy with how ArduinoBlue worked OOTB. Unfortunately, ArduinoBlue development seems to be "dead" at the moment and the original developer's email bounces back "account deleted" .
Caveat, I deleted xcode off my mac months ago, so you may have better luck of you use a python wrapper over the xcode BLE libs.
My attention span is now very low with many Arduino modules and shields waiting, in dark, unopened, static resistant packages, to be freed from the drawer, wired up and coded.
So, I was able to easily send test messages (using BLE) from the Arduino UNO back to the iPhone ArdunioBlue app using the sendMessage() method.
Basically, from all the testing I did so far, I'm quite happy with ArduinoBlue for IOS.
I think next I may combine this BLE app with NB-IoT to send command and control (C2) messages via BLE from my iPhone to a server on the Internet using an NB-IoT network and get C2 status messages and alerts back from the remote server to my iPhone the same way.
This post describes a "work in progress" project I started today. Here is the High Level Overview:
Currently, this project sits on my desk as an Arduino UNO (on the bottom), an NB-IoT Shield (sandwiched in the middle), a Sensor Shield (on top) with a HM-10 BLE Module (in the little... (13 Replies)
Just finished a quick Python script to send the current unix time over to the Arduino from macOS, so in the absence of GPS or some other way to get the unix timestamp (epoch time) to the Arduino, I can get my macOS and Arduino UNO synced to within a second.
Normally, when the Arduino starts... (9 Replies)
Waiting for more fun Ardunio parts from AliExpress, I decided to test two cheap Chinese Arduino UNO clones.
The Arduino UNO R3 (CH340G) MEGA328P
The Wavgat UNO R3 (CH340G) MEGA328P
Both of these Chinese Ardunio clones sell for about $3 USD, delivered to your door.
The bottom line is... (0 Replies)
HI all...
(Apologies for any typos.)
To add to Neo's Arduino subject matter I have decided to upload this in ".zip" format.
Ignore "*.info" files these are AMIGA icons only and also the "HAM" drawer as these are photos in ancient AMIGA HAM modes.
I have noticed that there are current... (6 Replies)
In my further exploration of Arduino, today I decided to install the arduino-cli on my mac today.
https://github.com/arduino/arduino-cli
I followed the instructions for macOS but when I got to this part:
arduino-cli board list
I got the dreaded "Unknown" Fully Qualified Board Name... (1 Reply)
A very simple Arduino board test... LOL
Here is some very easy code to test a cheap Arduino board I just got from China via Aliexpress. I am still waiting on a about 30 more orders from Aliexpress for more Arduino stuff. This was the first order which made it here.
/*
Arduino test-code... (18 Replies)
I am working on a semi-auto detection idea for Arduino for the Scope project.
It does require a little user intervention but minimal.
It works by just responding to two on screen prompts to unplug and plug Arduino
into a USB port.
There are two versions and both work perfectly well and give... (3 Replies)