Skip to content

Transferring 512 byte packets of data #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mattleesmi opened this issue Apr 20, 2020 · 6 comments
Closed

Transferring 512 byte packets of data #70

mattleesmi opened this issue Apr 20, 2020 · 6 comments
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@mattleesmi
Copy link

mattleesmi commented Apr 20, 2020

Hello,

A colleague and I have been working on a research project that uses the Nano 33 BLE Senses and IoTs. As part of this project, we need to transfer data logs between SD cards (BLE Sense to IoT) over Bluetooth. We have managed to get transfer working well however we noticed that packets over 246 bytes (approximately) become "garbled" beyond/around the 246th byte.

What is curious is that if the message is received by a smartphone (from the Sense) the full 512 bytes are received correctly, whereas the IoT receives a garbled message. I have attached an example of the message error.
Garbled_Message.txt

My colleague traced the issue to the function:
void HCIClass::handleAclDataPkt(uint8_t /*plen*/, uint8_t pdata[])

However, he informed me that he could not go any deeper as he can't access the firmware. When he tested it he used a raspberry pi to transmit a 512 packet which was unsuccessfully collected by the IoT.

What might be the cause of this? Please let me know if you require more information, if needed I will try to portion out the code we are permitted to upload.

Thank you for your time.
Matt

@gsp8181
Copy link

gsp8181 commented Apr 23, 2020

The firmware is located here https://github.com/arduino/nina-fw

@facchinm
Copy link
Contributor

facchinm commented Jul 2, 2020

May be related to this (#73) and work by a chance in 33BLE ?
@mattleesmi it might be worth to try the patch in the issue I linked and report back, thanks.

@facchinm facchinm added the status: waiting for information More information must be provided before work can proceed label Jul 2, 2020
@polldo
Copy link
Contributor

polldo commented Oct 26, 2020

Hi @mattleesmi .
Here the problem is that the BLE controller of the nano33ble has a MTU of 247. So you cannot receive/transmit more than that in a single packet. In order to receive all the 512 bytes, you should split them in more packets.

@JAICHANGPARK
Copy link

Hi All
How to set mtu this arduino ble library?

@polldo
Copy link
Contributor

polldo commented May 26, 2021

Hi @JAICHANGPARK ,
there is currently no API to set the MTU. You may create a new issue to request this enhancement.
However, you can try to set the MTU of the connection from another device (if the other device can perform the request: for example you can try this by using the nordic nrf app for smartphones)

@per1234 per1234 added conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project and removed status: waiting for information More information must be provided before work can proceed labels Dec 17, 2021
@gb88
Copy link

gb88 commented Jan 26, 2023

I create the api to set the MTU, https://github.com/gb88/ArduinoBLE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

7 participants