Low cost BLE modules?

Hemi345

Senior Member
I had been using the HM-10 BLE clones purchased off Ebay, but the latest version of Android is no longer compatible with them. I have some in various projects and was using RoboRemo (very cool Android app) to build a little interface for them. Noticed the issue first when my custom made RGBW ambient light behind my TV quit working and so I thought the BLE module died... swapped it out for another with same issue, phone sees it but can't connect. Turns out an Android update on my phone will no longer allow them to pair. Found a thread on Ti's website that explains the issue: https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/p/670467/2472298
and another with some solutions: https://blog.yavilevich.com/2018/04/should-you-throw-away-your-cc41-hm-10-clones-now-that-android-8-is-here/
but haven't had a chance to really dive into it.

TLDR; spend the money on the more expensive BLE modules
 

Hemi345

Senior Member
BTW, the cheap modules were very easy to interface. small code snippet below for gist of how I communicated with them using a 20M2:
Code:
'define variables (v = byte, w = word):
symbol wColor    = w0    'b0 and b1
symbol wBright    = w1    'b2 and b3
symbol vBright    = b2
symbol vCmdFound= b4
symbol vStatus    = b5
'...

Do
        hsersetup B9600_8, %000    'setup hardware serial Baud rate to 9600, %00 = true inverted (idle high), clear the buffer
        Pause 1500
        wColor    = -1    'set the var to a non-valid value
        wBright    = -1    'set the var to a non-valid value
        HSerIn wColor        'read first byte from buffer
        HSerIn wBright    'read second byte from buffer
        if b1 = 0 Then    'valid character received for color (data is in b0)
            wBright = wBright - 48
            wBright = vLvls / 9 * wBright '* 28 'ASCII 0-9 range gives PWM range of 0 to 252'
            vCmdFound = 100    'set the found number to 100; not valid
            lookdown wColor,(82,114,71,103,66,98,87,119,80),vCmdFound
            if vCmdFound <> 100 then
                select case wColor
                    case 82,114,71,103,66,98,87,119 : gosub getPwmDuty
                end select
                select case wColor
                    case 82,114    : vStatus = 1 : vRedLvl = wBright : pwmduty pRed, wBright    'R or r
                    case 71,103    : vStatus = 1 : vGrnLvl = wBright : pwmduty pGreen, wBright    'G or g
                    case 66,98    : vStatus = 1 : vBluLvl = wBright : pwmduty pBlue, wBright    'B or b
                    case 87,119    : vStatus = 1 : vWhtLvl = wBright : pwmduty pWhite, wBright    'W or w
                    case 76 : gosub setLevel    'L for levels
                    case 80 : gosub togglePower 'P for Power
                end select
            sertxd( "Received ",#wColor," and ",#wBright,13,10)
            hserout 0,("Cmd Rcvd")
            end if
        end if
    Loop
 
Top