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

BlueTooth Comms Hack For The Bioloid CM-5

RoboSavvy distributes and manufactures robots. This forum is dedicated to robots and other bits designed or manufactured by RoboSavvy and robot software developed by RoboSavvy.
53 postsPage 2 of 41, 2, 3, 4
53 postsPage 2 of 41, 2, 3, 4

Post by cdraptor » Tue Jul 03, 2007 5:21 am

Post by cdraptor
Tue Jul 03, 2007 5:21 am

Limor

Wanted to clarify - you can send to from the PC as though you were using a Zig100 on another CM-5 board or the Zig2Serial form PC?? Using the RX Remote Arrive, then checking the RX value (int).

In case you / Robosavvy has any plans of selling modified CM-5s, I would be interested in picking up another CM-5 that is modified for the BlueSmirf.
Limor

Wanted to clarify - you can send to from the PC as though you were using a Zig100 on another CM-5 board or the Zig2Serial form PC?? Using the RX Remote Arrive, then checking the RX value (int).

In case you / Robosavvy has any plans of selling modified CM-5s, I would be interested in picking up another CM-5 that is modified for the BlueSmirf.
cdraptor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 93
Joined: Tue Apr 03, 2007 2:49 am
Location: Lititz, PA

Post by limor » Tue Jul 03, 2007 9:31 am

Post by limor
Tue Jul 03, 2007 9:31 am

cdraptor: Neither the Zig100 nor the Zig2Serial were used in this hack. If you want PC-CM5 wireless connectivity, Zig100 + Zig2Serial provide it without having to hack anything. Some hand-held devices dont have serial interface and bluetooth is the only option where handheld-CM5 wireless connectivity is needed.

The BlueSmirf is a BlueTooth 1.1 stand-alone embedded device. The remote PC communicates with the BlueSmirf over Bluetooth (BlueTooth PC USB dongles at robosavvy.com/store ).

The BlueSmirf was attached to the CM5 PCB by soldering the relevant pins to the Zig100 interface holes. [The Zig100 serial line on the CM5 is the same PC-serial-cable line that comes with the CM5.]

We can produce more of these hacked CM5s but it takes a lot of work...
cdraptor: Neither the Zig100 nor the Zig2Serial were used in this hack. If you want PC-CM5 wireless connectivity, Zig100 + Zig2Serial provide it without having to hack anything. Some hand-held devices dont have serial interface and bluetooth is the only option where handheld-CM5 wireless connectivity is needed.

The BlueSmirf is a BlueTooth 1.1 stand-alone embedded device. The remote PC communicates with the BlueSmirf over Bluetooth (BlueTooth PC USB dongles at robosavvy.com/store ).

The BlueSmirf was attached to the CM5 PCB by soldering the relevant pins to the Zig100 interface holes. [The Zig100 serial line on the CM5 is the same PC-serial-cable line that comes with the CM5.]

We can produce more of these hacked CM5s but it takes a lot of work...
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by cdraptor » Tue Jul 03, 2007 11:17 pm

Post by cdraptor
Tue Jul 03, 2007 11:17 pm

Limor

I know this is different than the Zig, I was asking about working with the Bluesmirf. If you check out the examples in the Bioloid manual on using the Behavior Control Programmer to create a program that reads RX input data from another CM-5 sending. Can you use the same routines since the Bluesmirf is hooked up similar to the Zig100.

So PC sending TX data, I can program the CM-5 unit using BCP to wait for RX data, and respond to RX integer information over the Bluesmirf interface.

How much work is alot of work? For me doing all the fun stuff you were doing would be a crazy experiment to mess up a CM-5. How much does alot of work cost ( CM-5 + Bluesmirf + Labor)?

My skills are in the programming, I can figure out how to code anything but my electrical engineering skills are on the beginner side. So I may have to way the cost of a 2 or 3 CM-5 units that I could fry in the attempt.
Limor

I know this is different than the Zig, I was asking about working with the Bluesmirf. If you check out the examples in the Bioloid manual on using the Behavior Control Programmer to create a program that reads RX input data from another CM-5 sending. Can you use the same routines since the Bluesmirf is hooked up similar to the Zig100.

So PC sending TX data, I can program the CM-5 unit using BCP to wait for RX data, and respond to RX integer information over the Bluesmirf interface.

How much work is alot of work? For me doing all the fun stuff you were doing would be a crazy experiment to mess up a CM-5. How much does alot of work cost ( CM-5 + Bluesmirf + Labor)?

My skills are in the programming, I can figure out how to code anything but my electrical engineering skills are on the beginner side. So I may have to way the cost of a 2 or 3 CM-5 units that I could fry in the attempt.
cdraptor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 93
Joined: Tue Apr 03, 2007 2:49 am
Location: Lititz, PA

