News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

HC-05 Bluetooth module

Started by Giuseppe, Nov 01, 2025, 07:00 PM

Previous topic - Next topic

Giuseppe

Does anyone have a code to use this module with pic? Thanks

Abdullah

DEMO PROTEUS HC 05 BLUETOOTH MODULE
Abdullah

Giuseppe

Thanks, I'll try it with my 16f1705 now and then I'll let you know.

flosigud

What do you want the code to do? I just use HC05 as a serial port. You don't need any code to set the Baud.

Giuseppe

I found these commands to set forces initially you have to set

AT Tests the connection to the AT interface
AT + reset Resets our component
AT + version Reports the firmware version
AT + orgl Resets the current settings to default
AT + addr The device reports its address
AT + name Requests or sets the device name
AT + rname Requests the name of a Bluetooth device we are connected to (remote)
AT + role Requests or sets the device role (1 = Master / 0 = Slave)
AT + class Requests or sets the device class (Class of Device CoD)
AT + iac Requests or sets the access code requests
AT + inqm Requests or sets the access mode requests
AT + pswd Requests or sets the password or sets the binding
AT + uart Requests or resets the UART parameters
AT + cmode Requests or sets the connection mode
AT + bind Requests or sets the binding to the Bluetooth address
AT + polar Query or set the LED output polarity
AT + pio Set or reset a user Input/Output (I/O) pin
AT + mpio Set or reset multiple user I/O pins
AT + mpio? Request the I/O of a user pin
AT + ipscan Request or set scan parameters
AT + sniff Request or set SNIFF power saving parameters
AT + senm Request or set security and encryption modes
AT + rmsad Delete an authenticated device from the list
AT + fsad Find a device from the list of authenticated devices
AT + adcn Request the total number of devices from the list of authenticated devices
AT + mrad Request the most recently used authenticated device
AT + state Request the current state of the device
AT + init Initialize the SPP profile (search)
AT + inq Request the closest discoverable device
AT + inqc Cancel the search for discoverable devices
AT + pair Pair with the device
AT + link Connect to a remote device
AT + disc Disconnect from a remote device
AT + ensniff Enter power saving mode
AT + exsniff Exit power saving mode

The idea was to turn an LED on and off via a serial command from the smartphone. What app did you use to control the module? Thanks.