Shop OBEX P1 Docs P2 Docs Learn Events
Wireless programming of Multi-Slot BS2's — Parallax Forums

Wireless programming of Multi-Slot BS2's

MSDTechMSDTech Posts: 342
edited 2008-05-22 21:41 in BASIC Stamp
This is the kind of crazy ideas that come through my head when I'm home sick and bored laying around, so keep in mind that this may be a fever induced hallucination. Before I start what may become a complex programming project I thought I'd throw this out for critique.
I have seen multiple posts in these forums explaining why you can't program a BS2 using the eb500 Bluetooth connection. While I agree that this will not work for the BS2-IC, it might be possible on the BS2 p series units. You won't be able to reprogram the active program slot, but you should be able to use the eb500 to download a program to any of the inactive slots.
What I envision is a task that checks with the PC to see if there is a new program. If there is a new program, the task uses the STORE command to select the slot for the new program then reads the program from the pc and uses a series of WRITE commands to load the program into the slot. Finally, the task can use the RUN command to activate the newly downloaded code.
On the PC side its a bit more complex. I would need an application that can monitor the serial port the eb500 is connected to and determine the remote unit is ready to receive a new program. It would acknowledge the request and transmit the tokenized code. It would need to be able to use the tokenizer library to compile the code and send it back to the Stamp.
Comments/suggestions?
Thanks

Comments

  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2008-05-22 15:31
    Hi, this kind of thing has crossed my mind from time to time but have never seriously pursued it as I have no use for it as of now. Most of what I have learnt has come from Tracy Allens web site http://www.emesys.com/BS2clone.htm

    Tracy's example uses one Stamp to program another in which he takes the memory from the "Prime" and writes it to the "Clone". So if the Prime has access to an already tokenized version of a PBasic file then you can program the Clone. The thing that is flexible about all this is that the tokenized program does not have to reside in the Prime, the Prime only has to have access. For example the tokenized code can reside on a USB drive or additional EEPROM. I went so far as to write a VB program that could serially transmit a tokenized version from the PC to Stamp but I have never done that wireless.

    Because most of the ground work has been done that is the route I would probably take. I would have two Stamps (Prime and Clone) and I would see if I could successfully transmit a token version of code from the PC to the Prime over a wireless connection.

    hope this gives food for thought

    Jeff T.
  • The DoctorThe Doctor Posts: 37
    edited 2008-05-22 16:34
    I haven't had a chance to test this yet, but couldn't you use a pair of Bluetooth serial ports, like these:

    http://www.ipenabled.com/bluetooth-rs232.html

    to remotely program a BS2?
  • Tracy AllenTracy Allen Posts: 6,667
    edited 2008-05-22 18:26
    The kind of programming that uses a PBASIC program, running in one slot, to take in data to reprogram a different slot, is certainly feasible. I have done something like that to deliver firmware upgrades on a memory card. I know one of my customers has managed a way to do it over the GSM network, but there are number of caveats, to do it as a two step process to validate the download before replacing the old version and RUNning it. Don't want to count on the perfect comm link!

    Also possible is the kind of reprogramming that invokes the native BREAK and ATN algorithm. There have been several products through the years that could remotely program via radio, such as the E-wave Screamer. The important thing is to get the timing and handshaking right, as described on the page Jeff mentioned and in the Parallax developer docs. Since the timing and handshaking is not "standard", it can present a problem with packetized data if it is not set up specifically for the purpose. It would be interesting to know which if any bluetooth or zigbee modules could in fact do it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • MSDTechMSDTech Posts: 342
    edited 2008-05-22 21:41
    Thanks, I think I know were my free time will be going for a while. I don't have a particular use for this at the moment, just sounded like a nice avenue to explore. You never know when that odd routine in the toolbox will come in handy.
    Rick
Sign In or Register to comment.