Shop OBEX P1 Docs P2 Docs Learn Events
How can I use the blue tooth interface to download code ? — Parallax Forums

How can I use the blue tooth interface to download code ?

ChuckTChuckT Posts: 12
edited 2008-12-21 06:09 in Propeller 1
I am using the embedded blue to send information back and forth once I have the program running.
But each time I do a code update I have to reconnect the USB.
Any suggestions for how to load the code on a serial port other than the default.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-21 00:54
    You can't use a Bluetooth or xBee wireless link to download directly to a Propeller or a Stamp for that matter. They're both timing sensitive and there are unpredictable delays in the packetization of the data and control information that cause either one to time out. What you can do is have another processor with enough extra memory to hold the downloaded program. You need to use some kind of file transmission protocol like Kermit or YModem to transfer the program to the extra memory, then download the program through a direct connection to the Propeller (or Stamp). You could use a Propeller for this with a large enough EEPROM (at least 64K bytes) to hold the program downloaded plus the downloader. Unfortunately, this won't work using the Propeller Tool to download on the PC end. You'd have to save the binary compiled file, then use some kind of terminal emulator to do the download.
  • soshimososhimo Posts: 215
    edited 2008-12-21 01:56
    @Mike - That's a cool idea you have for a field programming device. You can supply AE's with a self contained unit that has the firmware written to an eeprom (with appropriate protections in place to prevent tampering or viewing). They can attach it to an ICSP header, press a button and after some indication of success they can turn the unit off and remove it from the ICSP. Viola - updated firmware in the field!

    @ChuckT - I haven't studied the FullDuplexSerial object too much, but can't you just assign different pins and make sure you have a transceiver circuit between the pc and the chip (max232 or equivalent)? Yes, it's more parts count, but it's a dedicated serial port that you can use for diagnostics or monitoring. You can even create a logging object that runs in it's own cog that sends data out the serial port. That's assuming you can assign pins other than P31 and P30.
  • T ChapT Chap Posts: 4,223
    edited 2008-12-21 02:53
    I would use a second EEPROM, save your program as a .eeprom file and transmit it in 64 byte chunks to the second EEPROM using PageWrite. Do a checksum on the second EEPROM, if OK, then transfer the contents to the main EEPROM, run REBOOT. If checksum is not OK, start over.
  • ChuckTChuckT Posts: 12
    edited 2008-12-21 06:09
    Mike and others Thanks, you confirmed my suspicions.
    This is harder than I original though.

    Thanks for the ideas. I think I will keep using the cable for a while
Sign In or Register to comment.