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

时间:2017-07-10 15:18:37

标签: android ios bluetooth spp

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

1 个答案:

答案 0 :(得分:0)

所有

在我的工作中,我们一直在玩两个RN模块:RN4677(我们从这个模块开始)和RN4678。

该模块允许用户进入(和退出)命令模式。 RN4677允许在仍处于命令模式时与管理器进行双向通信。 RN4678在命令模式下不允许与管理器进行双向通信。

我需要做的就是退出命令模式(通过发出命令&#39; --- \ r&#39;)。现在这两个模块都适用于Windows / Android / iOS ......

总结:

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

现在一切都可以正常运行

我必须说......排除故障很痛苦......

此致

蒙特拉