Arbitrary data transmission from PC to da14580

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
Kaito
Offline
Last seen:3 years 8 months ago
加入:2017-05-09 10:51
Arbitrary data transmission from PC to da14580

Hi Dialog
I am now using the dsps project.
I am modifying the sample program.
I want to send specific character string data from PC to da14580, and check whether the data can be transmitted using wireless application.

Q1.Is there a sampler code that sends specific character string data?
Q2.I think that my image stores character string data in the buffer and transmits the data as wireless data,
Is my thinking correct?

Thank you Dialog Team

Device:
MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi Kaito,

Hi Kaito,

Q1: There is no sampler program provided by dialog, you can hook up a terminal on your PC and start sending data from the connected end, periodically.

Q2: You mean about the DSPS functionallity ? It gets the data from the UART stores the data in a buffer and when there's a connection event the data are send to the other side of the connection.

Thanks MT_dialog

Kaito
Offline
Last seen:3 years 8 months ago
加入:2017-05-09 10:51
Hi Dialog

Hi Dialog
Thank you for your answer

I want to transfer from typeZY to PC(MAC)
when i check whether the data is transfering or not in the PC(MAC), i use app called LightBlue
but i can't transfer the data from typeZY to PC(MAC)
where i modify the code?
i modify it as below

void user_ble_pull (bool init, bool success)
{
bool send_flow_on = false;
static bool tx_busy_flag = false;
static uint8_t rounds_waiting=0;
静态uint16_t长度;

if (init)
{
if(!tx_busy_flag)
{
if((length = user_buffer_item_count(&periph_to_ble_buffer)) > 0)
if (length > TX_WAIT_LEVEL || (rounds_waiting++) >= TX_WAIT_ROUNDS)
{
//uint8_t *p_data = NULL;
uint8_t *p_data = "BLE_TEST";
长度= 10;

rounds_waiting = 0;
tx_busy_flag = true;

length = (length > TX_SIZE ? TX_SIZE : length);
length = (length < TX_START_FRAME_DATA_SIZE ? length : (((length - TX_START_FRAME_DATA_SIZE) / TX_CONTINUE_FRAME_DATA_SIZE) * TX_CONTINUE_FRAME_DATA_SIZE + TX_START_FRAME_DATA_SIZE));
length = user_buffer_read_address(&periph_to_ble_buffer, &p_data, TX_SIZE);
user_send_ble_data(p_data, length);
//user_send_ble_data("DSPS_HOST", 10);
//user_send_ble_data("DSPS_PULLDATA", 20, conidx);

}
}
}
else
{
tx_busy_flag = false;
if (success)
user_buffer_release_items(&periph_to_ble_buffer, length);

if((length = user_buffer_item_count(&periph_to_ble_buffer)) > TX_WAIT_LEVEL)
{
// uint8_t *p_data = NULL;
uint8_t *p_data = "BLE_TEST";
长度= 10;
rounds_waiting = 0;
tx_busy_flag = true;

length = (length > TX_SIZE ? TX_SIZE : length);
length = (((length - TX_START_FRAME_DATA_SIZE) / TX_CONTINUE_FRAME_DATA_SIZE) * TX_CONTINUE_FRAME_DATA_SIZE + TX_START_FRAME_DATA_SIZE);
length = user_buffer_read_address(&periph_to_ble_buffer, &p_data, TX_SIZE);
user_send_ble_data(p_data, length);
//user_send_ble_data("DSPS_PULLDATA", 20, conidx);
//user_send_ble_data("DSPS_HOST", 10);
}
}
/ /检查缓冲区是否most empty and send XON if neccesary
send_flow_on = user_check_buffer_almost_empty(&periph_to_ble_buffer);

//if XON should be send, make sure it's send as soon as possible
if(send_flow_on)
{
uart_sps_flow_on();
}
}

I wanted to specify the character data contained in pdata and want to display the character data on the application

the project's name is sps_device.

Thank you Dialog

MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi Kaito,

Hi Kaito,

如果使用通用BLE应用程序并且已正确配置设备并且您已启用通知,则您可能能够操作DSP,并查看手机上更新的特性,但我会建议使用DSPS Android / IOS应用程序由于当连接两个设备时,中央也会发送写请求,以便为外围设备上的流控制设置相应的特性,因此我建议使用该应用而不是通用应用程序。此外,如果您想向PC的应用发送一些静态数据,我建议使用计时器并使用user_send_ble_data()函数推送数据。

Thanks MT_dialog

Kaito
Offline
Last seen:3 years 8 months ago
加入:2017-05-09 10:51
Hello dialog.

Hello dialog.
thank you for your reply.
Now I am doing data transmission using an application called iphone 's DSPS in the program I showed last time.
However, I am transmitting the character string "BLE_TEST" from the PC via BT, but I can not confirm the data.
i
i can send data from iphone to teraterm on PC.

How can I send data from PC to iphone?
I am worrying about my failure, so please teach me.

Attachment:
MT_dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2015-06-08 11:34
Hi Kaito,

Hi Kaito,

If i understand the problem correctly, you are not able to see data transmitted from the PC to your phone, if that is the case check the terminal that you are using and make sure that you have the proper baudrate and if you have properly configured the hw flow control (on the terminal) and also at the side of the dev kit. Have you followed the UM-B-038 da14580 Serial Port Service Reference application ? and have you applied the proper wiring in order for the hw flow control to work ?.

Thanks MT_dialog