xbee explorer usb with phonegap

About Forums Forum Troubleshooting xbee explorer usb with phonegap

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #925
    jim
    Participant

    Hi. I am a newbie with arduino but a expert in javascript. I found this breakoutjs extremely eazy to uses. thanks so much 🙂

     

    Im just about to write a phonegap app for android and i hope to uses breakout in my project.

    my current tech is:

    2 x xbee series 1

    1 x xbee explore usb

    1 x arduino uno

    Im wanting to communicate using my xbee explorer (attached to my android tablet, that has a usb port) to my arduino uno.

    It works using it via a pc.  and it works using a serial monitor app on my android(not created my me)

    My question is

    Can i uses breakoutjs to communicate using serial. eg Serial.Read and or Serial.print.

    in other words can i uses breakoutjs  to send commands to my arduino via the xbee.

    I have read your pdf about the arduino fio/xbee setup, would this same method be used for the arduino uno?

    and what is the line of code that lets me read and write serial commands using breakoutjs.

    Kind regards

    jim

    #926

    Just to be sure I’m understanding correctly… you have a xbee explorer attached to your Android tabled and would like to communicate from the Android tablet with and arduino using XBee with no PC involved?

    Currently Breakout requires a serial to websocket bridge. This is the role of Breakout Server. However if phonegap provides a serial interface for javascript you could bypass the bridge entirely. This would require changing the Breakout source to allow direct serial connection. I’ve been meaning to abstract away the connection type so that this type of thing is easier.

    If phonegap doesn’t provide a serial interface, you will need to create a serial to websocket bridge that runs on your android tablet. You may be able to port the existing java code for Breakout Server (https://github.com/soundanalogous/BreakoutServer) to an android application. That could create a local serial to websocket bridge and webserver on your Android device. Another option is if your Android application can run nodeJS you could try to run the nodeJS version of breakout server (see Breakout/node_server/).

    Also see my recent post on using Xbee with Arduino: http://www.jeffhoefs.com/2013/06/wireless-firmata-using-xbees/. An Arduino Uno will work but you’ll have to manually reset the Arduino in order to make a connection. With a FIO you’ll get an auto reset.

    Let me know if you’re aware of a phonegap serial plugin. Would love to try that out.

    -jeff

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.