两个移动设备之间的通信的黑莓蓝牙示例程序 [英] Blackberry Bluetooth sample program for communication between two mobile devices

查看:260
本文介绍了两个移动设备之间的通信的黑莓蓝牙示例程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个黑莓开发商和确实想code传输和蓝牙使用两个设备之间接收信息。

<一个href=\"https://github.com/blackberry/JDE-Samples/tree/master/com/rim/samples/device/bluetooth/bluetoothdemo\" rel=\"nofollow\">https://github.com/blackberry/JDE-Samples/tree/master/com/rim/samples/device/bluetooth/bluetoothdemo

我提到蓝牙演示的这个计划,


  1. 注意到在AppScreen可用的蓝牙串行端口的信息,如果他们支持或不找到


  2. 该SPPScreen的java文件需要蓝牙串行端口的信息,并连接到串行端口的设备ID为您好


本级已得到了如DSR_ON,DSR_OFF,DTR菜单使DSR作为,DSR为关闭,检查DTR状态...我没有得到

本类还包括对回环回了这期间使用receive方法的标志。

本类包含的方法送出数据()它发送1K的数据和 dataReceive()方法来接收数据,但这种方法还没有被调用的任何地方按我的code里面的学问。

我的步骤了implemeting的code之前。

蓝牙不能在模拟器工作,所以我签署并于2实际设备进行测试。

我叫两个设备(假设设备A和设备B)为你好,手动配对它们的应用程序之外。

然后我推出两个设备上的应用程序。

从Device B我选择侦听来自菜单连接和设备A选项...我连接到嗨设备,然后它得到连接,然后在设备中的它说:

键入的东西... ...,并在设备B它说:

连接外部设备,然后输入一些东西......

所以到这一步程序工作正常。现在,当我输入一些东西好像没有什么改变。

所以,我关心的是


  1. 这是否code真的发送和两个设备A和B之间接收数据。


  2. 如果任何一个得到整个项目code,请解释。



解决方案

是它并发送你从一个BB为另一种类型的文本。逐个字母。

I am a blackberry developer and do want to code to transmit and receive information between two devices using bluetooth .

https://github.com/blackberry/JDE-Samples/tree/master/com/rim/samples/device/bluetooth/bluetoothdemo

I referred this program of bluetooth demo which

  1. Takes info of bluetooth serial ports available in AppScreen and finds if they are supported or not

  2. The SPPScreen java file takes info of bluetooth serial port and connects to serial port whose device id is " Hi there "

This class has got terms like DSR_ON , DSR_OFF , DTR in menu which enables DSR as on, DSR as off and checks DTR status ... which I did not get

This class also includes loopback on and loop back off which is a flag used during receive method.

This class contains method sendData() which sends 1k data and dataReceive() method to receive data, but this method has not been called anywhere as per my knowledge inside the code.

Steps i took before implemeting the code .

The bluetooth does not work on simulator , so I signed and tested on 2 real devices .

I named both the devices (Suppose Device A and Device B) as "Hi there" and paired them manually outside the application .

Then I launched the application on both the devices .

From Device B I selected the option for Listen for connection from menu and on Device A ... I connected to Hi there device then it got connected and then on device A it says

"Type something..." and on device B it says

"Connect external device and then type something..."

So up to this step the program works fine . Now when I type something nothing seems to happen.

So my concern is

  1. Does this code really sends and receives data between the two devices A and B.

  2. If any one gets the whole project code, please explain.

解决方案

Yes it does send text that you type from one bb to another. Letter by letter..

这篇关于两个移动设备之间的通信的黑莓蓝牙示例程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