androidiosbluetoothspp

Bluetooth SPP: Bluetooth SPP Pro (Android) vs. Microchip SmartData (iOS)


All,

I am attempting to communicate, over an SPP profile, with an RN4678 Bluetooth chip connected to a microcontroller.

I never have a problem with the Android app. I can always pair (if not paired), connect, send messages to the chip, and disconnect. An example session is below:

%CONNECT,AB9876543210%
%RFCOMM_OPEN%
%TEST%    <-- Message sent using the keyboard ("Byte Stream Mode" option)
%RFCOMM_CLOSE%
%DISCONN%

With the iOS app, I can always pair (if not paired), connect, and disconnect. However, if I cannot send a message to the chip. An example session is below:

%LCONNECT,499B107AB1B5,1%
%LSECURED%
            <-- Here I try to send a message, but it is never received
%DISCONN%

The funny thing is that if I first connect/disconnect using the Android, and then I connect using the iPhone/iPad, reception is successful !!!!

%LCONNECT,499B107AB1B5,1%
%LSECURED%
%TEST%      <-- Yeah !!! Microcontroller receives the message
%DISCONN%

As far as I know, that path for the processing is the same ... In other words:

if(msg equals "RFCOMM_OPEN" or msg equals "LSECURED")
   go to state that monitors incoming messages

I, therefore, kindly ask the following:

1 - Have you encountered anything similar? Do you have any hints? What could the Android App possibly do that the iPhone app is not doing? What am I overlooking or not understanding?

2 - Are you aware of an app that works for both iOS and Android? What I mean, designed by the SAME guy/company?

If you need more info, please ask. I simply did not want to be too 'verbose'.

Thank you for your assistance.

Sincerely, Vincenzo


Solution

  • All,

    At my job we have been playing with two RN modules: the RN4677 (we started with this module) and the RN4678.

    The module allows the user to enter (and exit) a command mode. The RN4677 allows bidirectional communication with a manager while still in command mode. The RN4678 does NOT allow bidirectional communication with a manager while still in command mode.

    All I needed to do was exit command mode (by issuing the command '---\r'). Now both modules work with Windows/Android/iOS ...

    To summarize:

    command "$$$\r" to enter command mode
    various commands, requests for settings, ...
    command "---\r" to exit command mode (a must for RN4678)
    

    Everything will now work fine for both modules

    I must say ... that was painful to troubleshoot ...

    Sincerely,

    Vincenzo