XBee Wifi & Propeller Activity Board, how to connect?
banjo
Posts: 447
So I received a XBee Wifi and thought it would be a piece of cake to connect physically and electronically to the PAB (perhaps it still is?). According to the PAB guide however, the XBee RF socket is not supporting the XBee Wifi.
<....... XBee RF Module Socket
This socket fits most XBee wireless modules ...NOTE: This socket does not support XBee Wi-Fi. See also 12) XBee Access, p. 4....>
As the pin spacing is different than on the breadboard, I can neither plug it in there without adapters that might be challenging to find where I live. Of course I'd be glad to order them from Parallax, but will then wait for ~2 weeks for the mail to arrive
I'm now accordingly looking for guidance on below questions:
1. Is it correct that the RF socket is not supporting the XBee Wifi?
2. How should I then connect them physically and electronically?
3. Any links or documentation for the software side (C or Spin)?
-Thomas
<....... XBee RF Module Socket
This socket fits most XBee wireless modules ...NOTE: This socket does not support XBee Wi-Fi. See also 12) XBee Access, p. 4....>
As the pin spacing is different than on the breadboard, I can neither plug it in there without adapters that might be challenging to find where I live. Of course I'd be glad to order them from Parallax, but will then wait for ~2 weeks for the mail to arrive
I'm now accordingly looking for guidance on below questions:
1. Is it correct that the RF socket is not supporting the XBee Wifi?
2. How should I then connect them physically and electronically?
3. Any links or documentation for the software side (C or Spin)?
-Thomas
Comments
Can you post a link here to the PAB guide that says you can't use the module?
I have a Digi International S6B Wifi XBee module that I've been talking to in the XBee socket. Haven't had time to work up a driver yet, but it is in my plan.
The PAB guide is here: http://www.parallax.com/sites/default/files/downloads/32910-Propeller-Activity-Board-Guide-v1.0.pdf
The XBee WiFi S6B has the following specifications:
Transmit Current up to 309 mA
Receive Current 100 mA
Supply Voltage 3.14 to 3.46 VDC
The prior XBee WiFi S6 has these specifications, which were in effect when we prepared the Propeller Activity Board documentation:
Transmit Current up to 260 mA
Receive Current 140 mA
Supply Voltage 3.1 to 3.6 VDC
Nothing stands out here, so I did a little more digging and came across this document http://www.digi.com/pdf/xbee-wi-fi-s6 to-s6b-migration-guide.pdf where I found this important note:
The S6 can't be used in any Propeller Activity Boards because of the requirement for the large capacitor. The S6B will work in the Activity Board Revision B (B has a 1 uF capacitor on the XBee power supply pin). The S6B may/may not work in the Propeller Activity Board Revision A because it does not have the 1 uF capacitor. A small capacitor is recommended for XBee power supply pins.
Also, you're probably wondering about when we have stock of Propeller Activity Board Revision Bs. Probably not for another 60 days minimum.
So, plug it in! Share the results.
Ken Gracey
Assuming things work out, you will be seeing several demos with that module. I hope that eventually it will be viable enough for you to stock for resale.
We already have hundreds in stock - they're just not available for sale yet. The activity you're seeing here is because I've sent some out to a few customers (including Thomas, in Finland) to start working with them. Chris Savage is working on a quick start setup guide and web descriptions. Shall I throw one into the USPS queue to you?
Ken Gracey
Excellent choice of hardware BTW. Great user docs, programming API, and all necessary agency approvals.
In order to get a pair of these talking between each other over my network I needed only set the SSID, Encryption and passcode using them in transparent mode. I was able to then go to the terminal windows and connect to both modules and send data across from one to the other. Both were connected to my PC via the XBee USB Adapter Rev B and I could send data from one and see it in the terminal window on the other. I also did the typical loopback test where I connected DIN/DOUT together on one and data sent to it was returned. My next test will be to see if I can send data between my home office and Parallax.
Just plugged it in and connected as above, it worked right away (giving OK after +++)! This is on PAB Rev A.
Reason I'm helping him out is because he's going to spend a bit of time on the iPad/XBee SB6/Propeller concept.
Ken Gracey
OK, in this case you should be able to configure it with Spin/C code. Won't be as quick and easy as using an XBee USB Adapter, but at least you can keep moving forward.
See if your iPad can recognize this device, too.
Ken Gracey
And it is visible on the iPad as well.
Continuing with hooking it up correctly to my WLAN with security keys etc.
-Thomas
Great progress. Wish I could make the time to do this, too! At least I can work with and through you guys.
Once you can see it on iPad you should be able to give it a single line of TechBASIC code and send data to it.
Ken Gracey
The XBee requires a minimum of VCC, GND, DOUT and DIN for communication, so any of those methods and more are available (including the PAB). However to update firmware (which I did have to do) you also need RTS & DTR, limiting methods and really requiring the adapter board. I also needed to reset my module at some point which requires access to the reset pin.
Current status:
As I'm not getting anywhere further apart from seeing the XBee on my iPad, I have a few questions:
1. On my iPad under Settings/Wi-Fi, should I connect to the xbee-adapter or should it be enough that it is visible there?
2. Will it be a point-to-point contact?
- If not (meaning it will be routed through my WLAN-router), then I need to set up the WLAN-connection (SSID, encryption etc.) on the Xbee. This I'm able to do, but then I don't see it anymore on my iPad...
3. In TechBasic I'm trying to connect to the IP I'm getting from XBee with the "AT MY" and the port ($2616) through "AT DE" commands with below code. No luck yet.
Hey banjo!
I think you're after a point-to-point connection, so you'd want to connect it from your iPad Settings/WiFi (#1 and #2).
Not sure about the third item just yet. You now know much more about this effort than I do, as I've only got time to lend lots of interest and encouragement from afar. There is a tutorial I came across with Arduino that looked pretty good, along with a SparkFun tutorial. . . let me get those links - here they are:
http://www.byteworks.us/Byte_Works/Blog/Entries/2013/9/11_Connecting_to_an_Arduino_with_and_iPhone_or_iPad.html
https://learn.sparkfun.com/tutorials/xbee-wifi-hookup-guide?utm_source=SparkFun+Customer+Newsletter&utm_campaign=87cda1c527-Dec2_Dec6Newsletter&utm_medium=email&utm_term=0_fa5287abaf-87cda1c527-60569285
Both of these should help you out with the TechBASIC code.
Man this looks interesting.
Ken Gracey
Thanks for the links, don't know how I missed the one from Byteworks. Might have been the late hour...
As I understand the TechBasic example they use a direct connection, so I will try to replicate the same.
Earlier I've in TechBasic been able to establish a ftp-connection for writing and reading a file on a ftp-server, so I'm not a complete newbie on that side.
Now back to "real" work for some hours
-Thomas
Thanks Chris. I'll continue to try with a direct connection as the XBee gets invisible on iPad once it is connected to my WLAN.
I've tried to use the default XBee port setting (0x2616) in the TechBasic code. A perhaps stupid question: is 0x indicating a hex number?
Anyhow I've in TechBasic tried with both $2616 (hex) and 2616 (dec) with no difference.
In another post you mentioned about that a small capacitor might be needed to keep the inrush current from resetting everything. Another stupid question, how would I connect that on my PAB with the XBee in the XBee socket? Or is it perhaps not needed as I'm able to connect from a terminal window in SimpleIde?
Is the API for this module anything like the Wiznet module that is on the Spinneret?
Yes, 0x prefix indicates a Hexadecimal value. $ is also used in some languages. What I meant about the port is perhaps you have to specify it, yes, but also you may need to change it.
As for the mention of the capacitor that was required on the older original XBee Wi-Fi when used with our adapters. That is not the case with the current S6B units, including if Ken sent you one.
Once I get my hands on an iPad (hoping for an iPad 2) I can do some of my own experimenting on not only Tech BASIC but apps in general that communicate with out hardware.
Ok, thx for the clarifications. I've also tried setting the port on XBee side and in TechBasic to same.
I've now been able to ping the XBee from my iPad, this is done through my router which was easy enough to configure on XBee with AT commands. On iPad I'm using the app System Scope lite to ping and getting a response.
Still I'm not though able to get TechBasic to communicate to or from the XBee ip-address. I've followed same example as in the TechBasic example Ken linked to.
On XBee side I'm just initializing it through AT commands and then "spamming" with sending a * character according to the code snippet below. TechBasic is then trying to read from the IP-address, but timing out after a few seconds. BTW Is <...Serial.write("*");...> in Arduino C same as writeChar(xbee, "*") ?
Am I perhaps missing something completely here?
Thanks David, I'm always mixing between Basic and C... Corrected now my C code.
I installed Wireshark on my PC to monitor the Wi-fi traffic and I can see that the XBee now is sending out whatever character I've put in 'ch'. So it seems that my problem now lies more on the iPad or TechBasic side as it is not able to connect or read from the XBee IP-address.
Hmm, one option would be to try to get my PC and XBee to talk to each other through Wi-fi, and when that is working go back to TechBasic again with hopefully fresh ideas.
For the PC side it would be nice to find some starting code for Wi-fi communication.
-Thomas
It was the port it was hanging on. For whatever reason the port number was 9750 even if I set it to 2000 on XBee.
The code I used in TechBasic to transfer an appropriate text is below and the result that iPad/TechBasic received is in the attachment.
Next step would be to get some LED blinking, but as it is over midnight here I'll leave it to the weekend.
Thanks Ken, Chris, David and others helping!
-Thomas
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