Skip to content

Conversation

@CptHolzschnauz
Copy link
Contributor

@CptHolzschnauz CptHolzschnauz commented Apr 12, 2021

My problem: Because the chunkSize is limited to 256, the lib writes two times into the socket when the MQTT message is larger which causes problems with my mqtt broker.
The modem is capable to handle more, see:
AT+USOWR=?
+USOWR: (0-6),(0-512),"HEX data"
+USOWR: (0-6),(0-1024),"data"

So i suggest to enlarge the chunkSize at least up to 512 to write more data into the socket in one step.
This should improve the performance for all users because of less overhead data and less AT commands to the modem.

This lib is more or less a copy of MKRGSM and needs some fine tuning for the SARA modem.

Dear coding cracks, please put some love in this very important lib!

@CLAassistant
Copy link

CLAassistant commented Apr 12, 2021

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link

Memory usage change @ 89f347b

Board flash % RAM for global variables %
arduino:samd:mkrnb1500 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/GPRSUdpNtpClient
flash
% examples/GPRSUdpNtpClient
RAM for global variables
% examples/NBSSLWebClient
flash
% examples/NBSSLWebClient
RAM for global variables
% examples/NBWebClient
flash
% examples/NBWebClient
RAM for global variables
% examples/ReceiveSMS
flash
% examples/ReceiveSMS
RAM for global variables
% examples/SendSMS
flash
% examples/SendSMS
RAM for global variables
% examples/Tools/ChooseRadioAccessTechnology
flash
% examples/Tools/ChooseRadioAccessTechnology
RAM for global variables
% examples/Tools/NBScanNetworks
flash
% examples/Tools/NBScanNetworks
RAM for global variables
% examples/Tools/PinManagement
flash
% examples/Tools/PinManagement
RAM for global variables
% examples/Tools/SerialSARAPassthrough
flash
% examples/Tools/SerialSARAPassthrough
RAM for global variables
% examples/Tools/TestGPRS
flash
% examples/Tools/TestGPRS
RAM for global variables
% examples/Tools/TestModem
flash
% examples/Tools/TestModem
RAM for global variables
%
arduino:samd:mkrnb1500 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/GPRSUdpNtpClient<br>flash,%,examples/GPRSUdpNtpClient<br>RAM for global variables,%,examples/NBSSLWebClient<br>flash,%,examples/NBSSLWebClient<br>RAM for global variables,%,examples/NBWebClient<br>flash,%,examples/NBWebClient<br>RAM for global variables,%,examples/ReceiveSMS<br>flash,%,examples/ReceiveSMS<br>RAM for global variables,%,examples/SendSMS<br>flash,%,examples/SendSMS<br>RAM for global variables,%,examples/Tools/ChooseRadioAccessTechnology<br>flash,%,examples/Tools/ChooseRadioAccessTechnology<br>RAM for global variables,%,examples/Tools/NBScanNetworks<br>flash,%,examples/Tools/NBScanNetworks<br>RAM for global variables,%,examples/Tools/PinManagement<br>flash,%,examples/Tools/PinManagement<br>RAM for global variables,%,examples/Tools/SerialSARAPassthrough<br>flash,%,examples/Tools/SerialSARAPassthrough<br>RAM for global variables,%,examples/Tools/TestGPRS<br>flash,%,examples/Tools/TestGPRS<br>RAM for global variables,%,examples/Tools/TestModem<br>flash,%,examples/Tools/TestModem<br>RAM for global variables,%
arduino:samd:mkrnb1500,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0

@github-actions
Copy link

github-actions bot commented Jul 1, 2021

Memory usage change @ c2e55e7