Post by Pev » Tue Jul 03, 2007 11:26 pm

Post by Pev
Tue Jul 03, 2007 11:26 pm

cdraptor wrote:Limor

I know this is different than the Zig, I was asking about working with the Bluesmirf. If you check out the examples in the Bioloid manual on using the Behavior Control Programmer to create a program that reads RX input data from another CM-5 sending. Can you use the same routines since the Bluesmirf is hooked up similar to the Zig100.



Hi

I think I may be able to help a little here. You can use the same routine in the Behavior control program as you would with the ZIG. In fact, if you have a look at my website (links below my signature) you'll find a basic hack for bluethtooth with a bluesmirf (it's not as advanced as Limors but it does the job) and also if you download BioBlue PC you find it contains a bluetooth control program for Windows (XP haven't tested Vista), a Behaviour control program (obviously in source with all the routines visible), details of the packet format and a motion file for the 18 DOF humanoid to use with the BCP code. The hack document even includes a snippet of vb.net to send a packet to the CM-5.

Hope it helps, and all the software is free

Pev
cdraptor wrote:Limor

I know this is different than the Zig, I was asking about working with the Bluesmirf. If you check out the examples in the Bioloid manual on using the Behavior Control Programmer to create a program that reads RX input data from another CM-5 sending. Can you use the same routines since the Bluesmirf is hooked up similar to the Zig100.



Hi

I think I may be able to help a little here. You can use the same routine in the Behavior control program as you would with the ZIG. In fact, if you have a look at my website (links below my signature) you'll find a basic hack for bluethtooth with a bluesmirf (it's not as advanced as Limors but it does the job) and also if you download BioBlue PC you find it contains a bluetooth control program for Windows (XP haven't tested Vista), a Behaviour control program (obviously in source with all the routines visible), details of the packet format and a motion file for the 18 DOF humanoid to use with the BCP code. The hack document even includes a snippet of vb.net to send a packet to the CM-5.

Hope it helps, and all the software is free

Pev
Carl
-------------------------
www.alt-view.co.uk
Pev
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 547
Joined: Sun Feb 26, 2006 1:00 am
Location: UK

Post by cdraptor » Wed Jul 04, 2007 3:57 am

Post by cdraptor
Wed Jul 04, 2007 3:57 am

Pev

Thanks for the info, I will check out stuff on your site. I figured you could use the bluesmirf like you would the Zig, but wanted to check. I'm looking to setup control from my PowerBook laptop - actually looking forward to programming some bluetooth routines. I may be dropping you a line on the forums for info. My main area of concern is the hardware side of things.
Pev

Thanks for the info, I will check out stuff on your site. I figured you could use the bluesmirf like you would the Zig, but wanted to check. I'm looking to setup control from my PowerBook laptop - actually looking forward to programming some bluetooth routines. I may be dropping you a line on the forums for info. My main area of concern is the hardware side of things.
cdraptor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 93
Joined: Tue Apr 03, 2007 2:49 am
Location: Lititz, PA

Post by cdraptor » Wed Jul 04, 2007 4:07 am

Post by cdraptor
Wed Jul 04, 2007 4:07 am

Pev

BioBlue PC looks awesome, I love that you include Motion files to start with. I'll have to try this out on my Desktop PC. I am actually looking at the UMPCs - the OQO 02 got good reviews and seemed to be the most feature rich from the Ultimate Mobility magazine. I definately will download BioBlue PC
Pev

BioBlue PC looks awesome, I love that you include Motion files to start with. I'll have to try this out on my Desktop PC. I am actually looking at the UMPCs - the OQO 02 got good reviews and seemed to be the most feature rich from the Ultimate Mobility magazine. I definately will download BioBlue PC
cdraptor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 93
Joined: Tue Apr 03, 2007 2:49 am
Location: Lititz, PA

Linux success with BlueSmirf

Post by linux23dragon1 » Wed Feb 27, 2008 2:11 pm

Post by linux23dragon1
Wed Feb 27, 2008 2:11 pm

Using Ubuntu, I was able to use minicom (using the CLI/Terminal) to both connect and program the BlueSmirf.

This is how it can be done : -

UPDATE:- make sure you have these packages/programs installed : -
Bluetooth
Bluez-btsco
Bluez-utils
Bluez-gnone
bluez-hcidump
gnome-bluetooth
gnome-vfs-obexftp

URL listings (if you use a custom Linux system) : -
http://alioth.debian.org/projects/minicom/
http://bluez.org/
http://gnome.org or http://kde.org


If you don't already have a connected bluetooth device, then connect a USB Bluetooth device and make sure it is made "Visible and discoverable for other devices" (found in your Bluetooth manager settings).

Now turn on your CM5.

Using a terminal. You can collect the MAC address from your local (PC) Bluetooth device, from using this command : -
Code: Select all
hcitool dev

You should see an output like this : -
Devices:
hci0 00:13:EF:F1:43:A8


Scan for your remote BlueSmirf device : -
Code: Select all
hcitool scan

You should see a response like this : -
Scanning ...
00:A0:96:18:FD:1A RoboRadio

NOTE : - I've already renamed my BlueSmirf to "RoboRadio".

We can now use rfcomm command to connect the PC to the BlueSmirf, using the MAC Address ( in my case : - 00:A0:96:18:FD:1A) : -
Code: Select all
rfcomm connect 0 00:A0:96:18:FD:1A

You should see a response like this : -
Connected /dev/rfcomm0 to 00:A0:96:18:FD:1A on channel 1
Press CTRL-C for hangup

Open a new tab (on the same terminal)or a new terminal and setup minicom.
Code: Select all
sudo minicom --setup

Enter into "Serial port setup" on the menu and change the device to /dev/rfcomm0. The only other settings to change (as to be expected) are "Bps/Par/Bits" {9600 8N1}, "Hardware Flow Control"{none} and "Software Flow Control"{none}.
Use the "Enter" key to exit the Serial port setup and select "Save setup as dfl". Then exit minicom.
This setup process will allow you to connect as a user, since it allows configuration files to be created at /etc/minicom/{minicom.users minirc.dfl}

You should be ready to connect (and program) your BlueSmirf just by using the minicom command by itself :-
Code: Select all
minicom

You should see somthing like this
Welcome to minicom 2.2

OPTIONS: I18n
Compiled on Apr 27 2007, 16:42:25.
Port /dev/rfcomm0

Press CTRL-A Z for help on special keys
If you don't see the connection "Port /dev/rfcomm0", then you need to setup a user "dfl" (just as you had done above), by Pressing CTRL-A Z then o key.

Press CTRL-A Z and then the e key to enable local echo.

press +++ to see if it works, you should get a OK response. Your now in command mode.

You can now set the Baud rate to 57600 bps : -
Code: Select all
atsw20,236,0,0,1


And reduce the stand-by consumption Current (48mA) down to 2mA : -
Code: Select all
atsw21,2560,11,2560,11


And don't forget to rename the BlueSmirf too :) (Substitute name to whatever you like) : -
Code: Select all
atsn,name


And to exit configuration mode:-
Code: Select all
atmd



To exit out of minicom, Press CTRL-A Z q

You will need to setup the minicom com port settings to 57600 8N1, if you want to reconnect to your modified BlueSmirf via minicom.

Just of interest I've spotted this post about changing the speeds between two bluetooth devices (local and remote). It just happens to be the same blutooth module WML-C40AH (thats the BlueSmirf I have), and so uses the same BR-AT_COMMANDS-100 instruction set.

I was thinking about "reversing the local and remote devices, so that local is remote and remote is local". Just an idea :)


