Panasonic PAN1740 (Dialog DA-14580) related question

7 posts / 0 new
Last post
ngchinping
Offline
Last seen:4 years 9 months ago
Joined:2015-07-13 02:32
Panasonic PAN1740 (Dialog DA-14580) related question

Dear Dialog Team,

Good Day.

I would like to request support in getting the following request.

FYI. I am using Panasonic PAN1740 BLE Module & Dialog Development Kit (Pro)

1. I come across a project description namely: Dialog Serial Port Service (DSPS), I would like to request the project sample code as well as the documentation(that explain how DSPS code is written).

2. Using DSPS code, please advice :

- Change the code to use GATT Service: UUID - 0000 FFF0 as TX/RX example
- Add/Modify new characteristic with UUID - 0000 FFF1 as write/read capable, to enable host(eg android phone) write/read into PAN1740.
- For data writing(host into PAN1740), which part of the source code will be sending the write data to the our(end user) application, or some callback function to the our(end user) application.
- For data reading, which part of the source code will be calling our application so that application and pass the data to ble stack to send out , or some callback function to the our application.
- Add/Modify new characteristic with UUID - 0000 FFF2 as read/write capable, to enable write/read just like 0000 FFF1

3. What is the maximum payload for transmission in PAN1740 which base on Dialog DA-14580 BLE Chipset?

4. How can I change connection interval(sleep time between TX)? What is the minimum period of connection interval, in terms of mS?

5. Any sample code to access external flash for user data storage and its corresponding documentation.

6. The PAN1740 Development (Base on DA-14580) did mentioned on the following term, kindly explain in what situation each of the item would be use:
- OTP
- SPI Flash
- EEPROM

期待your guidance & support.

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi ngchinping,

Hi ngchinping,

You can get the source code for the DSPS and the proper documentation for the application explaining the code and functionality from the following linkhttp://support.dialog-semiconductor.com/product/da14580in order to customize further the application and add extra characteristics change UUID on the services etc you can advise the document on the following linkhttp://support.dialog-semiconductor.com/resource/b-029-tutorial-developi...and also you can find examples of the custom profile code on this linkhttp://support.dialog-semiconductor.com/resource/b-029-tutorial-files-su.... The maximum payload depends on the aggreement between the host and the peripheral. The da complies with bluetooth spec so the maximum MTU is the MTU the spec defines. For accessing the external memories you can have a look in the examples at the peripheral_examples project in the SDK and also there are a lot of reference designs that use SPI the beacon for example and the corresponding document. Please have a look at the documentation and the reference designs.

Thanks MT_dialog

tkcheng
Offline
Last seen:5 years 6 months ago
Joined:2015-08-20 13:27
Hi MT_dialog,

Hi MT_dialog,

I am currently working along with ngchinping on the same project. Thank you MT_dialog for your responds.

Apart from that, we would like to know if we can use Keil project to perform software debugging. We discovered when we run PAN1740 in Keil debugging mode (even without breakpoint), the device is not connectable. The device can only connect when we exit debugging mode.

Thank you very much

MT_dialog
Offline
Last seen:2 months 1 week ago
Staff
Joined:2015-06-08 11:34
Hi tkcheng,

Hi tkcheng,

You can not perform software debugging while the device is operating under extended or deep sleep mode. In order to debug all the applications you have to disable sleep from the da14580_config.h file. If the debuging is up while sleep the device stops and gets trapped in a while loop until debbuging is disabled.

Thanks MT_dialog

tkcheng
Offline
Last seen:5 years 6 months ago
Joined:2015-08-20 13:27
HI MT_dialog,

HI MT_dialog,

Thank you very much, now I can perform the debugging.

From the document, it seems that the Read characteristic is perform within the BLE stack, using the variable that is create when characteristic is being created, without intervention from the application (or no appliation function call is being perform). Please let me know if my understanding is correct.

As my application require the device to be able to read a bulk of data (4k-8k) from external memory, and give a subset of the data upon request from the host. Since the total data is very big, it would not be feasible to create this variable array and let Read characteristic to handle the read process. How can I change the code such that this is feasible?

I am thinking to implement a function that will be get called when read characteristic happen, and the function will be able to access the require bulk data, select the require subset of data and send back to host. Please guide me on implement this method.

Lastly, when I try using sample of DSPS, when writing data from host to the device, it seems that the first byte of data is missing from the receiving function. When i send 21 bytes from handphone, gattc_write_cmd_ind_handler()/app_ble_push() function will only received 20bytes, with the first byte being remove.

Thank you very much and appreciated you good support.

Joacimwe
Offline
Last seen:1 year 5 months ago
Guru
Joined:2014-01-14 06:45
You are correct, the Read

You are correct, the Read Characteristic command is performed directly within the BLE stack. It just replies with the value currently stored in the ATT db.

I see three options:
1. Let the master send a write command to you. Upon receiving this command, you initiate your bulk data reading. When you are done, you store the value read into a characteristic and send the write response. When the master receives the write response, it immediately issues a Read request (probably a Read Long Characteristic request to get more data in each transaction (up to 512 bytes)). Increase MTU to get better performance, otherwise it will be very slow.
2. Let the master send a write command to you. Upon receiving this command, you initiate your bulk data reading. As you retrieve your data, you send notifications to the master, up to 20 bytes in each notification. This will be the fastest way since the DA14580 can automatically fit multiple notifications in each connection event, and will be quite simple to implement.
3. Use DSPS which handles everything for you.

Regarding 21 bytes: You can only fit 20 bytes in a standard Write Command unless you have increased the default MTU. If you use a layer on top of GATT (such as DSPS), it should do the segmentation and reassembly for you.

tkcheng
Offline
Last seen:5 years 6 months ago
Joined:2015-08-20 13:27
Hi Joacimwe,

Hi Joacimwe,

I use method 1, working very well.

Thank you very much.

Topic locked