HM-10 Bluetooth Module

Hey all,

Long story short, I'm trying to use a Sunfounder HM-10 bluetooth module to control a robot via mobile (Moto G android).

I'd like to think I was quite capable with the basics of Arduino, but Bluetooth is a whole new ball game, and I'm having issues.

I can pair my phone with the module using a bluetooth terminal app, and the pairing code 000000 (yes, 6 not 4 zeros, can't say how much trouble just that caused me). But when I try and connect the two, I get the error "SPP Communication Failure." >:(

I've searched and searched and can't find a solution, so can anyone offer any advice, or point me in the right direction to begin communication between my mobile and Arduino?

(As an aside, I started using app inventor to create a GUI for Bluetooth communication, but have since found out it only supports Bluetooth v2.0, whereas my phone and the module use v4.0. Is there a way around this, or a different method I can use? Bear in mind there are only a few simple commands I need to send and I would like to be involved in as little complex code as possible!!)

Thanks in advance!! :smiley:

Come on guys I really need some help on this...

I'm taking the robot to an international exposition in Mexico in less than a month so it needs to be ready by then...

As an incentive I'll pop a shoutout to whoever helps on our stand

Clearly, there are three possibilities:

bad Arduino code - details of which are conspicuous by their absence

bad Android code - details of which are conspicuous by their absence

bad wiring - details of which are conspicuous by their absence

So, in the light of your secrecy on these matters, I guess it's no wonder your post is met with a deafening silence.

Bluetooth is really just wireless serial and thus the "new" of the "whole new ball game" is essentially just in matters of procedure, and you can prove the essential Arduino code by sending messages by wire from the serial monitor in the normal manner.

I get the error "SPP Communication Failure."

I assume this is from your Android app. I guess the first thing to do is prove your comms are kosher with a simple bluetooth terminal programme. It sounds like that is all you need anyway.

GUI for Bluetooth communication, but have since found out it only supports Bluetooth v2.0,

Bluetooth v2.0 is a fallback from BT4. I therefore believe that by "only supports Bluetooth 2.0", it simply means that it does not support advanced features exclusive to Bluetooth 4. This may be nothing more than the ability to activate BT4 protocols, and therefore not initially a problem.

@originalname: Please do not cross-post. This wastes time and resources as people attempt to answer your question on multiple threads.

Your other thread deleted.

  • Moderator

Come on guys I really need some help on this...

On your unposted code? We aren't mind-readers.

Read this before posting a programming question

How to use this forum

I remember the app inventor isn't support BLE, so you can download some app in the app store(like LightBlue for IOS).Then you can connect the BLE with your phone.But I don't know how to send the message.I will try to find how to do that and I will tell you when I find it.