----------------

Oh yea, I've found a nice way to install the BlueSmirf into the CM5.

There is a area (in a corner of the CM5) cover, to allow for a small hole (for your wires) : -
Image

I've found it convenient to solder the +ve 5V wire directly to the FET/regulator (for a stronger connection). There is enough space between the PCB and plastic enclosure to allow for wires : -
Image

And the rest is as so : -
Image
Image
Using Ubuntu, I was able to use minicom (using the CLI/Terminal) to both connect and program the BlueSmirf.

This is how it can be done : -

UPDATE:- make sure you have these packages/programs installed : -
Bluetooth
Bluez-btsco
Bluez-utils
Bluez-gnone
bluez-hcidump
gnome-bluetooth
gnome-vfs-obexftp

URL listings (if you use a custom Linux system) : -
http://alioth.debian.org/projects/minicom/
http://bluez.org/
http://gnome.org or http://kde.org


If you don't already have a connected bluetooth device, then connect a USB Bluetooth device and make sure it is made "Visible and discoverable for other devices" (found in your Bluetooth manager settings).

Now turn on your CM5.

Using a terminal. You can collect the MAC address from your local (PC) Bluetooth device, from using this command : -
Code: Select all
hcitool dev

You should see an output like this : -
Devices:
hci0 00:13:EF:F1:43:A8


Scan for your remote BlueSmirf device : -
Code: Select all
hcitool scan

You should see a response like this : -
Scanning ...
00:A0:96:18:FD:1A RoboRadio

