Sponsored Content
Top Forums Programming Basic Arduino UNO Bluetooth Testing with the BLE 4.0 (CC2541, MLT-BT04 IC) Post 303043396 by Neo on Monday 27th of January 2020 11:29:44 AM
Old 01-27-2020
ArduinoBlue update:

Found some more ArdunioBlue docs:

Code:
https://github.com/purwar2016/ArduinoBlue-library/wiki/Documentation

Showing these classes:

Code:
ArduinoBlue class

phone(Stream obj) - Constructor pass SoftwareSerial object. Alternatively, you can pass any Serial. For example, on the Arduino Mega you can pass phone(Serial2) instead. Note if you use Serial, you won't be able to use serial communication through USB.

int getButton() - Returns once the ID of the button that was pressed. Returns -1 otherwise.

int getSliderId() - Returns once the slider ID of the slider that was moved. Returns -1 otherwise.

int getSliderVal() - Returns the value of the slider of the slider that was moved.

int getThrottle() - Returns the throttle value of the joystick.

int getSteering() - Returns the steering value of the joystick.

void sendMessage(String text) - Sends the text to the phone as a popup.

String getText() - Returns the text that was sent from the app's text box.

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.

Basic Arduino UNO Bluetooth Testing with the BLE 4.0 (CC2541, MLT-BT04 IC)-img_0d99327371ad-1jpeg


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.
 

7 More Discussions You Might Find Interesting

1. OS X (Apple)

Semi-Automatic Arduino Detection.

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)
Discussion started by: wisecracker
3 Replies

2. Programming

Very Basic Arduino Uno Board Testing

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)
Discussion started by: Neo
18 Replies

3. Programming

Arduino-cli - Uploading to Unknown Chinese Arduino Boards using the Arduino Command Line Interface

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)
Discussion started by: Neo
1 Replies

4. Programming

More Arduino Stuff...

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)
Discussion started by: wisecracker
6 Replies

5. Programming

Chinese Arduino UNO Clones - The Wavgat versus the generic UNO R3 Clone - The Winner Is?

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)
Discussion started by: Neo
0 Replies

6. Programming

Arduino UNIX Time - Syncing Computer UNIX Time to Arduino Time with Python

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)
Discussion started by: Neo
9 Replies

7. Programming

Arduino Project: iPhone to HM-10 BLE to NB-IoT Shield to NB-IoT Network to Internet to Linux Server

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)
Discussion started by: Neo
13 Replies
BTHOST(1)						    BSD General Commands Manual 						 BTHOST(1)

NAME
bthost -- look up Bluetooth host names and Protocol Service Multiplexor values SYNOPSIS
bthost [-bhp] host_or_protocol DESCRIPTION
The bthost utility looks for information about Bluetooth hosts and Protocol Service Multiplexor (PSM) values. It gets this information from the /etc/bluetooth/hosts and /etc/bluetooth/protocols files. In host mode, it simply converts between the host names and Bluetooth addresses. The argument can be either a host name or a Bluetooth address. The program first attempts to interpret it as a Bluetooth address. If this fails, it will treat it as a host name. A Bluetooth address consists of six hex bytes separated by a colon, e.g., ``01:02:03:04:05:06''. A host name consists of names separated by dots, e.g., ``my.cell.phone''. In protocol mode, it simply converts between the Protocol Service Multiplexor names and assigned numbers. The argument can be either a Pro- tocol Service Multiplexor name or an assigned number. The program first attempts to interpret it as an assigned number. The options are as follows: -b Produce brief output. -h Display usage message and exit. -p Activate protocol mode. The bthost utility will print results to the standard output, and error messages to the standard error. An output can be quite different, here is an example that demonstrates all of the possibilities: % bthost localhost Host localhost has address FF:FF:FF:00:00:00 % bthost ff:ff:ff:00:00:00 Host FF:FF:FF:00:00:00 has name localhost % bthost -b localhost FF:FF:FF:00:00:00 % bthost -b ff:ff:ff:00:00:00 localhost % bthost do.not.exists do.not.exists: Unknown host % bthost 0:0:0:0:0:0 00:00:00:00:00:00: Unknown host % bthost -p sdp Protocol/Service Multiplexor sdp has number 1 % bthost -p 3 Protocol/Service Multiplexor rfcomm has number 3 % bthost -bp HID-Control 17 % bthost -p foo foo: Unknown Protocol/Service Multiplexor FILES
/etc/bluetooth/hosts /etc/bluetooth/protocols EXIT STATUS
The bthost utility exits 0 on success, and >0 if an error occurs. SEE ALSO
bluetooth(3), bluetooth.hosts(5), bluetooth.protocols(5) AUTHORS
Maksim Yevmenkin <m_evmenkin@yahoo.com> BSD
May 8, 2003 BSD
All times are GMT -4. The time now is 10:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy