Could someone test AT commands with BlueTooth ZS040 ( 4pins )

Hello people, I have tested a lot of things with the bluetooth module ZS040 to set any AT command, but without results.

There is a version with 6 pins, but the version that I have, it got only 4 pins and the people that could put any AT command to it, have connected PIN34 to an output of the arduino to set it on or off.

I did it too, but no AT commands.

Could someone set a AT command to this device ?

Best regards, GInza.

There are 2 versions that use the same break out board, HC-05 and HC-06 HC-05 can be master or slave, HC-06 is slave only. The HC-05 has a small button switch above the EN pin, the HC-06 generally does not.

HC-05 has many AT commands. The HC-06 only has a few commands

It sounds like you may have the HC-06 version, take a look at HC-05 and HC-06 zs-040 Bluetooth modules

You can also check the firmware version (AT+VERSION). My HC-06 zs-040 report "linvorV1.8"

Hi MartynC, thanks for your reply and the information.

I have read in the page you have posted, that if the ZS040 only accepts AT commands in uppercase. I will test it. (normally I use lowercase)

But, when I try to pass it to AT Mode with the PIN34, the led always blink fast, never once each 2 seconds.

The datasheet indicates two ways to pass it to AT mode.

DataSheet says: How to get to the AT mode. Way 1: Step 1: Input low level to PIN34. Step 2: Supply power to the module. Step 3: Input high level to the PIN34. Then the module will enter to AT mode. The baud rate is as same as the communication time, such as 9600 etc.

Way 2: Step 1: Connect PIN34 to the power supply PIN. Step 2: Supply power to module (the PIN34 is also supplied with high level since the PIN34 is connected with power supply PIN). Then the module will enter to AT module. But at this time, the baud rate is 38400. In this way, user should change the baud rate at the AT mode, if they forget the communication baud rate.

I have tested both ways but no AT Mode.

Any idea about this ?

ZS-040 does not describe a bluetooth device, it is merely the breakout board on which it is mounted, but you specifically state that your device has four pins. This suggests that you have an HC-06 (slave only) module, but you are reading the instructions for an HC-05. I submit that no amount of fiddling around with pin 34 is going to fix anything, and you should start over and get the routine for configuring an HC-06. You can verify this by sniffing the device with your phone, if you haven’t already done this. An HC-05 will report as HC-05, and an HC-06 as “Linvor”. Essentially, an HC-06 is always in AT mode, ready to go, whenever it is not actually connected - no other wiring needed, hence the four pins.

Hi Nick_Pyner, thanks a lot for your reply.

By now I only have connected the phone to the bluetooth with the BlueTerm App to send commands from phone to arduino and viceversa.

What do you mean with sniff the bluetooth module ?

What is the blinking state of the led when is in AT Mode the HC-06 ?

Best regards, Ginza.

Ginza: What do you mean with sniff the bluetooth module ?

Pairing or connecting. The device name appears in the phone's list.

What is the blinking state of the led when is in AT Mode the HC-06 ?

Approx one every two seconds, a lot slower than the ready flash.

Hi Nick_Pyner, yes the Bluetooth device appears on the phone's list and I can connect to it with my phone with the BluTerm app. I have communication between Arduino and the phone and viceversa.

Now, I want test some at commands on the HC06 device, like connect it to internet with the WiFi. But the led blinks very fast, such as twice per second.

Any idea about AT Mode with HC06 ?

Best regards, Ginza.

Ginza: like connect it to internet with the WiFi. But the led blinks very fast, such as twice per second.

I think you had better read up on what Bluetooth devices do, because it looks like you are in for a bit of a surprise. Bluetooth has nothing to do with either WiFi or the Internet. All they do is what you have already done - connect Arduino to your phone - and the AT commands do little more than change the name of the device, the password, and the rate of data transmission.

The next thing you should do is consider whether you actually need to use AT mode. It took me a couple of years to find a reason for doing it, and even then it turned out to be somewhat spurious.

If you really need to, Martyn is a configuration guru and he has given you the link to his site. Essentially, the HC-06 is ready to go when the power is on, and you just send it AT commands.

Hello Nick_Pyner, thanks for your reply. Sorry for my english, Im Spanish, but I will try to explain you the idea.

About the power of AT commands... I have worked several years with Serial/USB Modems that worked with sim cards.

I have developed software solutions that worked with theese modems connecting them to GPRS by AT Commands.

For example AT+CIPSTART is one command that do this connection, followed by another AT commands.

My Idea is... If the bluetooth module accepts AT commands, perhaps it can connect to internet by the wireless router.

I think that the HC-05 is better than the HC-06, but the module that I have now is HC-06, so I must work with it until I can buy the HC-05.

I have read several articles from Martyn web site, and they are amaizing and very interesting, but I could not set AT mode in the HC06 by now.

Best regards, Ginza.

Ginza: My Idea is... If the bluetooth module accepts AT commands, perhaps it can connect to internet by the wireless router.

Read reply #7 again and check the HC-05 list of AT commands. Also the pcb connections. A GPRS has a different set of commands from a Bluetooth and they are not interchangeable. You are definitely wasting your time with an HC-06 and you are almost certainly wasting your time with an HC-05 too.

I like develope code and make that code works with hardware devices.

When I started developing for modems using GSM and GPRS protocols was a new world for me. AT commands look like simple, but they are very powerful.

I will continue testing the internet connection with the bluetooth module and I will upload the results.

Thanks a lot.

Best regards, Ginza.

I just wanted to add some information to help correct what appears to be misinformation about the HC-06 on the ZS-040 board. I spend hours trying to get one of these into AT mode to eventually find out that:

(a) it is always in AT mode except when the light is not blinking, (b) the light stops blinking only when a virtual serial connection has been established through Bluetooth, (c) being paired alone does not make it leave AT mode, (d) perhaps most importantly, the light always blinks fast -- there is no slow blink. The light blinks multiple times per second when in AT mode.

I have also tried a GW-040 version of the HC-06, and it acted exactly the same.