1
\$\begingroup\$

I have worked on many Arduino projects but this time I am facing some hurdle that is too strong for me.

I want to use a Bluetooth module as a MASTER. Purpose: Connecting to a camera and sending instructions to take photos.

Problem: When trying to connect, the camera prompts a security key which you can type on a smartphone. Problem: I didn't find ANY way of doing this with an Arduino.

The closest I was is using AT commands to set the same passkey as the other device. Problem: it has to be done before the connection attempt, and in my case, the passkey could not be guessed…

Therefore I'm as stuck as frustrated!

I have various BT chips on hand : HC-05 HC-08 MLT BT05… so various solutions available. Will buy other ones if needed.

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

not sure if you have figured it out or given up, but I recently used a HC-05 module as master to receive data from a GlobalSat bt-338, I think this is a similar process to what you want to do. I also had some headache. I'm not sure if it will help but here is some advice.

First, make sure that that the settings are right on the HC-05. Put it in AT command mode. Do this by drawing the EN pin high and holding the button on the board before powering the board(or drawing pin 34 HIGH if there is no button). Once in AT command mode the red LED will blink slower. Make sure to set the HC-05(master) password and baud rate the same of the cameras BT(slave). find the address of the slave device.

Then do the following at commands: AT

AT+RMAAD //clears paired devices

AT+ROLE=1 //sets it as master

AT+RESET //resets the module

AT+PSWD="password"//sets the name of your password(must be same as slaves password)

AT+UART=baud rate//set equal to slave's baud rate

AT+CMODE=0//sets to connect to a fixed address

AT+INQM=0,5,9//inquiry mode standard, number of devices, timeout

AT+INIT//initiates spp profile

AT+INQ//returns available device's address, class, and signal strength

AT+PAIR=xxxx,xx,xxxxxx,9//devices(slave) address is separated by commas like such and 9 seconds is the timeout ex:AT+PAIR=3014,10,171179,9

AT+BIND=xxxx,xx,xxxxxx// device's(slave) address ex:AT+BIND=3014,10,171179

AT+CMODE=1//sets it to connect with paired devices

AT+LINK=xxxx,xx,xxxxxx//device's(slaves) address, links the devices ex:AT+LINK=3014,10,171179

once connected the led should blink quickly every 2ish seconds

once linked, you can use the arduino to send data to the HC-05 using pins 9 and 10 with SoftwareSerial.

I hope this is helpful and feel free to ask anymore questions.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.