Bluetooth on Ubuntu 12.04

Hello,

I’m trying to connect to the bluetooth module provided with Hexy and I’m having some issues.

I’m able to get the module paired and see it in /dev/rfcomm0 from PySerial using:

When I try:

I just get: ‘’

I’ve tried sending commands using:

Or:

But I get no response with a followup readline() command

I’ve also tried sending ‘C’ and ‘C/n’ to see if Hexy responds at all. No joy.

The only time I can get any response from ser.readline() is after I press the reset button on Servotor in which case I’ll receive “AT+BAUD4” and then nothing. I’m still unable to communicate with the bluetooth module in any meaningful way.

Can anyone offer some advice as to what might be happening here? I’m trying to troubleshoot since I can’t get PoMoCo to communicate with Hexy even with the hack that hard codes /dev/rfcomm0 into Servotor.py.

Any help would be appreciated!

Regards,
Daniel

I have BT working under Ubuntu. Few steps to get it all going mentioned in this other post. Hack of ServotorComm.py and resetting the Servotor32 PCB while powered with the BT module in. It’s also recommended to run the logic on a separate 9V battery.

Oh, and running python as root (“sudo python PoMoCo.py”).

I’ve implemented the ServotorComm.py hack in my GitHub repository. Good luck!

Thanks for the reply!

I’ve tried those things and I still can’t seem to get it to work. I wish I knew where I was going wrong.

Maybe I’ll try a VM with a fresh install of Ubuntu; there could be something I’ve done to the OS at some point that’s making it not work properly.

Either way, I’ll give it another shot and check back in. Thanks for the feedback!

Try terminating your commands with \r instead of \n. That threw me a bit when I was writing code for Hexy, too.

Oh, awesome! Thanks for the tip! I’ll give it a shot tonight.

I’ve been busy rewriting the Python so I can access Hexy using terminal commands and write more complicated behaviors for him. I’ve recently started implementing some memory so I can translate those into moods. Should be interesting.

All I need is a petulant Hexy.

Regards,
Daniel