Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Bluetooth for programming

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
10 postsPage 1 of 1
10 postsPage 1 of 1

Bluetooth for programming

Post by tum » Wed Apr 09, 2008 5:21 pm

Post by tum
Wed Apr 09, 2008 5:21 pm

I'm tired of plugging/unplugging the small mic progamming cable everytime I want to program the RN-1. I'm thinking I could use a BlueSmirf to allow wireless reprogramming over bluetooth. You'd have to set the Bluesmirf to run at 115K but unless there's something weird Hitec has done with the programming port, I don't see why it wouldn't work. Has anyone tried this?

Thanks :-)
I'm tired of plugging/unplugging the small mic progamming cable everytime I want to program the RN-1. I'm thinking I could use a BlueSmirf to allow wireless reprogramming over bluetooth. You'd have to set the Bluesmirf to run at 115K but unless there's something weird Hitec has done with the programming port, I don't see why it wouldn't work. Has anyone tried this?

Thanks :-)
tum
Savvy Roboteer
Savvy Roboteer
Posts: 34
Joined: Fri Jun 08, 2007 5:28 am

Post by i-Bot » Wed Apr 09, 2008 5:38 pm

Post by i-Bot
Wed Apr 09, 2008 5:38 pm

I did try this. I made a version of the RN1 code that ran at 115K all the time, instead of the normal mixture of 9600 and 115K.

It did work but was very slow. The echoing of every character between the C3024 and the control program was made bad by the bluetooth and USB delays.

I did not try making changes to bluetooth and USB parameters which may have helped.

Also some of the startup messages on the bluesmirf seemed to give problems. I tried to disable them, now my bluesmirf is 115K forever !

Let us know how you get on
I did try this. I made a version of the RN1 code that ran at 115K all the time, instead of the normal mixture of 9600 and 115K.

It did work but was very slow. The echoing of every character between the C3024 and the control program was made bad by the bluetooth and USB delays.

I did not try making changes to bluetooth and USB parameters which may have helped.

Also some of the startup messages on the bluesmirf seemed to give problems. I tried to disable them, now my bluesmirf is 115K forever !

Let us know how you get on
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by tum » Thu Apr 10, 2008 4:25 am

Post by tum
Thu Apr 10, 2008 4:25 am

Hi,

Have you been modifying the RN-1 code using assembly? Do you know if there's a memory location I could poke to see if the current move is complete? I'd like to be able to do a polling loop rather than a simple WAIT command. The reason is that some move commands take several seconds to complete and I'd like to be able to poll sensors whilst waiting for the move to complete (rather than have to call WAIT and then read the sensors).

Thanks :-)

PS. Do you have a modified firmware with the 115K enabled com port available for download?
Hi,

Have you been modifying the RN-1 code using assembly? Do you know if there's a memory location I could poke to see if the current move is complete? I'd like to be able to do a polling loop rather than a simple WAIT command. The reason is that some move commands take several seconds to complete and I'd like to be able to poll sensors whilst waiting for the move to complete (rather than have to call WAIT and then read the sensors).

Thanks :-)

PS. Do you have a modified firmware with the 115K enabled com port available for download?
tum
Savvy Roboteer
Savvy Roboteer
Posts: 34
Joined: Fri Jun 08, 2007 5:28 am

Post by i-Bot » Thu Apr 10, 2008 2:35 pm

Post by i-Bot
Thu Apr 10, 2008 2:35 pm

This code should set the com port to 115K all the time. When you are using bluetooth the RN end bluetooth is at 115K. Even though the PC end may think it changes speed, it does not.

http://robosavvy.com/Builders/i-Bot/115cut.bin

You will need to use roboflash to load it.

If you want to try without changing the flash
You can set the speed by poking into the baud register. You must use a constant as the poke variable is broken.
POKE &H99, 3 'set serial speed to 115K

The speed will stay at 115K until you either do a reset, or a download.

For the move:
The desired positions are stored in 24 memory locations from &H300.
The current positions are stored in 24 memory locations from &H320
They can both be PEEKed there.

When a move is started a bit is cleared in locations &H4E3, &H4E4, &H4E5.
there is one bit per servo starting at bit 0 in &H4E3.
When the current = the desired, then the corresponding bit is set.
A move is complete when all 3 bytes = &HFF

If you want to POKE any of these locations remember the POKE instruction in Robobasic is broken, for Poking variables. Constant values are OK
This code should set the com port to 115K all the time. When you are using bluetooth the RN end bluetooth is at 115K. Even though the PC end may think it changes speed, it does not.

http://robosavvy.com/Builders/i-Bot/115cut.bin

You will need to use roboflash to load it.

If you want to try without changing the flash
You can set the speed by poking into the baud register. You must use a constant as the poke variable is broken.
POKE &H99, 3 'set serial speed to 115K

The speed will stay at 115K until you either do a reset, or a download.

For the move:
The desired positions are stored in 24 memory locations from &H300.
The current positions are stored in 24 memory locations from &H320
They can both be PEEKed there.

When a move is started a bit is cleared in locations &H4E3, &H4E4, &H4E5.
there is one bit per servo starting at bit 0 in &H4E3.
When the current = the desired, then the corresponding bit is set.
A move is complete when all 3 bytes = &HFF

If you want to POKE any of these locations remember the POKE instruction in Robobasic is broken, for Poking variables. Constant values are OK
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by badlands » Thu Apr 10, 2008 3:16 pm

Post by badlands
Thu Apr 10, 2008 3:16 pm

