Wireless connection
Jerry Roach
Posts: 13
I'm trying to use Gridconnect's Firefly (RS232 to bluetooth adapters) for a wireless connection that is supposed to replace the serial cable. The adapters seem to be connected to each other (status LEDs indicate a link) and transferring data, but my Stamp Editor is not recognizing a connection. No loopback, no Echo, no device... nothing. With the hardwired serial cable everything is fine. Does anyone have experience with this? Thanks
Comments
For those Stamps with more than one 2K program "slot", it's possible to compile a Stamp program to a binary file, then transfer the file as data across the wireless connection to a "slot" other than the one running, then execute that other "slot". It's a slow process and you'll need to do your own programming on both the PC and Stamp ends.
- http://www.aggsoft.com/rs232-pinout-cable/pinout-and-signal.htm
·Check this link for· RS232 / DB9 protocol.
Here is a snippet from wiki.
RTS/CTS handshaking
In older versions of the specification, RS-232's use of the RTS and CTS lines is asymmetric: The DTE asserts RTS to indicate a desire to transmit to the DCE, and the DCE asserts CTS in response to grant permission.
In a nutshell – Stamp editor initialize communication using DSR (pin6).
The Stamp “respond” asserting RTS/CTS (pin7) via hardwired connection in DB9 plug.
·
I am not sure how the editor uses DTR.
·
In order to use any other means than cable RS232 connection you would have to simulate this somehow to work with Stamp editor. So unless you want to spent time building a front application for the Stamp editor you are stuck.
·
When you use other communication technology with your application running this hardware handshake on port 16 needs to be monitored by your application same way the Stamp editor does it in order for your application to “recognize” the Stamp..
On your PC, you can use a terminal program like HyperTerminal or you can make a program that communicates on the serial port.
You can't use the Stamp Editor with a wireless connection.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't worry. Be happy
I have been very successful using Bluetooth in serial cable replacement mode. Although Bluetooth will not provide very much range (30 meters with a Class I dongle and an antenna on the Bluetooth module--anyway, I got 100 feet out of it), it is very robust and will try, try again until it either succeeds or dies.
Study SERIN/SEROUT on the Stamp side.
--Bill
ps Beg Parallax to develop the WiFi module they have already semi-announced. I am.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
You don't need to have the PC attached in order to run a program on the Stamp. The PC is needed to compile and download a new program and it's needed if you want to look at DEBUG output or if your program expects input from the PC via DEBUGIN. If your program is producing DEBUG output, it doesn't check to make sure there's a PC there. It will output the DEBUG data even if there's nothing listening.
Whenever your Stamp is reset, either because it is powered on or a reset button is pushed, it will start executing whatever program is stored in its EEPROM from the beginning. It doesn't need a PC present for this to happen. Note that if the DTR line on the programming port is toggled, the Stamp is reset. This is used for downloading. If there's no connection to the programming port, this reset won't happen.
I am working on a project to wirelessly sense 5 switch positions and report switch status to the host computer at least 6 times a second. There will be 2 systems running simultaneously so each stamp must have a unique identification to the host computer. I was thinking of using 3 of the I/O ports to create an address to ID each stamp with dip switches. And then have 5 I/O lines sense the switch positions in a continuous loop. Effectively sending a byte of data in a loop to the host computer to interpret.
Bill, what kind of bluetooth product did you use? And how did you deal with the RTS/CTS signals?
Some devices don't provide RTS/CTS like Parallax's Easy Bluetooth. Other devices either ignore them until a mode is set or CTS is hard-wired so it's always enabled. The Stamps don't normally use them, but there is an option in the SERIN and SEROUT statements to add flow control using an extra I/O pin. See the description of the SERIN and SEROUT statements in the Basic Stamp Syntax and Reference Manual (or the Stamp Editor help file).
Easy Bluetooth from Parallax has 30m range.
I have used BlueSmirf on my Stamps it works great. You need to step down the baudrate to 9600, as they come with 115k default.
Make sure you have the right class dongle if you're going to connect to another device (e.g. your PC).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't worry. Be happy
Sorry but that is truly a funny question in a thread about Bluetooth.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't worry. Be happy