Go Down

Topic: Bluetooth receiver fro arduino (Read 7235 times) previous topic - next topic

boylesg

I have been reading about this and found the usb host shield combined with a Bluetooth dongle to connect a wireless gamepad to the arduino.

But it seems inefficient to go from Bluetooth dongle->usb host shield->arduino when it is probably possible to go directly from a Bluetooth receiver of some sort (similar to the master and slave HC05 devices that have already tried).

Apart from the fact that the standard arduino uno size usb host shields available on ebay make to rather difficult to have a 20 or so sets of interface pins for servos.

Does any one have any recommendations for me as to a suitable Bluetooth module that connects directly to an arduino rather than a standard usb dongle combined with the usb host shield?

Nick_Pyner


it is possible to go directly from a Bluetooth receiver of some sort (similar to the master and slave HC05 devices that have already tried).



You seem to have answered your own question. The HC-05 you have already tried does exactly what you want it to do. The most common way of doing this is with the JY-MCU backboard which can be connected by cable, plugged into breadboard, or soldered directyl onto a proto shield.


boylesg



it is possible to go directly from a Bluetooth receiver of some sort (similar to the master and slave HC05 devices that have already tried).



You seem to have answered your own question. The HC-05 you have already tried does exactly what you want it to do. The most common way of doing this is with the JY-MCU backboard which can be connected by cable, plugged into breadboard, or soldered directyl onto a proto shield.



My apologies, I actually have the HC06 modules (either master or slave).

I have read that PS3 gamepads are slave devices I think. So that would mean I would need the HC06 master. Am I correct here?



Nick_Pyner

It might pay to make sure of what you really have by sniffing the module with your phone or something. The HC-06 identifies as  LINVOR and the HC-05 as either HC-05 or sometimes just the COM port. The HC-06 is slave only. The HC-05 can be either.

The PS3 controller will be a slave, so you need an HC-05 to pair with it. There is a wealth of information on this.

boylesg


It might pay to make sure of what you really have by sniffing the module with your phone or something. The HC-06 identifies as  LINVOR and the HC-05 as either HC-05 or sometimes just the COM port. The HC-06 is slave only. The HC-05 can be either.

The PS3 controller will be a slave, so you need an HC-05 to pair with it. There is a wealth of information on this.

HC06 come as both masters and slaves because I have previously purchased one of each off ebay, plus the USB to RS232 converter cables to go with them.
I was using them to communicate wirelessly between my arduino and teraterm on my PC.

Oh....except that they identify as COM ports only in windows so I am not going to be able to 'sniff' anything with them easily on the PC.

Probably the same with the HC05 modules.

Unless there are libraries or code sippets to do all this on the arduino and then report the results serially back to the arduino compiler on the PC.

Nick_Pyner


HC06 come as both masters and slaves because I have previously purchased one of each off ebay, plus the USB to RS232 converter cables to go with them.


I bet you didn't,  and I bet you can't tell them apart by looking either, which is why I said what I said.

Quote

I was using them to communicate wirelessly between my arduino and teraterm on my PC.


HC-05 and HC-06 will both do that by default

Quote

Oh....except that they identify as COM ports only in windows so I am not going to be able to 'sniff' anything with them easily on the PC.


Sounds like you have already sniffed it when scanning for bluetooth. If they identify by COM port only, they are HC-05s. HC-06s say LINVOR

Quote

Unless there are libraries or code sippets to do all this on the arduino and then report the results serially back to the arduino compiler on the PC.


Possible but unnecessary.

boylesg



HC06 come as both masters and slaves because I have previously purchased one of each off ebay, plus the USB to RS232 converter cables to go with them.


I bet you didn't,  and I bet you can't tell them apart by looking either, which is why I said what I said.

Quote

I was using them to communicate wirelessly between my arduino and teraterm on my PC.


HC-05 and HC-06 will both do that by default

Quote

Oh....except that they identify as COM ports only in windows so I am not going to be able to 'sniff' anything with them easily on the PC.


Sounds like you have already sniffed it when scanning for bluetooth. If they identify by COM port only, they are HC-05s. HC-06s say LINVOR

Quote

Unless there are libraries or code sippets to do all this on the arduino and then report the results serially back to the arduino compiler on the PC.


Possible but unnecessary.


In order to connect to a bluetooth device on the PC, don't you need bluetooth stack software running on the PC.?

Because I previously tried that and the bluetooth stack software does not recognize the HC06 device connected to a USB port via the converter cable.

Or will a bluetooth device still connect through one of these but perhaps you need to set it up with baud rate etc manually through the com port settings?

As to which HC06 module is which - master or slave - surely it would be a case of trying each until you find the one that works with the bluetooth device?

Nick_Pyner

#7
Dec 17, 2013, 01:21 am Last Edit: Dec 17, 2013, 12:27 pm by Nick_Pyner Reason: 1

In order to connect to a bluetooth device on the PC, don't you need bluetooth stack software running on the PC.?


You definitely need that, or something like it. While my desktop can use a bluetooth mouse, I have never succeeded in getting it to talk to Arduino.  I have three Dell laptops and one Toshiba. All use the Toshiba bluetooth stack, which is a standard Dell driver, and all of them can talk to Arduino. Toshiba Bluetooth stack will not work on my desktop.

Quote

Because I previously tried that and the bluetooth stack software does not recognize the HC06 device connected to a USB port via the converter cable.