Would your code work on a blank micro mounted onto a custom PCB i-Bot?
Would your code work on a blank micro mounted onto a custom PCB i-Bot?
badlands
Savvy Roboteer
Savvy Roboteer
Posts: 28
Joined: Thu Feb 07, 2008 11:23 pm

Post by i-Bot » Thu Apr 10, 2008 3:39 pm

Post by i-Bot
Thu Apr 10, 2008 3:39 pm

This is not my code. It is standard Hitec code with a patch applied.
As such it checks for the presence of the C3024 bootloader in the high flash, and will l not actually interpret Robobasic code if it is missing. There is more information in the "changing the code in the MR-C3024" topic, and some files in my file area
This is not my code. It is standard Hitec code with a patch applied.
As such it checks for the presence of the C3024 bootloader in the high flash, and will l not actually interpret Robobasic code if it is missing. There is more information in the "changing the code in the MR-C3024" topic, and some files in my file area
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Bluetooth Download

Post by astus » Mon Apr 14, 2008 11:54 am

Post by astus
Mon Apr 14, 2008 11:54 am

Hi Guys,
I'm new to the Robonova comunity. I have just purchased a Robonova for work (Central Queensland University) and are about to purchase five more. Our inteneded purpose is to teach some basic programming to first year engineering students. The Robonova in its standard configuration will do this quite well. The problem arises when our external students (off campus students whom study at home in other states or countries) need to do the same stuff.

For these external students we are about to setup a remote lab. This will contain a Robonova with a bluetooth module that we need to get to download code to the Robonova.

Now I'm confident that I can use a small microcontroller between the Bluetooth and Robonova to remove any bluethooth startup commands and prevent them from getting to the controller. So after this long winded explination the question is what else will I have to do to get bluetooth downloads?
Hi Guys,
I'm new to the Robonova comunity. I have just purchased a Robonova for work (Central Queensland University) and are about to purchase five more. Our inteneded purpose is to teach some basic programming to first year engineering students. The Robonova in its standard configuration will do this quite well. The problem arises when our external students (off campus students whom study at home in other states or countries) need to do the same stuff.

For these external students we are about to setup a remote lab. This will contain a Robonova with a bluetooth module that we need to get to download code to the Robonova.

Now I'm confident that I can use a small microcontroller between the Bluetooth and Robonova to remove any bluethooth startup commands and prevent them from getting to the controller. So after this long winded explination the question is what else will I have to do to get bluetooth downloads?
astus
Newbie
Newbie
Posts: 2
Joined: Mon Apr 14, 2008 11:42 am

Post by i-Bot » Mon Apr 14, 2008 4:19 pm

Post by i-Bot
Mon Apr 14, 2008 4:19 pm

It did work for me but was verry sloow. I had to set the timeout very long.

I don't know what is the trigger in the bluetooth to forward data bytes to the radio. Maybe it waits to get a buffer full with a fairly long timeout. I didn't see how to change this.

The C3024 controller uses a byte for byte ping pong with the PC when working at 9600. This is because the serial port does not use interrupts, and probably cannot always be serviced in one byte time. When the actaul download at 115K starts, interrupts are disabled, and the data sent in a block.

I think you will have to experiment. I used the bluesmirf, but other bluetooth may be better, or even XBee or Matchport wireless.
It did work for me but was verry sloow. I had to set the timeout very long.

I don't know what is the trigger in the bluetooth to forward data bytes to the radio. Maybe it waits to get a buffer full with a fairly long timeout. I didn't see how to change this.

The C3024 controller uses a byte for byte ping pong with the PC when working at 9600. This is because the serial port does not use interrupts, and probably cannot always be serviced in one byte time. When the actaul download at 115K starts, interrupts are disabled, and the data sent in a block.

I think you will have to experiment. I used the bluesmirf, but other bluetooth may be better, or even XBee or Matchport wireless.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Some Bluetooth experience

Post by astus » Tue Apr 15, 2008 4:56 am

Post by astus
Tue Apr 15, 2008 4:56 am

Hi thanks I-bot,
I have some experience with embedded processors and bluetooth and i have a zigbee kit but haven't touched it yet. Usually these bluetooth devices spit out some info on the serial port to notify the micro that they are present and in a particular mode. Then you have to send serial commands to them to get them to operate in a certain mode (i.e. serial port emulation, audio ect). The problems you were having may be because the bluetooth defaults to 9600 (over the air serial link)and thats why it takes so long to download code? Have you tried updaing the board speed in the bluetooth device for the serial port profile?

Adam
Hi thanks I-bot,
I have some experience with embedded processors and bluetooth and i have a zigbee kit but haven't touched it yet. Usually these bluetooth devices spit out some info on the serial port to notify the micro that they are present and in a particular mode. Then you have to send serial commands to them to get them to operate in a certain mode (i.e. serial port emulation, audio ect). The problems you were having may be because the bluetooth defaults to 9600 (over the air serial link)and thats why it takes so long to download code? Have you tried updaing the board speed in the bluetooth device for the serial port profile?

Adam
astus
Newbie
Newbie
Posts: 2
Joined: Mon Apr 14, 2008 11:42 am

RZ1Basic v0.3.3

Post by micono » Mon Apr 28, 2008 6:58 am

Post by micono
Mon Apr 28, 2008 6:58 am

The software can perform download of the program by BlueSMiRF through an audio plug.

http://web.mac.com/micono/RZE/RZ1Basic.html
The software can perform download of the program by BlueSMiRF through an audio plug.

http://web.mac.com/micono/RZE/RZ1Basic.html
micono
Newbie
Newbie
Posts: 6
Joined: Sun Aug 05, 2007 6:28 am


10 postsPage 1 of 1
10 postsPage 1 of 1