NOTE : - I've already renamed my BlueSmirf to "RoboRadio".

We can now use rfcomm command to connect the PC to the BlueSmirf, using the MAC Address ( in my case : - 00:A0:96:18:FD:1A) : -
Code: Select all
rfcomm connect 0 00:A0:96:18:FD:1A

You should see a response like this : -
Connected /dev/rfcomm0 to 00:A0:96:18:FD:1A on channel 1
Press CTRL-C for hangup

Open a new tab (on the same terminal)or a new terminal and setup minicom.
Code: Select all
sudo minicom --setup

Enter into "Serial port setup" on the menu and change the device to /dev/rfcomm0. The only other settings to change (as to be expected) are "Bps/Par/Bits" {9600 8N1}, "Hardware Flow Control"{none} and "Software Flow Control"{none}.
Use the "Enter" key to exit the Serial port setup and select "Save setup as dfl". Then exit minicom.
This setup process will allow you to connect as a user, since it allows configuration files to be created at /etc/minicom/{minicom.users minirc.dfl}

You should be ready to connect (and program) your BlueSmirf just by using the minicom command by itself :-
Code: Select all
minicom

You should see somthing like this
Welcome to minicom 2.2

OPTIONS: I18n
Compiled on Apr 27 2007, 16:42:25.
Port /dev/rfcomm0

Press CTRL-A Z for help on special keys
If you don't see the connection "Port /dev/rfcomm0", then you need to setup a user "dfl" (just as you had done above), by Pressing CTRL-A Z then o key.

Press CTRL-A Z and then the e key to enable local echo.

press +++ to see if it works, you should get a OK response. Your now in command mode.

You can now set the Baud rate to 57600 bps : -
Code: Select all
atsw20,236,0,0,1


And reduce the stand-by consumption Current (48mA) down to 2mA : -
Code: Select all
atsw21,2560,11,2560,11


And don't forget to rename the BlueSmirf too :) (Substitute name to whatever you like) : -
Code: Select all
atsn,name


And to exit configuration mode:-
Code: Select all
atmd



To exit out of minicom, Press CTRL-A Z q

You will need to setup the minicom com port settings to 57600 8N1, if you want to reconnect to your modified BlueSmirf via minicom.

Just of interest I've spotted this post about changing the speeds between two bluetooth devices (local and remote). It just happens to be the same blutooth module WML-C40AH (thats the BlueSmirf I have), and so uses the same BR-AT_COMMANDS-100 instruction set.

I was thinking about "reversing the local and remote devices, so that local is remote and remote is local". Just an idea :)


----------------

Oh yea, I've found a nice way to install the BlueSmirf into the CM5.

There is a area (in a corner of the CM5) cover, to allow for a small hole (for your wires) : -
Image

I've found it convenient to solder the +ve 5V wire directly to the FET/regulator (for a stronger connection). There is enough space between the PCB and plastic enclosure to allow for wires : -
Image

And the rest is as so : -
Image
Image
Last edited by linux23dragon1 on Wed Mar 26, 2008 5:46 am, edited 7 times in total.
Love Linux and 3D Linux Games :)
linux23dragon1
Robot Builder
Robot Builder
User avatar
Posts: 7
Joined: Wed Feb 27, 2008 12:34 pm

Post by limor » Thu Feb 28, 2008 5:47 pm

Post by limor
Thu Feb 28, 2008 5:47 pm

Thanks for sharing the great linux info!

We actually tried to get the wires through a hole on the side the way you described but couldn't get the right width wires that would not press across on the PCB surface. :oops:
Thanks for sharing the great linux info!

We actually tried to get the wires through a hole on the side the way you described but couldn't get the right width wires that would not press across on the PCB surface. :oops:
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by linux23dragon1 » Thu Feb 28, 2008 10:47 pm

Post by linux23dragon1
Thu Feb 28, 2008 10:47 pm

limor wrote:Thanks for sharing the great linux info!

We actually tried to get the wires through a hole on the side the way you described but couldn't get the right width wires that would not press across on the PCB surface. :oops:


Indeed, I was lucky to have all the resources available. It just shows that there is more than one way to skin a cat (so to speak) :)
limor wrote:Thanks for sharing the great linux info!

We actually tried to get the wires through a hole on the side the way you described but couldn't get the right width wires that would not press across on the PCB surface. :oops:


Indeed, I was lucky to have all the resources available. It just shows that there is more than one way to skin a cat (so to speak) :)
Love Linux and 3D Linux Games :)
linux23dragon1
Robot Builder
Robot Builder
User avatar
Posts: 7
Joined: Wed Feb 27, 2008 12:34 pm

