2163 views|5 replies

3

Posts

0

Resources
The OP
 

BlueNrg-1 and Raspberry Pi communication abnormality [Copy link]

 BlueNrg-1 is used as a slave device, and Raspberry Pi is used as a master device. Raspberry Pi can successfully connect to BlueNrg-1 device. BlueNrg-1 can correctly receive the data sent by Raspberry Pi, but Raspberry Pi cannot receive the data sent by BlueNrg-1. Air packet capture situation: Raspberry Pi --> BlueNrg-1, packet capture is successful; BlueNrg-1 --> Raspberry Pi, no packet is captured. Single-step BlueNrg-1 device, the API return of executing the data sending is error-free, but it feels like the radio frequency is not turned on. If the master device is replaced with a smartphone, it can communicate with the BlueNrg-1 device and both sending and receiving are normal. I checked the initialization configuration of the master and slave devices and found no abnormalities. Has anyone in the forum encountered a similar situation?

This post is from ST - Low Power RF

Latest reply

The main OP wants to check whether the CCC is written successfully on the Raspberry Pi.  Details Published on 2019-1-18 23:12
 
 

9702

Posts

24

Resources
2
 
Which function returned an error? What are the return values when using a mobile phone and a Raspberry Pi? What are the differences in the parameters passed when using a mobile phone and a Raspberry Pi?
This post is from ST - Low Power RF
Personal signature虾扯蛋,蛋扯虾,虾扯蛋扯虾
 
 
 

3

Posts

0

Resources
3
 
littleshrimp posted on 2019-1-16 15:04 Which function returned an error? What are the return values when using a mobile phone and a Raspberry Pi? What are the parameters passed when using a mobile phone and a Raspberry Pi...
When debugging BlueNrg-1 step by step, no error is prompted. The status returned by the send and receive api calls is success. The connection between the mobile phone and the Raspberry Pi and the return status of sending data is success; However, when receiving data, the Raspberry Pi did not trigger the receive callback. I am not responsible for the programs on the mobile phone and the Raspberry Pi. I am responsible for the development of the slave BlueNrg-1. blueNrg configures the Public address as follows: aci_hal_write_config_data(CONFIG_DATA_PUBADDR_OFFSET, CONFIG_DATA_PUBADDR_LEN, bleStatus.paddr); After the mobile phone and Raspberry Pi are successfully connected, BlueNrg-1 will trigger the following callback, void hci_le_connection_complete_event(uint8_t Status, uint16_t Connection_Handle, uint8_t Role, uint8_t Peer_Address_Type, uint8_t Peer_Address[6], uint16_t Conn_Interval, uint16_t Conn_Latency, uint16_t Supervision_Timeout, uint8_t Master_Clock_Accuracy) After comparing the parameters transferred by the two, the value of Peer_Address_Type is different. I am not familiar with the protocol. I checked online and found that the value of Peer_Address_Type is 0 or 1. However, no matter whether the host is a mobile phone or a Raspberry Pi, the Peer_Address_Type value obtained by blueNrg is neither 0 nor 1. In addition, I reported the situation to the original manufacturer of ST, and they said they could help us test and locate the problem. I will update the post if there is further news.
This post is from ST - Low Power RF

Comments

OK  Details Published on 2019-1-17 19:11
 
 
 

9702

Posts

24

Resources
4
 
cajlib posted on 2019-1-17 18:35 Single-step debugging BlueNrg-1, no error prompt. The status returned by the send and receive API calls is successful. The phone and Raspberry Pi connect and send data...
OK
This post is from ST - Low Power RF
 
 
 

51

Posts

0

Resources
5
 
The main OP wants to check whether the CCC is written successfully on the Raspberry Pi.
This post is from ST - Low Power RF
 
 
 

3

Posts

0

Resources
6
 
Thanks to lucienkuang, the problem is that the host has not turned on CCC. If the slave wants to send data normally when using the notify function, it needs to ensure that CCC is turned on. It is generally recommended to turn it on by the host, first obtain the CCC characteristic value handle, and use this handle to write two bytes {0x01, 0x00} to the CCC characteristic value.
This post is from ST - Low Power RF
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list