Arduino BT Bootloader/Connection Problem

hi,

at the moment i am working to establish arduino bt connections to a computer and between two boards.

now my problem:

  1. i killed the following command form the bluegiga setup in the setupfunction!
    // Serial.println("SET BT AUTH * 12345");

  2. because of that i wasn't able to connect to the board(with the normal windows bluetooth configuration and the arduino IDE)

  3. so i made my own parallel port programmer an uploaded this bootloader code: ;D
    Arduino Starter Kit kaufen [verschiedene Ausführungen]
    with the following batchfile:
    #!/bin/sh
    @REM parametre >>-dprog stk500 -dserial=$PORT << default
    cd ..
    tools\avr\bin\uisp -dpart=ATmega168 -dprog=dapa -dlpt=0x378 --wr_lock=0x3F
    tools\avr\bin\uisp -dpart=ATmega168 -dprog=dapa -dlpt=0x378 --erase --upload if=ATmegaBOOT_168.hex -v
    tools\avr\bin\uisp -dpart=ATmega168 -dprog=dapa -dlpt=0x378 --wr_lock=0xCF

  4. now i am able to establisch a serial connection with the windows bluetooth configuration but when i try to upload somthing with the arduino ide i get the follwoing massage: :-/
    [VP 1] Device is not responding correctly.

congrats, you just made your board non-functional.

the BT board has a different bootloader that configures the BT module so that it becomes a Serial Port and disables the escape character.

Even if you disable the Serial.println("SET BT AUTH * 12345"); , the previous value is still present in the modules non volatiles memory.

you need to read the sections about SET BT AUTH in the iwrap manual in order to understand how to disable the pin.

to make full use of the board you need to understand how the modules works and the only way is to read the iwrap manual

BT stacks are all somehow broken... on windows it depends on which one you're using. it seems that bluesoleil gives more trouble

massimo

What is the path to the correct bootloader then? If it is not bootloaderBT?

at first i also thought that the bluetooth module should hold its configuration (but it didn't) don't know why

is there a way to fix the problem with the parallel programmer(preferred) or something else?

stephan

If I understand correctly you changed the bootloader. But your arduino program is still there. You should overwrite that program with the original initialisation program for instance.

Still, commenting out the auth line shouldn't render the arduino BT useless. When Massimo is right you need other firmware.

@massimo

  • do you know or do you have this BT bootloader?
  • i also thought that this disabling can't be the problem, but it seems to me that it was.

@all

  1. idea
    so isn't it possible to write the bootloader and the sketch hex files on the flash ram via the parallel programmer?
    after this the sketch program should send new settings to the bluetooth module!

burning the bootloader isn't the problem, but im not able to upload the sketch program (i think i don't know the right save position!?)

  1. idea
    i tried to write the arduino bt with the arduino mini usb module (with the rx, tx pins), but i allways get the massage that the programmer isn't responding.

do you have any other sugestions to make the board functional again!

thanks for your help!
stephan

@massimo

  • do you know or do you have this BT bootloader?
  • i also thought that this disabling can't be the problem, but it seems to me that it was.

@all

  1. idea
    so isn't it possible to write the bootloader and the sketch hex files on the flash ram via the parallel programmer?
    after this the sketch program should send new settings to the bluetooth module!

That is what you should do.

  1. idea
    i tried to write the arduino bt with the arduino mini usb module (with the rx, tx pins), but i allways get the massage that the programmer isn't responding.

Doesn't work because the WT11 is also on this serial connection. Step 1 is what you need.

:-/
i was wrong!