This is could be because you are trying to use the HC-06 as a master, but I wouldn't expect the HC-05 to work either..

Quote

As to which HC06 module is which - master or slave - surely it would be a case of trying each until you find the one that works with the bluetooth device?


No.  Or it depends on the bluetooth device and you either get it right first time, or you will never get it right.

If you are quite sure you have an HC-06, it would be much easier to read the data sheet, wherein you will find it is not a master, it is a slave only device.  This will save you the trouble of trying anything.  If you just think you have an HC-06, which is clearly the case, you can verify that you haven't by sniffing it with something else, hence my previous comments. I say this because I don't believe you can change the name of an HC-06, therefore, if it doesn't tell you it's LINVOR, it isn't one.

I think you are going off on a pointless tangent anyway. If you just want to communicate with a master, it doesn't matter whether it is an HC-05 or HC-06. If you have an HC-05 configured as a master, I don't think that matters either. I only raise this matter because knowing what gear you have is always a good idea, and you surely don't. The only time you actually need an HC-05 is when you want to communicate with a slave device. The main reasons why everybody buys HC-05 is because it is the bleeding obvious, they are priced about the same as an HC-06,  and there is less chance of making a mistake. The man most  likely to be making a mistake is the man with two HC-06s.  

 

boylesg


The man most  likely to be making a mistake is the man with two HC-06s. 


On this occasion I must have got it right because the two HC06 devices I have do successfully talk to each other.

And before purchasing them off ebay I asked the advice of the arduino seller in the states anyway. And he made sure I was purchasing the correct components.

But as you say I have no way of telling which is the slave and which is the master.


Alright.....so what is your advice as to suitable hardware to connect a standard PC bluetooth gamepad to an arduino? Other than a USB host shield and usb bluetooth dongle?

Nick_Pyner


On this occasion I must have got it right because the two HC06 devices I have do successfully talk to each other.


As I said, I bet you haven't.

Quote

And before purchasing them off ebay I asked the advice of the arduino seller in the states anyway. And he made sure I was purchasing the correct components.


This may be true. The seller can do this by selling you either an HC-05 and an HC-06, or more likely, two HC-05s.

Quote

But as you say I have no way of telling which is the slave and which is the master.


Yes you do,  and I never said that. What I said was I bet you can't tell by looking. I also said several times that you can tell by sniffing. If it says it's a linvor, it's a slave.   More to the point, if it doesn't say linvor, you haven't got an HC-06. 

Quote

Alright.....so what is your advice as to suitable hardware to connect a standard PC bluetooth gamepad to an arduino?


I assume you mean a PS3 or Xbox controller. These are slave devices and you therefore need a master to pair with them, an HC-05. There is wealth of information on this, including recent discussion on this forum. I don't know anything about them,  I guess you have to sniff the controller to get its name for use in the Arduino, but they may be all the same - therefore no need.


boylesg



I assume you mean a PS3 or Xbox controller. These are slave devices and you therefore need a master to pair with them, an HC-05. There is wealth of information on this, including recent discussion on this forum. I don't know anything about them,  I guess you have to sniff the controller to get its name for use in the Arduino, but they may be all the same - therefore no need.



I was going to try using my son's PS3 gamepad, but it sounds like to much hassle with the MAC addresses or what ever they are. Every time I want to control my arduino it sounds like I will have to change the MAC address in the gamepad and then back again for to work with the PS3. Bugger that!

No, I was considering using just an ordinary bluetooth game pad for a PC, which usually come with their own dedicated bluetooth dongle for the PC.

Nick_Pyner


No, I was considering using just an ordinary bluetooth game pad for a PC, which usually come with their own dedicated bluetooth dongle for the PC.


The answer is the same no matter how you cut it. The gamepad is a slave, the PC is the master. Therefore, if you want it to work with the Arduino, it must be a master too. HC-05

I don't know why you would need to change the MAC address, or how you would do that.  Indeed, I have never heard of a bluetooth MAC address, and it would be good idea to carefully check that you need to do this. You might find that the PS3 device is entirely suitable and no inconvenience.

boylesg

I just had a better idea to achieve this sort of thing.

I have a USB gamepad, additional arduinos and the HC06 modules.

I could just plug the USB host shield into an arduino uno and plug my USB gamepad into that - I will have to put the arduino uno in my pocket or something.

The uno can interpret the commands from the gamepad and send them to the arduino operatiing my hexapod via the HC06 modules.

That allows me to use the mega sensor shield on the hexapod which will in turn make it easy to connect all the servos.

And it means I only have to purchase one additinal item - the usb host shield.

Nick_Pyner


additional arduinos and the HC06 modules.
The uno can interpret the commands from the gamepad and send them to the arduino operatiing my hexapod via the HC06 modules.


In view of the previous posts, no more comment is possible, other than that the pairing of those HC-06s will be quite an interesting exercise - for a while.

boylesg



additional arduinos and the HC06 modules.
The uno can interpret the commands from the gamepad and send them to the arduino operatiing my hexapod via the HC06 modules.


In view of the previous posts, no more comment is possible, other than that the pairing of those HC-06s will be quite an interesting exercise - for a while.


In effect I will convert an ordinary wired USB gamepad into my own version of a wireless bluetooth one.

I suppose I better check how much current those things draw in case it it too much for the arduino.

Go Up