Himself for a few days of bluetooth, over and over again is bad, make you feel no problem, but should just didn't notice there is a detail, baidu also checked a lot, always can not find what is wrong, worship bosses to teach it,
CodePudding user response:
You are using bluetooth module by stm32 UART to control, or use stm32 + bluetooth module rf chip oneself do?
CodePudding user response:
reference 1st floor Lenged_Zhao response: you are using a bluetooth module by stm32 UART to control, or use stm32 + bluetooth module rf chip oneself do? Through the bluetooth module with serial port control, CodePudding user response:
reference 1st floor Lenged_Zhao response: you are using a bluetooth module by stm32 UART to control, or use stm32 + bluetooth module rf chip oneself do? With bluetooth module by 32 serial port control of CodePudding user response:
reference xin139 reply: 3/f Quote: refer to 1st floor Lenged_Zhao response: you are using a bluetooth module by stm32 UART to control, or use stm32 + bluetooth module rf chip oneself do? With bluetooth module by 32 serial port control of Sent you a wrong, CodePudding user response:
refer to the original poster xin139 response: to get for a few days of bluetooth, over and over again is bad, make you feel no problem, but should just didn't notice there is a detail, baidu also checked a lot, always can not find what is wrong, bosses, to teach the worship Bluetooth=MCU + + serial port the AT command + bluetooth module CodePudding user response:
reference 5 floor worldy reply: Quote: refer to the original poster xin139 response: to get for a few days of bluetooth, over and over again is bad, make you feel no problem, but should just didn't notice there is a detail, baidu also checked a lot, always can not find what is wrong, bosses, to teach the worship Bluetooth=MCU + + serial port the AT command + bluetooth module To add a contact, I have got fast self-closing, CodePudding user response:
Phenomenon, through the AT command can control the bluetooth serial port assistant, the APP can connect bluetooth? CodePudding user response:
refer to 7th floor poetryTang response: what phenomenon, through the AT command can control the bluetooth serial port assistant, the APP can connect bluetooth? The two can be, CodePudding user response:
refer to 7th floor poetryTang response: what phenomenon, through the AT command can control the bluetooth serial port assistant, the APP can connect bluetooth? Is the phone connected to the bluetooth, mobile phones can receive single-chip computer, the problem is not to go out, CodePudding user response:
refer to 7th floor poetryTang response: what phenomenon, through the AT command can control the bluetooth serial port assistant, the APP can connect bluetooth? Can be sent and received is garbled CodePudding user response:
You are using bluetooth module by stm32 UART to control, or use stm32 + bluetooth module rf chip oneself do? CodePudding user response:
Bluetooth serial port serial assistants, bluetooth mobile phone connection, set the baud rate, select hexadecimal format, this text try CodePudding user response:
MTU have maximum and minimum limits, you frame a few bytes CodePudding user response:
Can send, also can receive, but this is the hex, a serial port to accept is not a character, I have half a day will not destroy the light of a lamp control, CodePudding user response:
On the 14th floor xin139 reference response: can send, also can receive, but this is the hex, a serial port to accept is not a character, I have half a day will not destroy the light of a lamp control, Don't think about what hexadecimal characters You take everything as a "number" Pipe it hexadecimal, its character, its ASCII, pipe it GB or BIG5, they are few CodePudding user response:
reference 15 floor dceacho response: Quote: refer to the 14 floor xin139 response: can send, also can receive, but this is the hex, a serial port to accept is not a character, I have half a day will not destroy the light of a lamp control, Don't think about what hexadecimal characters You take everything as a "number" Pipe it hexadecimal, its character, its ASCII, pipe it GB or BIG5, they are few I am the Res to receive single-chip microcomputer serial port received message, Res char is defined, then the next statement is to make him into a void function, the parameter is defined char, function is if it is a little lights, is b let small lights, cell phone side display can receive and send, but small lights have no reaction, CodePudding user response:
The refer to 12 floor poetryTang reply: bluetooth serial port serial assistants, bluetooth mobile phone connection, set the baud rate, select hexadecimal format, this text try Can be sent, it is can not control a small lamp light out CodePudding user response:
reference 13 floor forget345 reply: MTU have maximum and minimum limit, you frame a few bytes A frame is a 32 bit? CodePudding user response:
Now that you can send and receive, on-line debugging, monitoring the stm32 received exactly CodePudding user response:
Can send the data, you should be able to control small lamp light out? Don't know what is your little lamp control logic, says a common practice, If the stm32 a pin control small lights, you can set an instruction, when the stm32 through bluetooth after receiving the instruction, to execute the light small light of operation, the need to write program implementation, If it is already a program module, you need to understand what is the communication protocol between them, and then in accordance with the agreement to send control little lights out instructions CodePudding user response:
Suppose you want to destroy the light of small lights, write their own program can define your own control protocol, such as bluetooth module sends: 0 xfe 0 xfe 0 xfe 0 xfe 0 x03 0 x01 to open small lights instructions Bluetooth module sends: 0 xfe 0 xfe 0 xfe 0 xfe 0 x03 0 x00 instruction for down lights, So when STM32 received the bluetooth module sending instructions, go to identifying why instruction, and then destroy the light of to control small lights