it's no problem to upload the arduino usb bootloader to an arduino ng board (so the parallel programmer is working)
but i am not able to upload the arduino bt bootloader or a sketchfile to the arduino bt board >:(

do you / does anybody have the code lines for the bat file to upload the bootloader and the sketch hex file on the arduino bt via UISP
i think that this the error i have!?

@daniel
is the bt bootloaderfile you posted the correct one?

thanks
staphan

@setsch, AFAIK that (the file posted in the playground) is the correct bootloader for the BT… I have used it to program many BT’s.

D

@daniel
can’t find the bootloader in the playground?!
do you mean the bootloaderBT in the Arduino SVN repository? →

and which bat code do you use to upload it to an arduinobt?
at the moment i am using this command lines, but they still don’t function:

#!/bin/sh
@REM parametre >>-dprog stk500 -dserial=$PORT << default
cd …
tools\avr\bin\uisp -dpart=ATmega168 -dprog=dapa -dlpt=0x378 --wr_lock=0x3F
tools\avr\bin\uisp -dpart=ATmega168 -dprog=dapa -dlpt=0x378 --erase --upload if=ATmegaBOOT_168.hex -v
*tools\avr\bin\uisp -dpart=ATmega168 -dprog=dapa -dlpt=0x378 --erase --upload if=sketchBluetooth.hex -v *
tools\avr\bin\uisp -dpart=ATmega168 -dprog=dapa -dlpt=0x378 --wr_lock=0xCF

ATmegaBOOT_168.hex is the BT bootloader from the reposetory
sketchBluetooth.hex is the program(massimo postet in the playground) with the BT module settings

i think it is working correct once (it gets access to the controller and uploads the files) >> but the bluetooth settings won’t change i think (the module always have the old name and upload problems) i think it is not executing the program!!

but after that one upload it always returns:
AVR Direct Parallel Access failed after 32 retries.

thanks
setsch

hi

I had put a copy of the BT bootloader in the Playground, but I just deleted it as it makes way more sense to stick to one place for the bootloader…

The link you posted above:

is the one and only correct bootloader for the Arduino BT. I did a file compare in BBedit: it’s the same one I received from the manufacturer when the BT was first released way back in January 2007. The link above leads to the proper, real Mccoy, one and only ArduinoBT bootloader. Honest. I am not kidding you. ;D

For burning the bootloader onto the BT, I used AVR Studio 4, along with an AVRISP-MKII. There’s a tutorial on how to do it that way, in the Playground here. I used an Intel Mac running Parallels virtualization, meaning you can do the above on a Mac or a PC.

Looking at the programing commands above, you are missing at minimum the fuse settings; what you have above only unlocks the chip, programs the hex file and locks it again. You need more lines, to set the fuses (0xF8, 0xDF and 0xFF) properly. Also it looks like you are telling it to erase, program a file, erase again and program another file. Anyway, the required process is all detailed in the above tutorial. If you get it working with a parallel programmer or similar, it would be good if you wrote a tutorial!

D

@ Daniel

When I try to use the bootloader file you specifie AVR studio says; The specified file is not a valid Intel Hex file.

So could you tell me how to use this file. I've already upload some other files to the ArduinoBT with AVR studeio, and they work correctly.

@ All
The problem that I have now is that I can't use the Arduino IDE to reprogram the ArduinoBT. Have others the same problem?
Could somebody help me out with this problem.

Thanks!

@ All
The problem that I have now is that I can't use the Arduino IDE to reprogram the ArduinoBT. Have others the same problem?
Could somebody help me out with this problem.

You didn't change the echo mode, did you?

@sondag
i have the same problem that the arduino ide says that the board is not responding

@daniel
what are the fuses for?
and do know how to set them with uisp?

@ bigengineer
On one off mine boards I changed the ECHO before you could warn me. I hope you have the solution for that problem.

@ all
But I have four ArduinoBT boards and with two boards I don't have any problems. On one board I changed the control echo and I have no idea what happend with the other one.

With three of the four boards I can connect in windows with the windows bluetooth stack. I supose that the board on witch I have chaged the control echo is the one that give problems with connecting.

Please help me out!

The strangest thing is that I can program both with the AVR studio 4 software.
It reacts on the new sketches, but still I’cant program them in the Arduino IDE.

On one off mine boards I changed the ECHO before you could warn me. I hope you have the solution for that problem.

You have to burn the BT_init program. The hex file is somewhere on the website. This sets the echo to 0 again. Afterwards you can program the board again and give it the name you want.

Just imagine that "SET CONTROL BIND" would work. You could change the echo mode on the fly and change it back.

daniel
what are the fuses for?
and do know how to set them with uisp?

hey

have you consider trying google for some of your questions?
Some self-initiative is required for this kind of thing, we can't answer every last question, you have to learn how to find the answers yourself. It's not that hard. :slight_smile:
Try googling these words: "what are avr fuses for", without the quotes.

D

Daniel

Thanks for mentioning this.. A lot of questions in the forum can be answered by simply typing the question into google...

thanks

massimo

@ bigengineer

I could not find the BT_init program. Is that the normal bootloader, because the normal bootloader doesn't the job.
I have checked the lockbits and fuses settings, but still I can't program the boards from the Arduino IDE.