Skip to content
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

Increase UDP buffer size ? #224

Closed
natcl opened this issue Jun 14, 2014 · 6 comments

Comments

@natcl
Copy link

commented Jun 14, 2014

Would it be possible to increase the UDP read buffer size from 512 to a somewhat larger value (768 or 1024)
This would allow the Spark Core to read Artnet (dmx) packets.

Thanks.

@towynlin

This comment has been minimized.

Copy link
Member

commented Jun 15, 2014

If you're building locally this is editable in spark_wiring_udp.h, but not currently in the web IDE. Great suggestion, although it conflicts with our current goal of optimizing RAM usage. We should thus make the buffer size easily user-configurable.

@natcl

This comment has been minimized.

Copy link
Author

commented Jun 15, 2014

Thanks ! Yes I think the best solution is to have it user configurable. Perhaps it could be defined directly within my artnet library.

Le 2014-06-15 à 15:18, Zachary Crockett notifications@github.com a écrit :

If you're building locally this is editable in spark_wiring_udp.h, but not currently in the web IDE. Great suggestion, although it conflicts with our current goal of optimizing RAM usage. We should thus make the buffer size easily user-configurable.


Reply to this email directly or view it on GitHub.

@nicodegunst

This comment has been minimized.

Copy link

commented Nov 10, 2014

Hi, I am also looking for a way to increase the buffer size. I have found the RX_BUF_MAX_SIZE, and have successfully increased it. However, there seems to be a limit at exactly 992, if I set it any higher, my program does execute, but as soon as it receives udp data, it stops and starts blinking SOS in red.
When I look at the code for the CC3000, it looks like there is some limit at ±1520 (CC3000_MAXIMAL_RX_SIZE), which is related to MTU size, but this is as far as my knowledge in network technology goes.. Spitting through all the code I can't find any logic as to way this limit is 992.
I need to be able to receive packets of around 1450 bytes (I don't have any control over the sender). Is there anyway to achieve this?

@m-mcgowan

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2015

I'm looking at the UDP class now, and thinking that the memory should be allocated dynamically. A new constructor argument will set the maximum packet send/receive size.

UDP udp;  // default size of 512
UDP udp(1024);  // 1024 for read/write packets

How does that sound?

@natcl

This comment has been minimized.

Copy link
Author

commented Jun 5, 2015

Yes that would be great !

@m-mcgowan m-mcgowan added this to the 0.4.5 milestone Aug 22, 2015

@m-mcgowan

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2015

Dynamic memory allocation has been added in the develop branch, will be part of the 0.4.5 release.

@m-mcgowan m-mcgowan closed this Aug 22, 2015

@m-mcgowan m-mcgowan self-assigned this Aug 22, 2015

m-mcgowan added a commit that referenced this issue Oct 30, 2018
Merge pull request #224 from particle-iot/feature/mesh/embedded_bootl…
…oader

Mesh: support bootloader updating by system part.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.