Post by trey3670 » Wed Jul 16, 2008 2:57 am

Post by trey3670
Wed Jul 16, 2008 2:57 am

do I understand correctly that there is a bcp that I need to download to use bioblue? I cant find it anywhere if so,on the zip package from downloading it I find an msi file but it seems like the bcp wont recognize it
do I understand correctly that there is a bcp that I need to download to use bioblue? I cant find it anywhere if so,on the zip package from downloading it I find an msi file but it seems like the bcp wont recognize it
trey3670
Savvy Roboteer
Savvy Roboteer
Posts: 115
Joined: Mon Dec 24, 2007 1:03 am

Post by srobot » Wed Jul 16, 2008 3:23 am

Post by srobot
Wed Jul 16, 2008 3:23 am

trey3670 wrote:do I understand correctly that there is a bcp that I need to download to use bioblue? I cant find it anywhere if so,on the zip package from downloading it I find an msi file but it seems like the bcp wont recognize it


The BCP file should be in C:\Program Files\BioBluePC\Bioloid\ . Also make sure that BioBlue is setup for the Bioloid, not the RN-1.
trey3670 wrote:do I understand correctly that there is a bcp that I need to download to use bioblue? I cant find it anywhere if so,on the zip package from downloading it I find an msi file but it seems like the bcp wont recognize it


The BCP file should be in C:\Program Files\BioBluePC\Bioloid\ . Also make sure that BioBlue is setup for the Bioloid, not the RN-1.
Dell Latitude D520, Windows XP, 4 GB RAM, 80 GB HDD, Intel Core 2 Duo. The power that's needed!

RIBO Labs, Springing Robotic Development to a New Level
srobot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 401
Joined: Sun Dec 10, 2006 1:00 am
Location: Deep in robot parts

Post by trey3670 » Wed Jul 16, 2008 4:00 am

Post by trey3670
Wed Jul 16, 2008 4:00 am

thanks! found it got it and the mnt file loaded,still no response from bioloid though i will hit connect,then intilize then click a button and the rxd led on the robot lights up for a sec then nothing,wonder where i have screwed up now?
thanks! found it got it and the mnt file loaded,still no response from bioloid though i will hit connect,then intilize then click a button and the rxd led on the robot lights up for a sec then nothing,wonder where i have screwed up now?
trey3670
Savvy Roboteer
Savvy Roboteer
Posts: 115
Joined: Mon Dec 24, 2007 1:03 am

Post by srobot » Wed Jul 16, 2008 4:24 am

Post by srobot
Wed Jul 16, 2008 4:24 am

trey3670 wrote:thanks! found it got it and the mnt file loaded,still no response from bioloid though i will hit connect,then intilize then click a button and the rxd led on the robot lights up for a sec then nothing,wonder where i have screwed up now?


Are you using Zig-100 or BlueTooth?
trey3670 wrote:thanks! found it got it and the mnt file loaded,still no response from bioloid though i will hit connect,then intilize then click a button and the rxd led on the robot lights up for a sec then nothing,wonder where i have screwed up now?


Are you using Zig-100 or BlueTooth?
Dell Latitude D520, Windows XP, 4 GB RAM, 80 GB HDD, Intel Core 2 Duo. The power that's needed!

RIBO Labs, Springing Robotic Development to a New Level
srobot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 401
Joined: Sun Dec 10, 2006 1:00 am
Location: Deep in robot parts

Post by trey3670 » Wed Jul 16, 2008 4:31 am

Post by trey3670
Wed Jul 16, 2008 4:31 am

just added bluetooth
just added bluetooth
trey3670
Savvy Roboteer
Savvy Roboteer
Posts: 115
Joined: Mon Dec 24, 2007 1:03 am

Post by trey3670 » Wed Jul 16, 2008 4:34 am

Post by trey3670
Wed Jul 16, 2008 4:34 am

i am useing the sparkfun module. when I open up bioblue and click connect the green light on the sparkfun lights up and when I click a motion the bottom says it sent the info,the rxd button lights up and nothing.
do i need to configure the sparkfun somehow? I am clueless how to do that
i am useing the sparkfun module. when I open up bioblue and click connect the green light on the sparkfun lights up and when I click a motion the bottom says it sent the info,the rxd button lights up and nothing.
do i need to configure the sparkfun somehow? I am clueless how to do that
trey3670
Savvy Roboteer
Savvy Roboteer
Posts: 115
Joined: Mon Dec 24, 2007 1:03 am

PreviousNext
53 postsPage 2 of 41, 2, 3, 4
53 postsPage 2 of 41, 2, 3, 4