Board flash % RAM for global variables %
arduino:samd:mkrnb1500 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/GPRSUdpNtpClient
flash
% examples/GPRSUdpNtpClient
RAM for global variables
% examples/NBSSLWebClient
flash
% examples/NBSSLWebClient
RAM for global variables
% examples/NBWebClient
flash
% examples/NBWebClient
RAM for global variables
% examples/ReceiveSMS
flash
% examples/ReceiveSMS
RAM for global variables
% examples/SendSMS
flash
% examples/SendSMS
RAM for global variables
% examples/Tools/ChooseRadioAccessTechnology
flash
% examples/Tools/ChooseRadioAccessTechnology
RAM for global variables
% examples/Tools/NBScanNetworks
flash
% examples/Tools/NBScanNetworks
RAM for global variables
% examples/Tools/PinManagement
flash
% examples/Tools/PinManagement
RAM for global variables
% examples/Tools/SerialSARAPassthrough
flash
% examples/Tools/SerialSARAPassthrough
RAM for global variables
% examples/Tools/TestGPRS
flash
% examples/Tools/TestGPRS
RAM for global variables
% examples/Tools/TestModem
flash
% examples/Tools/TestModem
RAM for global variables
%
arduino:samd:mkrnb1500 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/GPRSUdpNtpClient<br>flash,%,examples/GPRSUdpNtpClient<br>RAM for global variables,%,examples/NBSSLWebClient<br>flash,%,examples/NBSSLWebClient<br>RAM for global variables,%,examples/NBWebClient<br>flash,%,examples/NBWebClient<br>RAM for global variables,%,examples/ReceiveSMS<br>flash,%,examples/ReceiveSMS<br>RAM for global variables,%,examples/SendSMS<br>flash,%,examples/SendSMS<br>RAM for global variables,%,examples/Tools/ChooseRadioAccessTechnology<br>flash,%,examples/Tools/ChooseRadioAccessTechnology<br>RAM for global variables,%,examples/Tools/NBScanNetworks<br>flash,%,examples/Tools/NBScanNetworks<br>RAM for global variables,%,examples/Tools/PinManagement<br>flash,%,examples/Tools/PinManagement<br>RAM for global variables,%,examples/Tools/SerialSARAPassthrough<br>flash,%,examples/Tools/SerialSARAPassthrough<br>RAM for global variables,%,examples/Tools/TestGPRS<br>flash,%,examples/Tools/TestGPRS<br>RAM for global variables,%,examples/Tools/TestModem<br>flash,%,examples/Tools/TestModem<br>RAM for global variables,%
arduino:samd:mkrnb1500,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0

@per1234
Copy link
Contributor

per1234 commented Aug 4, 2021

Hi @CptHolzschnauz. Thanks so much for taking the time to submit a pull request. It seems like there are a lot of changes being added here that aren't related to the stated purpose of the pull request: "Enlarge the chunkSize". I just wanted to check in: are you intended to push all these commits to the pull request?

What is maybe a bit surprising at times is that, even after you have submitted a pull request, any commit you push to that branch of your fork is added to the pull request. The pull request is not a snapshot of the branch at the time it was submitted. Because we may want to continue with unrelated development on our forks, it is usually best practices to create a dedicated "feature branch" of the fork for each pull request. I see this pull request was submitted from the master branch of your fork, so any commit pushed to that master branch becomes part of this pull request.

@CptHolzschnauz
Copy link
Contributor Author

CptHolzschnauz commented Aug 4, 2021 via email

@per1234
Copy link
Contributor

per1234 commented Aug 4, 2021

The chunkSize enlargement is a small change, not really worth a PR

PRs for small, self-contained changes are welcome.

Now I don’t know what’s the best solution for this mess, should i revoke the PR?

From the perspective of the PR alone, the ideal solution is for you to do a hard reset of your repository's master branch back to the last commit that was intended to be added to the PR, then do a force push to your fork here on GitHub.

From a quick look, I believe the last on-topic commit was this one:
c2e55e7
If so, the commands would be:

git clone https://github.com/CptHolzschnauz/MKRNB
cd MKRNB
git reset --hard c2e55e78cf1a8cc47156922a5c89a2ff1d574694
git push --force-with-lease

HOWEVER, be warned that this will cause all the advancements you have made in the master branch to be lost, so it might not be the ideal solution as far as your work outside the scope of this PR is concerned. What you could do is to create a branch off of master before you reset it. That will preserve all the work you have currently in master in that other branch.

Note that changing the history of a repository via force pushes is not generally a good practice, since this can affect people who are relying on the branch's history to be inviolate. But in the special case of a "feature branch" that is only ever intended to be used to produce a pull request, it is generally considered acceptable, and even preferred to do force pushes as is required by ongoing development of the pull request proposal (e.g., in response to reviewer feedback) in order to avoid cluttering up the upstream repository's commit history with those "fixup" commits should be PR be merged.

@CptHolzschnauz CptHolzschnauz marked this pull request as draft August 5, 2021 05:16
@CptHolzschnauz
Copy link
Contributor Author

To prevent a git mess..

@CptHolzschnauz
Copy link
Contributor Author

CptHolzschnauz commented Aug 5, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants