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

Add TCP write in binary mode #72

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tryhus
Copy link

@tryhus tryhus commented Dec 16, 2018

I added a TCP write function to write raw binary data.

@sandeepmistry
Copy link
Contributor

Hi @tryhus,

Thank you for opening this pull request, what is the advantage for this functionality?

Should write be updated to use this?

@tryhus
Copy link
Author

tryhus commented Dec 17, 2018

Hi sandeepmistry,

Thank you for opening this pull request, what is the advantage for this functionality?

The current write function only allow to send char data.
Furthermore, according to the documentation "not all of the ASCII charset can be used".

It's not convient when you have to send values because you have to convert them to char what it's less accurate for float value and it takes more bytes (it can matter if you don't have many bytes/mounth within your contract).

For these reasons, in my application, I needed to send raw data from the MKR to a server.
So I thought someone else can be in the same situation.

Should write be updated to use this?

You mean write of ModemClass ?

@tryhus
Copy link
Author

tryhus commented Dec 21, 2018

I added a function to wait TCP acknowledgement.
I also updated the previous function.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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