Thắc mắc Module bluetooth hc-05

Thảo luận trong 'Sản phẩm - Dự án.'

Đang xem chủ đề này ( Thành viên: 0, Khách: 0)

  1. Concept

    Concept Kỹ sư

    Mình nghĩ bạn nói chính xác, Bạn định thiết lập thông số gì cho HC-05 ? nếu cần tham khảo tập lênh bạn xem ở đây nhé bạn nhấp vào đây AT command mode of HC-05 and HC-06 Bluetooth module - All
     
    Last edited: 9/1/17
    damme50_vn thích bài này.
  2. damme50_vn

    damme50_vn Học sinh trung cấp

    Cảm ơn bác concept. em để đây để người khác có thể xem luôn.
    For HC05: Type "AT" (without the quotes) on the serial monitor and press enter. if "OK" appears then everything is all right and the module is ready to take command. Now you can change the name of the module, retrieve address or version or even reset to factory settings. To see the default name, type AT+NAME. The name will be prompted, by default it is HC-05 or JY_MCU or something like that. To change the name just type AT+NAME=your desired name.

    Here is an important note, if the key pin is not high, i.e. not connected to Vcc while receiving AT commands(if you did not solder the wire and released it after the module entered AT mode), it will not show the default name even after giving right command. But you can still change the name by the command mentioned above. To verify if the name has really changed, search the device from your pc/mobile. The changed name will appear. To change baud rate, type AT+UART=desired baud rate. Exit by sending AT+RESET command.

    Most useful AT commands are

    AT : Ceck the connection.
    AT+NAME : See default name
    AT+ADDR : see default address
    AT+VERSION : See version
    AT+UART : See baudrate
    AT+ROLE: See role of bt module(1=master/0=slave)
    AT+RESET : Reset and exit AT mode
    AT+ORGL : Restore factory settings
    AT+PSWD: see default password

    More detailed AT commands are given in the 1st pdf.

    For HC06: On arduino serial monitor type "AT" (without the quotes) and press enter, "OK" will confirm AT mode. Unlike HC05, you can't see the default name or baud rate. You can only change them. To change name type AT+NAMEDESIRED NAME, notice that there should be no space between the command and name. The module will reply OKyour set name. For example, AT+NAMEPROTOTYPE will set the name to PROTOTYPE. To change baud rate, type AT+BAUDX, where X=1 to 9.

    1 set to 1200bps
    2 set to 2400bps
    3 set to 4800bps
    4 set to 9600bps (Default)
    5 set to 19200bps
    6 set to 38400bps
    7 set to 57600bps
    8 set to 115200bps
    so sending AT+BAUD4 will set the baud rate to 9600.

    For Tera Term write down the commands somewhere else and paste it on the console by right clicking. No need of pressing enter. The command will be executed immediately and confirmed.

    HC 06 AT commands are limited, all I could find are given here.

    AT : check the connection
    AT+NAME: Change name. No space between name and command.
    AT+BAUD: change baud rate, x is baud rate code, no space between command and code.
    AT+PIN: change pin, xxxx is the pin, again, no space.
    AT+VERSION
     

Chia sẻ trang này