Hello Dialog !
我们尝试根据DSP实施项目。我们已将(DA14580 DK基本板)与DSPS主机示例(版本v_5.150.2)闪烁,我们希望通过UART(TX / RX)获取ScanD设备的名称
We have implement a custom board with Da 14580 that is boots from Spi flash and uses HW flow controll for low battery consumption
它具有正常工作的DSP设备示例。它是广告他的设备名称一切正常。
1) How I can see the scand device's?
Is it possible to use tera term to see if actually scanning for nearby advertising devices from the DSPS HOST example?
2) Does the DSPS HOST example Also advertising his device name ? Because I have used the Dialogues DSPS android App and I can't detect anything when pressed the scan button.
提前谢谢。
Marios
Device:
Hi Marios,
Many thanks for your question online. The sps_host project configures the DA14580 as a Central, so the device will not advertise. Please check user_callback_config.h and you will see that .default_operation_adv = NULL in sps_host project. In sps_device project, in the same header file, you will see .default_operation_adv = default_advertise_operation.
To do so, if you would like to connect with the Dialog DSPS android App, you should use the sps_device project in the DA14580. Keep in mind that the mobile application will be the Central, and the DA14580 running the sps_device will be the Peripheral.
Regarding your first question, can you please clarify it? The application on the central device (sps_host) automatically starts scanning and connects to the first discovered peripheral device(sps_device) supporting the serial port service. The Central device also handles situations of connection loss by stopping the flow of data and automatically trying to re-establish a connection.
谢谢,PM_DIALOG.
Hello PM_Dialog !
Thanks for your quick reply !!
I have checked the user_callback_config.h on dsps host and dsps Device project and you have right.
我们需要设置扫描的中央继续扫描外围设备,但我们不想与任何一个连接。
only scan for advertising devices.
can we get that continues scanning device list thought UART ?
If i use tera term can i see the scanning on terminal ?
提前致谢,
Marios
Hi Marios,
The Scanning procedure has a timeout that is about 8 to 10 seconds, so in order to keep on scanning you will have to send a new scan command when the scan_complete callback is invoked. Every time that you get an indication that you have an advertising message you can just print the data. The DSPS application implements the arch_prinf() function in the user_on_adv_report_ind() as long as you have defined the CFG_PRINTF definition in the da1458x_config_basic.h
谢谢,PM_DIALOG.
Hello PM_Dialogue !
Thanks for your quik reply !
We have one mobile phone and two da 14580 divices.
The mobile phone connects to the first Da14580 sends data and then transit it on the second da14580 and do our processes in the external processor.
哪个计划必须用来实现这一目标?
第二设备已在运行DSP(SPS_DEVICE)项目。
Which program have to use on the first device ?
提前致谢,
Marios
Hi Marios,
The BLE connection is always initiated by the Central device ( mobile phone in your case). The first device could run the DSPS application too. So, the mobile phone will connect to the first device running the DSPS (GAP peripheral) and sends the data over the SPS profile. Then, you should disconnect from the first and connect to the second one. Keep in mind that since both are running the DSPS you might change the BD Address and the Device name.
谢谢,PM_DIALOG.
Hello PM_Dialogue
We need after the data has been transferred through mobile phone to the first device. The first device must be connect to the second device and transmit the data.
两个设备使用不同的蓝牙地址和名称运行(SPS设备)
How to implement that ?
提前致谢,
Marios
Hi Marios,
Since it is connected to the mobile (GAP Central), the Device_1 should run the sps_device firmware, so it is configured a GAP Peripheral.
So, after the Device_1 completes the data transition, it should be disconnected from the mobile phone. You could use the mobile phone to disconnect is as well.
Now, the requirement is to Device_1 with the Device_2. To do so, the Device_2, should be configured as GAP Central. The DSPS includes a project namely sps_host, which configures the DSPS to GAP Central.
According to the user manual, the application on the central device automatically starts scanning and connects to the first discovered peripheral device supporting the serial port service. The Central device also handles situations of connection loss by stopping the flow of data and automatically trying to re-establish a connection
谢谢,PM_DIALOG.
Hello PM_Dialog!
Thanks for your quick reply !
我刚刚用(sps_device)和device_2与(sps_host)闪烁了Device_1。
The data from the mobile phone is successfully transmit to Device_1 and mobile device disconnects after the data has transmit, but its dosen't seems that the Device_2 to be able to connect with Device_1 to get the data.
我已经向您发送了Device_1和Device_2配置设置以获得更好的理解。
I will wait for your reply
Thanks in Advance,
Marios
嗨Marios,可以检查Device_1是否在断开连接后开始广告?设备_2启动扫描过程?您可以使用SS Tollbox的电源分布程序来验证。
Please do a quick test : In the Device_1 run the sps_device and in the Device_2 run the sps_host as provided by Dialog. Does this work? Can the Device_2 connect to the Device_1? Thanks, PM_Dialog
Hello PM_Dialog!
感谢您的快速回复!
Yes Device_1 Starts again to advertise after disconection.
Do you have any waveform of the advertising of sps_Host ?
To compare with ours waveform.
SPS_HOST似乎开始扫描,但我如何弄清楚
If it's connects with Device_1 ?
Thanks so much for you help
提前致谢,
Marios
Hi Marios,
The sps_host configures the device to GAP Central role, so it will start scanning.
My apologies that I am not able to replicate this.
I am using DSPS without any modification and as provided by Dialog.
运行SPS_DEVICE的设备_1启动广告 - 请参阅SPS_DEVICE_ADV.PNG。
The Device_2 that is running the sps_host starts scanning - see sps_host_scan.PNG.
如我以前的回复中所述,中央设备(SPS_HOST)上的应用程序会自动启动扫描并连接到支持串行端口服务的第一个发现的外围设备(SPS_DEVICE)。因此,Device_2自动连接到Device_2。请参阅sps_device_connected.png和sps_host_connected.png。
我建议使用sps_host和sps_device而没有任何修改,这样您就可以验证相同的功能。
谢谢,PM_DIALOG.
Hello PM_Dialog!
是的,我在device_2(sps_host)上具有与您相同的波形,但似乎无法与我拥有的任何SPS设备连接。
我在扩展睡眠模式下具有硬件流量控制的Device_2(SPS_HOST),因为我希望它与电池一起运行。
with CTS and RTS controled by external microcontroller and communicates with uart.
The Device 1 (Sps_Devise) is on SW flow control and normal battery profile and also microcontroller and UART communication.
提前致谢,
Marios
Hi Marios,
您是否使用DSPS项目,如对话框提供的?您是否对SPS_HOST或SPS_DEVICE应用程序代码进行了任何修改?是否有可能提供嗅探器日志,以便我能够理解空中发生的事情?
您能否检查您是否在SPS_HOSE Side - User_Ond_Adv_Report_ind()中获取广告报告?
谢谢,PM_DIALOG.
PM_DIALOG!
Thanks for your quick reply !
After the mobile device has make the data transfer to the
Device_1 the microcontroller handles the data in its buffer,then sends this data on the Da14580 to the Device_2 through UART
我们阅读以下说明书的过程:
an-b-026_da14580_external_wake-up_mechanisms_v1_0
1) How the Device_1 connect with specific Device_2 also DA14580 both devices runs DSPS project
提前致谢,
Marios
Hello PM_Dialog!
We have set up Device_1 to run (DSPS_HOST) and our external microcontroller sends data to DA14580 via UART
Device 1 (SPS_Host)connects to Device 2 (SPS device) successfully but it doesn't transmit any data to the other side.
Which mode have to set up on Host side to transfer data ?
Auto ?
Direct connection ?
给我们一些方向如何成功完成
Please help us we have spend thousands of euros to develop on Dialog DA14580 platform.
We are the biggest manufacturers in Greece with full automated production line.
提前致谢,
Marios
Hi Marios,
当运行sps_1运行sps_1的连接不是问题,将连接请求发送到运行sps_device的设备_2,并且可以成功设置连接。
Can you please probe the UART signals?
如果DA14580配置在任何睡眠模式中,那么应该使用硬件流控制。一旦数据在UART上,那么SPS_HOST应该将它们传输到对等设备。
So, please also check the UART signal and the UART configuration in user_periph_setup.c / .h files.
What are the UART signal that are using in the application code and in your custom board?
谢谢,PM_DIALOG.
Hello PM_Dialog !
Thanks for your quick reply !
We have successfully transmitted data on the other side !
1) We want the (Sps_Host) to start connection mode only when we have data on the flow control ?
必须制作哪些设置以实现这一目标?
2) we want also (sps_Host) to advertise and be conectable after it's receives data then have to make a connection to (Sps_Device) and transmit data.
提前致谢,
Marios
Hi Marios,
Could you please clarify your questions?
如我之前的评论中所述,SPS_Host将DA14580配置为GAP角色中心。中央设备可以宣传 - 它只能开始扫描。
谢谢,PM_Dialof.
Hello PM_Dialog !
感谢您的快速回复!
1)我们希望(sp_Host)开始扫描只有当我t's receives data on its UART port from our external microcontroller. After data ends have to desconect from sps_device.
2) sps_Host only have to scan and pair with predefined Sps_Device and not to pair with the first discovered device because we have thousands of da14580 that advertising on the same time and place.
提前致谢,
Marios
Hi Marios,
DSP应用程序不支持这两个要求。按照对话框提供的支持DSP。因此,在此情况下,您必须修改DSPS应用程序代码 - 没有任何特定的配置。
谢谢,PM_DIALOG.
Hello PM_Dialog!
Thanks you for your quick reply !
I have just seen that on user_confing.h
/// Scan response data
#define USER_ADVERTISE_SCAN_RESPONSE_DATA ""
i haven't set anything on that define
如果我设置SPS_DEVICE广告名称,SPS_HOST将仅与该特定设备连接?
Please corect me if i have done somthing wrong,
1) On user_confing.h
/// Device name to be placed in advertising or scan response data
#define USER_DEVICE_NAME "DIALOG-SPS" //Here we set the sps_Host advertise name.
static const struct gapm_configuration user_gapm_conf = {
/// Device Role: Central, Peripheral, Observer or Broadcaster
。role = GAP_CENTRAL_MST,
/**************************************************************************************
*Peer device information, only for:
*
*- GAPM_CONNECTION_AUTO
*- GAPM_CONNECTION_SELECTIVE
*
*White list with peer addresses and the respective peer address type
**************************************************************************************
* /
/// BD Address of device
.peer_addr_0 = {0 x00 0 x00 0 x00, 0xCA, 0xEA, 0x23}, // Here we set the Bluetooth adress of the Sps_Device that we want SPS_Host to conect with it.
/// Address type of the device 0=public/1=private random
.peer_addr_0_type = 0,
Config_advanced.h
#define CFG_NVDS_TAG_BD_ADDRESS {0x00, 0x00, 0x00, 0xCA, 0xEA, 0x80} //SPS_Host Bluetooth adress
user_sps_host.h
/**
****************************************************************************************
* @brief处理广告报告
*@param[in] param Parameters of disconnect message
*@return void
****************************************************************************************
* /
void user_on_adv_report_ind(struct gapm_adv_report_ind const * param)
{
// if(!memcmp(¶m->report.data[3], USER_ADVERTISE_DATA, USER_ADVERTISE_DATA_LEN))
{
arch_printf("Connect with %02x %02x %02x %02x %02x %02x",
param->report.adv_addr.addr[5],
param->report.adv_addr.addr[4],
param-> eport.adddr.addr [3],
param-> eport.adddr.addr [2],
param->report.adv_addr.addr[1],
param->report.adv_addr.addr[0]);
app_easy_gap_start_connection_to_set(param->report.adv_addr_type, (uint8_t *)¶m->report.adv_addr.addr, MS_TO_DOUBLESLOTS(USER_CON_INTV));
user_gapm_cancel();
}
}
提前致谢,
Marios