About master/slave, as you think your module is master there is simple way check it. can you look tracks or measure where status led on your btmodule is connected. if it's connected to pin 24 of module it then have hc04 firmware and its slave only. if led goes pin 31 or 32 then hc05 firmware and it can be master or slave.
to find right pins, tx and rx are 1 adn 2 and opposite side last pin is 34
pin 1 is also marked with white point
If its hc04 its ok for you as its slave and default baudrate is 9600, but if its hc05 you can change it to slave sending AT+ROLE=0\r\n command from arduino or terminal via tx/rx pins. before that you must put it in at mode by setting pin 34 of module to high state, dont use 5v but 3.3v for this, and powerup it. its now in at mode and baudrate must be now 38400.
when paired defaul baudrate for both is 9600.
you can also test ttl serial communication by sending AT (for hc04) or AT\r\n(hc05), module should reply OK, you can use led off/on to show ok reply.
Other thing, that module have onboard regulator so it can be connected to 5v, but rx and tx are still 3.3v tolerant. im not sure about atmel chips(i use schottky & pullup) but some other cases ttl serial communication is not working if it is connected to 5v logic. i suggest to add atleast resistor(maybe 1k)from arduino tx to module rx line.
Hi, I am using several cheap bt modules with my dev systems. I am using IVT BlueSoleil (the application/driver comes with the Sweex usb bt dongle) and I am in doubt whether it will work without this application (under XP). There are always two ports listed (ie com15, 16) - no idea why, when connected to the first bt module the third com appears (com17) and this is the com I connect myself to via ie teraterm. When you connect to the second bt module the com18 appears and so on. I do not care what XP device manager says, never checked that, everything is managed via BlueSoleil application/driver (a small BT icon in the taskbar). The bt modules need to be set to a specific baudrate, default was 9600 with mines. P.
I'm still not getting anywhere on this, but I very much appreciate all the details you have provided. Since my original post, I moved on to a BT shield which is master/slave so I don't believe that is the issue currently (but then again, it still could be). I will check the traces on the original module I was using to answer that question as suggested.
The data sheet it a bit hard to follow. I've tried using tera-term to connect to the module but am not having success there either. The problem connecting to the module via tera-term is the terminal is not echoing any of the keys pressed. Not sure what the deal is but I assume it is some configuration issue I haven't worked out yet. At any rate, any tips there would be appreciated.
As for the general bluetooth connectivity issue, it seems, based on what I understand from UK350, that my bluetooth module is connected but not "paired". I do have an entry in device manager for the module: Ports (COM & LPT) > Standard Serial Over Bluetooth Link (COM14). This coincides with port associated with the bluetooth module in control panel > devices & printers > bluetooth devices > itead.
The status of itead in control panel show it was last connected April 1, 2012 (today) but is not currently connected. And, the connection type is "authenticated." This seems to agree with UK350's assessment.
I have confirmed that no other services are using COM14 when attempting to run my Processing code, however, COM14 does not show in the Serial.write() output. I suspect this is normal for a device that is not paired.
did you see blue bluetooth icon next to clock?
I do have the bluetooth icon in the system tray and when I click it, I see my ardiuno/bluetooth module connected - it's named "itead". I have removed it and rediscovered it to mimic what you do in your video, but this issue still exists for me. In the above thread entries, where I reference
as datasheet say you can use that command to be sure about mode, baud and pairing code.
you only have to select CMD with switch, power it up and make sketch that send AT+ORGL\r\n via arduino serail port with baudrate 38400.
if you then think you got it paired,(in my video i use hc04 module so it stop blinking when paired, for hc05 led blink time thing is right as it's described in datatsheet) make sketch that send some chars(just use loop to send something ) from arduino and try receive it via terminal on pc.
I got the same cheap BT module you are trying to use.
I get exactly the same behavior in XP, with 2 COM ports listed after Windows connects to the BT module. One port is "outgoing", the other one is "incoming". I think that Bluesoleil software (and others like it) just hides the complexity underneath, so users don't get confused when they see the multitude of ports.
So, at this point, one can either receive from Arduino through BT on the incoming port, or send out to Arduino through BT on the outgoing port. Trying to connect with a terminal app (I tried CoolTermWin) on the incoming results in an error. I could connect on the incoming port with the HyperTerminal though, which allowed me to receive messages from Arduino. This is the sketch I am running (using an ATmega with 2 serial ports, but should be easily adapted to Atmega328):
I am able to receive, sometimes, in HyperTerminal, the repeated message "from Arduino". So the connection works, but it is not reliable. Even after a fresh re-connect (in Windows), it may still not work. I suspect it is the USB dongle. I only have one, so I have no way to test it.
i am sending a character from my Android mobile using BLuetooth chat code (attached). I have programmed arduino as attached and is given below. I am sending a character from the chat application but else case in the code below executes every time i.e default pin13 gets on.
I found your post in my search for answers on the same problem. No joy at all on win 7. The BT connection always has 2 ports. Any attempt to use the serial monitor on the Arduino software causes a lock up. Putty sometimes opens the ports and sometimes doesnt. The red flashing light never goes out. Strangely now my BT dongle has stopped working and I dont get any ports at all.
On windows XP however a slightly different story. I plugged in the BT dongle (MSI) and allowed XP to download the three drivers from windows update. It had to be done manually one by one as initially 2 devices showed up as unknown or driver not installed correctly. Then when I searched for BT devices it found Linvor (JY-MCU name) and I was able to connect. I got one port outgoing and one port incoming but hey presto the red light on the BT module went continous! Putty was able to connect to the port but i couldn't send any characters from putty. When I tried the Arduino serial monitor it all locked up and the BT LED light went back to flashing. Now I cant reconnect.
I was able to connect again by removing the dongle, powering off the Arduino and starting from scratch. Windows XP reloads the drivers for the serial communication port and reinstalls the two ports. I also discovered that the red light only goes continuous when I open up the port using putty.
so I was able to upload a sketch which printed out through the USB serial monitor on the win7 machine and through the BT and putty on the Win XPmachine. The sketch is as follows (courtesy Hobby Components):
So under win xp it works after a fashion at least for output to a pc. For some reason I cant send anything to the Arduino from the XP laptop though the other port. This is still no good for my application. I however conclude that all the problems with Win 7 are to do with either my old BT dongle not being compatible or the drivers being no good.
Finally got it to work with a new BT dongle and standard Win 7 drivers. It loads up 2 ports but only one actually works. Bluesoliel turned out to be a red herring. It comes with the cheap BT dongles but is disabled and tries to get you to pay $20 for valid licence.Its not necessary to get the dongle to work.
I had to play with the Putty terminal settings to see my input and the output from the Arduino on BT. You have to force local echo and carriage return. The Arduino software serial monitor doesn't seem to work with BT.
here is my code:
This code detects the character A and sends a reply to the same port it was received on. Its not 100% accurate on the BT port for some reason. I've got more work to do before this is going to be a reliable way to send and receive data.
Oh hey Mike, its HazardOfExistance from youtube, your still having problems? I thought I helped you with that already.
also processing doesn't like that type of BT module. thought I told you that too?
In case anybody is still on this topic, I managed to get it to work 5min after my previous post, thanks to a suggestion on Processing forum. Using a virtual serial port emulator ( -tips/vspe-download-free-virtual-serial-ports-emulator/) you can copy the stream from one port to another using a "splitter".
I have a Bluetooth media remote with pause/play, skip forward/skip backwards, vol up/down buttons. It has no other buttons. And Microsoft Bluetooth stack requires a passcode, which I physically cannot enter. I've tried Bluesoleil and Toshiba stacks, they require passcode as well. I have not found a way to skip the pass with either of these 3 stacks. The only one I can't try is Broadcom, I don't have their USB bluetooth dongle and their stack only works with their chipsets, it seems. Does Widcomm allow connecting a BT keyboard without entering a passkey?
The application must confirm they wish to perform the pairing action. You can present an optional confirmation dialog to the user. With a value of ConfirmOnly, Accept the pairing if you want it to complete.
Actually, there is a simple way to pair a Bluetooth mouse in Windows 10. You just have to go into the old Control Panel to Add a Device. Don't use the Win10 Settings interface. In the old CC interface, when asked for a code, ignore it and click NEXT. On my Dell laptop, it installed the driver. I rebooted it and the HP N558 mouse works without fuss. I had also done that with the MS Surface Pro 4.
b1e95dc632