Shop OBEX P1 Docs P2 Docs Learn Events
XBee Wifi & Propeller Activity Board, how to connect? - Page 2 — Parallax Forums

XBee Wifi & Propeller Activity Board, how to connect?

2»

Comments

  • Mike CookMike Cook Posts: 829
    edited 2014-01-11 07:21
    Great work Guys! I've been following along as time permits.

    I was able to use jazzed’s terminal pass through program to talk to the module:
    http://forums.parallax.com/showthread.php/152003-MyActivityBot-(Android-App)-Motion-Control-your-bot?p=1233014&viewfull=1#post1233014


    Then I used a terminal program to configure the module. AT-Commands can be found here, chapter 8 page 109:
    http://ftp1.digi.com/support/documentation/90002180_G.pdf


    Here is the serial conversation with the module. Note: Comments // are not entered
    +++OK                // +++ to det into AT-Command Mode
    ATIDHello           // ATID is used to set/query SSID, my SSIS is Hello
    OK
    ATEE3                 // ATEE is to set security type, 3=WEP
    OK
    ATPK661818ea2b       // ATPK used to set Key  661818ea2b
    OK
    ATIP1                          //  IP – IP Protocol, 1 = TCP
    OK
    ATAC                          // AC – Applies Changes
    OK    
    ATWR                      // WR – Write to non-volatile mem
    OK
    +++OK
    ATAI                        // AI - Association Indication, 0 = Associated !!!!!!!!
    0
    ATMY                    // MY -  IP Network Address                                     
    192.168.0.102
    ATDE                    // DE - Destination Port, this is in hex
    2616
    

    After all of that I used Mocha Telnet Lite on my iPhone/iPad and made a connection to the module. And I was able to type messages back and forth.

    Now on to TechBasic………………
    IMG_0490[1].PNG
    640 x 1136 - 87K
  • banjobanjo Posts: 443
    edited 2014-01-11 07:28
    Glad to hear that Mike!
    I've now also been able to send data from TechBasic to XBee (yesterday the other way around), but what is displayed on XBee/Propeller side is garbage.
    I'll look into it when I'm back home from work and will check some of the other examples provided in this thread.

    Mike, are the AT codes...
    ATAC
    ATWR
    
    ...in practice storing the earlier made settings (SSID etc.) so you don't need to set them on every run?

    -Thomas
  • Mike CookMike Cook Posts: 829
    edited 2014-01-11 07:45
    banjo wrote: »
    Glad to hear that Mike!

    Mike, are the AT codes...
    ATAC
    ATWR
    
    ...in practice storing the earlier made settings (SSID etc.) so you don't need to set them on every run?

    -Thomas

    Yes that was my thought.

    But you might want to also set a static IP using the ATMA AT-Command, if you are saving settings. Or whatever code that is running on the propeller could configure the module each power up.

    As you can probably tell I still need to study the Digi documents. I have been using the Roving Network WiFly modules. So I was trying to see how far I could get without reading any manuals!
  • jazzedjazzed Posts: 11,803
    edited 2014-01-11 08:31
    Congrats Mike Cook and banjo!
  • banjobanjo Posts: 443
    edited 2014-01-12 22:26
    Ken Gracey wrote: »
    Yeah! Congrats on getting the basic connectivity working. You may have overcome the biggest hurdles. Provided you have some examples with TechBASIC you should be able to produce some kind of iPad to Propeller control, maybe bi-directional. This is an important first step. I can't help but imagine if you could create a bi-directional ActivityBot control system with your framework.

    I'll keep watch of the thread, Thomas. But feel free to bring me back to take a look via e-mail if I go dormant for too long.

    Ken Gracey

    Well, I took up the challenge. Assembled my ActivityBot and a few hours later I'm now controlling speed and direction by tilting my iPad. It was actually easier than I thought.
    To get bi-directional feedback I'm using a Ping sensor to report the distance to iPad. Still in the plan is to show the distance on iPad visually with e.g. a moving "wall".
    As this is just a proof of concept there are a lot of things to enhance: smoother steering and speed control, tackling the lag (reason perhaps Wi-fi?), rewriting most of the code etc.
    I'll later on post an update with the Propeller and TechBasic code and a video if I found a way and a person to record it.

    -Thomas
  • David BetzDavid Betz Posts: 14,514
    edited 2014-01-13 03:47
    I know this is different from what people are working on in this thread but I thought I'd let you know that I have been able to get my Xbee Wi-Fi module to connect with my router and am in the process of writing a driver (a limited HTTP server actually) that will allow a browser-based program to download code into an ActivityBoard. My plan is to write some high-level code to setup the connection using PropGCC but have the low-level frame handling code that communicates directly with the Xbee run as a COG driver. Once a download session is established, I'll pass control entirely to the frame driver COG to manage the download and start the user's program. This will mean that all of hub memory apart from a small amount of buffer space used by the frame driver will be available for the user program. The Xbee module and the TCP/IP connection will be held open by the frame driver so it will consume one COG while the user program is running. When the user program finishes, the frame driver will restart the HTTP server and resume communications with the web-based IDE. I've not yet determined whether it is possible to fit the frame driver code in a single COG but I'm optimistic that there will be enough room.

    Anyway, I am currently able to send and receive Xbee API frames and will probably work on translating my C frame code to a PASM state machine for the frame driver next.
  • banjobanjo Posts: 443
    edited 2014-01-13 05:55
    David, that's very interesting, although way over my head with my two weeks of Propeller experience.

    Does it mean you can completely replace the USB-connection to the board by uploading wireless?

    -Thomas
  • David BetzDavid Betz Posts: 14,514
    edited 2014-01-13 06:14
    banjo wrote: »
    David, that's very interesting, although way over my head with my two weeks of Propeller experience.

    Does it mean you can completely replace the USB-connection to the board by uploading wireless?

    -Thomas
    That is the goal but it's too earlly to tell whether it will be possible.
Sign In or Register to comment.