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
NG_BLUETOOTH(4) 					   BSD Kernel Interfaces Manual 					   NG_BLUETOOTH(4)

NAME
ng_bluetooth -- placeholder for global Bluetooth variables SYNOPSIS
#include <sys/types.h> #include <netgraph/bluetooth/include/ng_bluetooth.h> DESCRIPTION
The ng_bluetooth module is a placeholder for global Bluetooth variables. All Bluetooth variables can be examined and changed via sysctl(8). Bluetooth Variables Below is the description of default variables. Each Bluetooth module might add its own variables to the tree. net.bluetooth.version A read-only integer variable that shows the current version of the Bluetooth stack. net.bluetooth.hci.command_timeout A read-write integer variable that controls the Host Controller Interface (HCI) command timeout (in seconds), i.e., how long the HCI layer will wait for the Command_Complete or Command_Status event from a Bluetooth device. net.bluetooth.hci.connection_timeout A read-write integer variable that controls the HCI connection timeout, i.e. how long the HCI layer will wait for the Connection_Complete event. Normally this should not be required as Bluetooth devices have connection timeout of their own and will send event back. This timeout is required to ensure that no connection will stall in case when the HCI transport layer is broken. Be careful when changing this variable. Make sure you understand what you are doing. net.bluetooth.hci.max_neighbor_age A read-write integer variable that controls time-to-live (in seconds) for entries in the HCI neighbor cache. Every time a Bluetooth device performs an Inquiry operation, the results will be put in cache. Later when a Bluetooth device establishes a baseband connec- tion, it will try to find the matching entry in the cache and use it. This might speed up establishment of the baseband connection. net.bluetooth.l2cap.rtx_timeout A read-write integer variable that controls the Link Layer Control and Adaptation Protocol (L2CAP) Retransmission Timeout (RTX) (in seconds). Every time the L2CAP layer submits a control command, the RTX timeout is set. The value of the RTX timeout should be greater or equal to the value of the HCI connection timeout. Be careful when changing this variable. Make sure you understand what you are doing. net.bluetooth.l2cap.ertx_timeout A read-write integer variable that controls the L2CAP Extended Retransmission Timeout (ERTX) (in seconds). In some cases remote peer may respond with PENDING status to the L2CAP control command. In this case the L2CAP command timeout is reset to the ERTX timeout value. The value of the ERTX timeout should be greater or equal to the value of the RTX timeout. Be careful when changing this variable. Make sure you understand what you are doing. SEE ALSO
ng_btsocket(4), ng_hci(4), ng_l2cap(4), sysctl(8) HISTORY
The ng_bluetooth module was implemented in FreeBSD 5.0. AUTHORS
Maksim Yevmenkin <m_evmenkin@yahoo.com> BSD
November 9, 2002 BSD
All times are GMT -4. The time now is 12:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy