MKRGSM icon indicating copy to clipboard operation
MKRGSM copied to clipboard

Add TCP write in binary mode

Open tryhus opened this issue 6 years ago • 4 comments

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

tryhus avatar Dec 16 '18 11:12 tryhus

Hi @tryhus,

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

Should write be updated to use this?

sandeepmistry avatar Dec 17 '18 14:12 sandeepmistry

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 avatar Dec 17 '18 18:12 tryhus

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

tryhus avatar Dec 21 '18 22:12 tryhus

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.

CLAassistant avatar Apr 09 '21 13:04 CLAassistant