I have a PAN1740. I would like to send data from my bluetooth to some applicaion on PC. Are there any applications that detect and collects the data from my Bluetooth?. Thank you.
Can you please clarify which is your requirement? If I am able to understand correctly, that you want to accomplish it to connect directly the DA14585 directly to the Bluetooth of your PC?
Yes. I would like to connect my DA14580 to PC and then I should able to send some data from BLE to PC application. Is there any PC application done from Dialog side?.
Is there any code example?.
I can connect / pair the BLE with ble_app_security project. Further I need to have some data transfer to PC. Please share some information how can I acheive this.
You could use the CodeLess reference application design and sending AT commands from / your PC. However, you will need double DA14580s. Please read the user manual:
It seems I should have Po-kit or basic kit from dialog to use the codeless. That is not possible for my project.
I have BLE mounted on my custom board. The serial pins of BLE are connected to MSP controller of my custom board. The serial data input is given from my MSP controller to BLE.
BLE should send the data to PC. This is my requirement.
Im able to connect the BLE with PC with the project ble_app_security.
I have Bluetooth LE LAB software installed in my windows10 PC. In this application Im able to see the BLE information. Please see the pictures.
As far as I know there isn’t any PC application for this functionality.
OK. I am using Bluetooth LE Lab application from windows to test the BLE. In this application I could see the Services used.
When I run the ble_app_peripheral project, I could able to connect to the cleint( PC). And also I could see device information service and an unkown service. Im able to read all characters. Please see above attached screenshots to see the app.
Now, I am looking to develop a new custom service which should read data from serial pins(Rx,Tx) continously.
Is there any tutorial or example how can we create a new custome service which reads the serial data?.
Also a question unclear for me is that the Codeless is only for dialog kits or can I use in my custom board?.
CodeLess can be used with any DA1458x based projects.
Can toy please clarify this question?
“Is there any tutorial or example how can we create a new custome service which reads the serial data?.”
simply i can say
Is there any tutorial or example how can we create a new custome service?.
Please take a look at the following documents:
AN-B-029 : Tutorial - Developing a custom profile on DA1458x
Tutorial 2 : Adding Characteristics - Custom Proflle Creation
Thank you. I have a third party controller connected to serial pins of BLE. That third party contoller send some seial data to BLE. Can I send that serial data using a custom profile ?.
Yes you can receive the data and send them to a peer BLE device using the notifications/indications.
can you please provide with a example code or user guide or something .
I dont know whether you understnad or not.
I use only one BLE. This BLE serial pins are connected to a MSP controller. BLE receives the data. I should send that data to a client. Here cleint is a PC. The bluetooth in PC will be switched on and its get connected with our BLE.
I want to see that data on PC.
Sorry for the confusion - I misunderstood your question. Yes, you can receive data and transmit them over the air, but we don’t have any application from the PC side. We have an example for sending data over a BLE connection, but the central is a mobile phone. Please check the ble_app_peripheral example of the SDK. This example uses the notifications for sending data onto a mobile phone.
Do you know any application where I can make communication with BLE like DSPS on windows?. Simply I can say windows counterpart of DSPS? Could be from others providers?.
I am beginner to BLE development. I am able to take data from external controller and give to BLE and BLE could send to android app. Now Im looking to replace android app by windows application.
First I should find some windows application and then modify the ble_app_peripheral code or device_sps code to have communication.
Is there any tutorial how to change device_sps code to other application?.
Could you please suggest how can I go ahead step by step.
My ideas is:
1. To find some windows app.
2. Modify the device_sps or ble_app_peripheral code.
or is there any other approach.
Here Im using my custom board which has MSP controller and it is seriallay connected to DA14580. Thank you.
Do you know any application where I can make communication with BLE like DSPS on windows?
There isn’t any PC application like the Mobile DSPS application. We haven’t tried to connect the DSPS with the PC. Dialog provided a DSPS mobile application. Please refer to the user manual for more information.
Can you please clarify this question: “Is there any tutorial how to change device_sps code to other application?.”
A possible approach would be to have two DA14580s running the DSPS or the CodeLess. The one of them will be connected with your PC.
You mentioned "The one of them will be connected with your PC". How? can you explain this?.
You will have two DA14580 boards. One of them will be connected with you PC via an USB cable. In your PC side you could have a serial monitor in order to print the received data. The other boards will be transmitting data to the connected boards with you PC. One of them should be the master and the other the peripheral. But again, we don’t have any application in the PC side.
Ok. This sounds good. Can you tell me a example project which has code for Master and Peripheral. In the SDK I see in ble_exampls folder I see all different projects.
For example my BLE which is connected in my hardware is consider as peripheral and the BLE which is connected to PC is central device.
if the peripheral is runnibg a ble_app_peripheral project and which project should run at central device?. Or which project is suiable for my application?.
Is my concept is right?.
The SDK doesn’t support a project configuring the device as a Central. You should configure it by your self or I can provide you guidelines to achieve it. I would suggest you to start with CodeLess reference application project and sending AT commands to configure it as a Central device. Also, you can use it the DSPS project.
Thank you. I have tried it.
I would suggest you to start with CodeLess reference application project and sending AT commands to configure it as a Central device.
I have used CodeLess and configured the central device. And I am able to connect the peripheral with central device. I have just follwed the steps mentioned at CodeLess examples.
The peripheral is running DSPS project on it. This peripheral serial pins (P0.4 and P0.5) and connected with a controller. The data from the peripheral serial pins can be printed on serial terminal?.
I do not see the data on serial terminal. Normally it is working on android app. I see the baudrate while configuring the central device on serial terminal is 57600 although the baudrate in DSPS project is 115200. Is this OK?.
What shall I do to print the data from peripheral to serial terminal through AT Commands?.
Is my assumption correct? How you are sending data? In the Central side, you could use the sps_host project which is the Central DSPS configuration.
Please try to run only the DSPS application like follow.
The application on the central device automatically starts scanning and connects to the first discovered peripheral device supporting the serial port service.
Can you please indicate if both the peripheral and central should be connected with PC via a USB cable? Or only the Central should be connected? If yes, you should send data throght notification from the Peripheral to the Central and the Central will print them into the Serial Monitor.
Also, which board are you using? Any of our development boards or you have a custom board?
Is my assumption correct?
How you are sending data?
I have a custom board with MSP controller. This custom board also has DA14580 mounted. The serial pins of DA14580 are connected to MSP controller. Initially I have written a simple code for MSP controller. This code prints data to serial monitor. and those serial pins are connected to DA14580 serial pins. When I execute DSPS application. I could see data from MSP controller in android app. Now I want to put that same data to serial monitor.
Can you please indicate if both the peripheral and central should be connected with PC via a USB cable? Or only the Central should be connected?
Only central is connected with PC via USB. Basically my central device is PAN1740 board.
If I run sps_host on central then CodeLess is no more. right?. I will try to follow the above mentioned steps. Thank you.
I did like you mentioned above.
Peripheral is running with sps_device and central is running with sps_host. I do not see the data on serial terminal.
you should send data throght notification from the Peripheral to the Central and the Central will print them into the Serial Monitor.
Can you explain me how to send data through notifications from peripheral to central?. Here only central device is connected to PC via USB not the peripheral.
Regarding you last post and sps_host configuration:
Regarding how you are sending the data, I messed that you are using a MSP controller connected on the UART pins of the peripheral.
Which UART pins are you using?
P0.4 TxD and P0.5 RxD.
Which is the Serial Monitor Configuration? (baud rate etc)
Im using Teraterm and the baudrate is 1152000,data: 8 bit,Parity : none, Stop bits : 1 bit.
Are you using Flow Control? If yes, in which pins are the RTS/CTS ?
I am using Software flow control with MSP controller. In the sps_device I see software flow control default. I did not changed it. However I have connected the RTS and CTS pins to the MSP controller. I am getting data from the controller to BLE. But not from BLE to BLE.
Can you please use a sniffer in order o make sure that the data are transmitted from the peripheral over the air?
I will use. Normally peripheral sends the data succesfully. Because from the same code from peripheral I can see the data in android app. Hence the peripheral side no issues.
Instead of android Im changing to PC.
If you are using the DSP mobile application, are you able to see the data that are you sending?
DSP mobile applcation?. Is ot same sps_device?. Nevertheless I can see the data in android app.
I have also made another test. I have taken two PAN1740 devices. They both are having USB. I have connected them to PC. I put sps_device code to one PAN1740 and host code to another PAN1740. I run them. I have opened two teraterms with respective of theire COM ports. The teraterm belongs to sps_device , there I was typing some data however I did not see any data on other teraterm.
I know both of them are connected,because i do not see the advertisement on other devices when I run host code. That means sps_device and host are connected. Can you pls guide me how to send data from two ble's?. As you mentioned earlier how should I send notifications?.
It is working. I forgot change the SW flow control in host code.
Now Im able to send data from my custom board (peripheral) to central device and then in serial terminal. Thank you.
The one BLE device will run the sps_device application, and it will be the Peripheral. The peripheral DA14580, will be connected with the MSP. This setup is working correctly as you can send data tot the DSPS Mobile application.
The other DA14580 will run the sps_host application, and it will be the Central. Let’s try to make sure that you have the correct setup. When both of the devices are running the SPS application accordingly, the Central will automatically connect to the Peripheral. So the Central can send data to the Peripheral over the air and vice versa. Is that working ? When the Central receives data, the DSPS will push them into UART, so if you have the correct UART setup, you should see them in the Serial Monitor. The sps_host by default is using Hardware Flow UART control.
Just seen your last post. Glad that is working fine. The DSPS has extended sleep configuration by default so HW flow control is need. If you want to have SW flow control you should de-activate the sleep mode. If you find any of the above answers useful, please mark one of them as “accepted”.
Initially I set
const static sleep_state_t app_default_sleep_mode = ARCH_SLEEP_OFF;
Now Im sending data to central device and everything is fine. I would like to know how to send the peripheral to sleep. My aim is to send data for few minutes and send peripheral to sleep mode to save the power.
Can you please tell me how to do that. Thank you.
DSPS supports only extended sleep mode and HW Flow Control (RTS/CTS) . Deep sleep mode is not supported
You could set it in extended sleep mode like follow:
const static sleep_state_t app_default_sleep_mode = ARCH_EXT_SLEEP_ON;
The system will go into extended sleep mode between advertising or connection intervals,