Shop OBEX P1 Docs P2 Docs Learn Events
Connectivity problems with an eb500 mod. and a cellular device — Parallax Forums

Connectivity problems with an eb500 mod. and a cellular device

sillersfavoritesillersfavorite Posts: 1
edited 2007-02-20 21:15 in BASIC Stamp
I am actually taking place in an MIT grant within a class in my school. We are currently attempting to send the messages directly to the cell phone. We have already perfected our connection between two modules. We are having no problem sending the codes between the modules, but when it comes to connecting completely with the cellular device and the module we are having some troubles. We have attempted using a Motorola Razor, A sidekick 3, and one of those new BlackJack smart phones. We can easily connect the phone to the module, but when it comes to sending messages, we are completely stumped.

Any ideas on making this a little easier for us? Perhaps it is easier than we think it is actually?

Thanks yeah.gif

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-02-14 15:14
    Hello,

    This question seems to be coming up a lot lately. Everyone wants to connect to their Cell Phone because it has Blue Tooth, but what is missing is the information about what the Cell Phone can and can’t do on the Blue Tooth connection. Blue Tooth connections are based on profiles. These are kind of like protocol layers that Blue Tooth communicates on. The EB500 uses SPP or Serial Protocol Profile. In order to talk to your Cell Phone two things have to happen.

    1) The Cell Phone needs to be able to connect and communicate via SPP and understand commands sent to it through the serial mode. This is important because even if the phone supports SPP that doesn’t mean it will acknowledge anything sent to it.
    2) You have to know the command format and commands for the phone. If you want to talk to the phone you have to say things it will understand. To know this you will need detailed information from the manufacturer. Baud rate would also be important to know if the device supports SPP commands.

    Once you have that information it should be pretty straight forward, but without it you may not get anywhere without a lot of experimentation. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • nineteen82nineteen82 Posts: 1
    edited 2007-02-20 19:04
    Hi,

    I am working on a cell phone/EB500 project as well. I have tried connecting the EB500 to a phone which implements JSR-82 (Bluetooth API) and supports SPP profile. I have written a bluetooth server midlet for the phone. The EB500 does connect to the phone. This is apparent from the debug screen as well as the connected bluetooth icon on the phone. First a snippet of code from the midlet before i reveal the problem.

    String connURL = "btspp://localhost:" + MYSERVICEUUID_UUID.toString() + ";" + "name=" + myServiceName;

    try {

    localDevice.setDiscoverable(DiscoveryAgent.GIAC);

    StreamConnectionNotifier notifier = (StreamConnectionNotifier)Connector.open(connURL);

    StreamConnection con = (StreamConnection)notifier.acceptAndOpen(); ///this is a problem

    printToScreen("* Lets read data");

    DataInputStream in = con.openDataInputStream();

    printToScreen("* Received from Client: \"" + in.readUTF() + "\"");

    }catch{}

    Essentially the code creates a bluetooth server connection, an input data stream, receives text over the stream and prints it to the screen. The problem here is at the acceptAndOpen() function call. It never returns! This has been puzzling me for weeks. I have not been able to get around it. If this function returns, then an input stream can be created and text sent from the EB500 can be received. I have also tried doing this with a separate thread, but got the same results. By the way, of course I started the server app before turning on the EB500.

    As for SPP specifications for the phone, well the MotoRazr V3i specifies none. Flow control is automatically handled by the SPP implementation. All you have to do is initialize and register services in the SDDB, which I did.

    Anyone working on something similar please message me and we'll trade notes. For Mr. Savage, please let me know which phones allow connection and communication from the EB500.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-02-20 21:15
    Hello,

    Any phones which support Blue Tooth SPP should work, although we cannot guarantee this. The EB500 is manufactured by A7 Engineering so they may have more information than me. It would seem the more efficient way to debug the communication is to send data to the BASIC Stamp Module to DEBUG. Of course the one final piece of missing information here is the baud rate. Even with SPP there needs to be an established baud rate. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.