Shop OBEX P1 Docs P2 Docs Learn Events
XB2B-WFWT-001 Questions before placing order — Parallax Forums

XB2B-WFWT-001 Questions before placing order

dbritta1dbritta1 Posts: 36
edited 2014-03-13 16:08 in Accessories
Dear Parallax,
You are selling XBee Wi-Fi modules, but I need to find out if there are (or will soon be) SPIN objects, demos, and drivers to use them.
Typical usage would connect modules to local Wi-Fi router.
Alternative usage would configure PC Wi-Fi card to create VPN (Virtual Private Network).
Possible usage in absence of LAN or PC would be point-to-point between Propellers.

I am assuming that XBee modules can be configured with network name, encryption type, and password using CTS.

From PC need C# access to com port or alternative, what drivers are required, where can I download them?
Will Parallax Serial Terminal and/or Full Duplex Serial objects work without modification?
Is there a spin demo showing Propeller to PC communication using the XBee Wi-Fi module?
Is there a spin demo showing Propeller to Propeller communication using the module?
Is there a schematic showing the recommended connections, ie) pull-ups, pull-downs, by-pass caps, etc..?

Dennis

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-02-11 16:20
    Dennis,

    I'm sure there will be SPIN objects available in short order. The XBee Wi-Fi is relatively new and as a new product at Parallax it may take some time to see a specific object for it. Full Duplex Serial can be used with any XBee Modules without modification. Any object written for the XBee Module would most likely make use of the FDS object anyway, since all the communication is serial (unless you're using the SPI interface). As for interface examples, schematics, component requirements. The interface is electrically compatible with other XBee modules, so the following text (available free as a PDF download) would be a good read for anyone curious about XBee modules.

    http://www.parallax.com/product/122-32450
  • dbritta1dbritta1 Posts: 36
    edited 2014-02-19 16:29
    Have used XBee modules in past using USB adapters with serial com drivers and am able to access regular XBees from C# code using com ports.
    Just purchased a couple of XBee Pro S6B modules, and XCTU recognizes them using USB adapter.
    XCTU scan shows my local Wi-Fi network (using a Netgear router) and I could enter password for local network, but am not sure how to access the XBee Wi-Fi modules from C#.
    Am using VisualStudio2012 with .NET under Win7 and presume some type of TCP connection would be appropriate.

    Is there any sample C# code using .NET that shows how to communicate with the XBee modules directly from the PC without using the USB adaptor?
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2014-02-19 16:33
    And don't forget this fine overview from Chris:
  • dbritta1dbritta1 Posts: 36
    edited 2014-02-19 16:47
    Ken,
    Just watched Chris' product review, does not address current situation.
    Have already purchased modules and adapter cards.

    AGAIN:
    Is there any sample C# and/or Spin code that shows how to use the Wi-Fi modules directly from the PC (using a router) that does not use a USB cable and adapter card.

    Dennis
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2014-02-19 18:57
    dbritta1 wrote: »
    Ken,
    Just watched Chris' product review, does not address current situation.
    Have already purchased modules and adapter cards.

    AGAIN:
    Is there any sample C# and/or Spin code that shows how to use the Wi-Fi modules directly from the PC (using a router) that does not use a USB cable and adapter card.

    Dennis

    You bet. See http://forums.parallax.com/showthread.php/153214-Open-Propeller-Project-1-iPad-to-ActivityBot on the last couple of pages. While it's not formally documented in a clean setup as you'd like, there's enough information to set up the XBee S6B to communicate with a PC (or an iPad, as we have done) to Propeller or any other microcontroller. Let us know if this helps you out.

    Ken Gracey
  • dbritta1dbritta1 Posts: 36
    edited 2014-02-20 05:17
    Ken,
    I was aware of ...ActivityBot thread, but the Propeller side code is not Spin, and the Host code is not C#.
    As a recently added product, the XBee Wi-Fi modules do not appear to have the level of documentation and software support I have experienced with other Parallax products.
    Could you, Chris, or another please provide a Spin sample?
    Dennis
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-02-20 09:35
    dbritta1 wrote: »
    Ken,
    I was aware of ...ActivityBot thread, but the Propeller side code is not Spin, and the Host code is not C#.
    As a recently added product, the XBee Wi-Fi modules do not appear to have the level of documentation and software support I have experienced with other Parallax products.
    Could you, Chris, or another please provide a Spin sample?
    Dennis

    Dennis,

    Please bear in mind that the XBee Wi-Fi Module is not a Parallax product, but a 3rd party product we carry. I agree we tend to have good documentation even for such products, but the Wi-Fi module is new to us and it will take some time for code to be developed. The biggest barrier I find to creating an object to such a device is that if it is generic your only option really is to create an object with a method for every unique command you can send to the device. You still have to pass parameters and most often in a typical application 90% of the calls are unused and the object is more complex than it needs to be. Since the device is serial it's really just easier to deal with it like any serial device and send data and commands in that manner. Then you can use FullDuplexSerial or any other serial object in SPIN and on the PC side it is no more complex than opening a COM Port and the baud rate of the device.

    In Ken's link there were other references in that thread to other people using the XBee Wi-Fi to communicate between a PC and the Propeller chip, so for now these are the best examples of how to do something like this. An SPIN object for the Propeller only makes sense if you're going to be changing a lot of internal settings on the XBee module or if you're going to use API mode. Most everyone I know uses XBee modules in transparent mode. So moving forward I am looking at the possibilities for an object, I'm just not sure if there's really a need, and if there is, what direction to go on developing an object for it.
  • dbritta1dbritta1 Posts: 36
    edited 2014-02-21 05:19
    Chris,
    Transparent point-to-point likely most used mode.

    http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/point-multipoint-rfmodules/xbee-wi-fi#docs

    (Legacy) Getting Started Guide: XBee S6B Wi-Fi Development Kit
    Refers to old XCTU version, but gives basic info about setting up transparent connection.

    Using new XCTU:
    1) Attach Wi-Fi modules via USB adapter to PC
    2) Use [Discover radio devices] tab and add found modules
    3) Use [Scans for access points in vicinity] button for each module
    4) Select desired access point and enter password.
    5) Copy MY Module IP Address from first module into DL Destination IP Address of second module.
    6) Copy MY Module IP Address from second module into DL Destination IP Address of first module.

    Dennis
  • dbritta1dbritta1 Posts: 36
    edited 2014-02-21 05:50
    Prior post shows how to set-up modules for point-to-point use with FullDuplexSerial,etc.

    My situation requires creating PC app with Wi-Fi link to multiple Propellers.
    Laptops running app should com via router to XBee Wi-Fi / Propeller devices.
    XBee to Propeller is wired and uses FullDuplexSerial.

    My issue is setting up PC app com link via router to XBee.
    From above, have IP addresses for PCs and XBees.
    Likely can handle, port numbers, but new to TCP socket programming.
    Any advice how to proceed would be appreciated.
    Dennis
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-02-21 09:38
    Dennis,

    I think you lost me on the TCP socket programming end of things. In transparent mode the XBee will still communicate serially via the normal connection to the PC. You still open a COM Port and send/receive data the same as you would with a non-Wi-Fi XBee. The communication can be done the same way. Unless I am missing a particular detail there is no need to do any TCP socket programming. You can change the destination address for the connection via serial. The only thing I can guess is that you're referring to having the PC communicate with the XBee Wi-Fi Modules without one on the PC end?
  • dbritta1dbritta1 Posts: 36
    edited 2014-02-22 17:25
    Chris,

    I have already implemented transparent mode, but this is not what is required.

    "having the PC communicate with the XBee Wi-Fi Modules without one on the PC end"

    Exactly! That is what I need to accomplish. Multiple portable Propeller/XBee Wi-Fi devices connecting to PC apps via a router.
    This is important for creating consumer level products, customers do not want (or need) XBee dongles hanging from their laptops and tablets.
    Using a router connection is important in environments such as office buildings and hospitals, where point-to-point will not work between floors,
    (too much steel and concrete) but Wi-Fi access points have already been hardwired into the structures.

    A simple C#/.NET sample program is what I am looking for.
    Dennis
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-02-24 13:42
    I'm not a C# programmer myself. I have used .NET via VisualBASIC, however I have not yet tried to connect to anything other than displaying a web page via the application. There are tons of sites with .NET examples for making UDP and TCP connections. With example code and the manual for the XBee Wi-Fi you should be able to establish a serial ink that way. I know in the thread mentioned earlier a few people are doing this very thing from Apple devices in order to program the Propeller Chip successfully. It is doubtful Parallax will be publishing C#/.NET code for connecting the PC at this time.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-03-09 23:28
    Dennis,

    If a VB.NET example will help, let me know. I've been working on something this weekend.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-03-13 16:08
    I meant to add to that I have successfully communicated via TCP between a VB.NET app and the XBee Wi-Fi Module.
Sign In or Register to comment.