-
Notifications
You must be signed in to change notification settings - Fork 39
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
Fixed a bug when setting the size of the send
's TX_MTU
#256
Conversation
The payload len can be bigger than l2cap mtu, and it will be fragmented and reassembled internally. 27 may be a bit confusing though, it should probably be set to a larger number to not be confused with the l2cap mtu. |
There are basically 3 different MTUs here:
The first two are documented a bit here https://software-dl.ti.com/lprf/simplelink_cc2640r2_sdk/1.35.00.33/exports/docs/ble5stack/ble_user_guide/html/ble-stack/l2cap.html Another source https://community.nxp.com/t5/Wireless-MCU/Bluetooth-LE-Credit-Based-Flow-Control-for-L2CAP-Connection/m-p/437369 Edit: @hicklin fixed some inaccuracies where I mixed up MPS and MTU |
@hicklin Maybe an alternative here would be to increase the PAYLOAD_LEN to some larger arbitrary value like 42? |
@hicklin Just fixed some inaccuracies where I mixed up MPS and MTU in my previous comment |
@hicklin Let's merge this for now then, and sorry for the misunderstanding! |
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a rebase
/test |
The
ch1.send
'sTX_MTU
generic const was set to thePAYLOAD_LEN
which is always going to be wrong as theencode
method adds 4 to 6 bytes at the start of the payload. This has been updated toL2CAP_MTU
; the maximum allowed size.