esp8266-driver icon indicating copy to clipboard operation
esp8266-driver copied to clipboard

Implement socket_bind and socket_accept

Open janjongboom opened this issue 7 years ago • 10 comments

@geky @sarahmarshy

Work in progress... Tested with https://developer.mbed.org/teams/ST/code/mbed-os-tcp-server-example/

I'd like some feedback on the approach (working around the ATParser library quirks) before cleaning it up.

janjongboom avatar Jul 28 '17 10:07 janjongboom

What I basically need is a function that I can call every X ms. which says: "Do you have any data in your buffers that has CONNECT or CLOSE in them". Then, as long as the RxIrq is attached properly we shouldn't need this weird pinging (it's also not thread-safe).

janjongboom avatar Jul 28 '17 15:07 janjongboom

A problem with the ATParser library is that it only processes information when you ask it to, which is great for simple request/response patterns, but not for real OOB data like sockets connecting. I implemented a second buffer which handles CONNECT and CLOSED commands. This way we cannot miss any commands. Also, added some logic for sockets disconnecting, which currently causes the library to hang indefinitely on the recv() call. This PR also needs https://github.com/ARMmbed/ATParser/pull/10.

janjongboom avatar Jul 31 '17 09:07 janjongboom

Ping @geky @sarahmarshy

janjongboom avatar Aug 11 '17 08:08 janjongboom

Ping again @geky @sarahmarshy

janjongboom avatar Sep 27 '17 11:09 janjongboom

Outdated, closing...

SeppoTakalo avatar Nov 29 '17 17:11 SeppoTakalo

@SeppoTakalo Since when is outdated a reason to close issues without discussion?!

I want to have a discussion about the approach first before rebasing this.

/cc (again!) @sarahmarshy @geky

janjongboom avatar Dec 06 '17 03:12 janjongboom

For issues, its not valid but for pull requests it is a valid reason.

Ownership of this driver is now transferred to my team and I only checked that this PR seems to be abandoned for a while, therefore I closed.

ESP driver have gone lot of rework since this have been published so I cannot know whether this is valid anymore. For improvements, I would like to first see the failing testcase or liked issue.

From testcases, I can see that this driver fails on accept() and bind() tests so this PR might be valid, but it needs to be updated before we can review it.

SeppoTakalo avatar Dec 07 '17 08:12 SeppoTakalo

@SeppoTakalo Yes, it's abandoned because no-one has given a second to look at the PR. What am I supposed to do in that case? I've been trying to get someone to look at the way this is implemented for the last 5 months.

accept() and bind() are not implemented in the ESP8266 driver, and this is one way of implementing it. It would be good if someone could evaluate the way that I implemented this, and see if it's a good approach. If so, it can be rebased on master.

janjongboom avatar Dec 07 '17 09:12 janjongboom

The code shouldn't have divereged too much. Not just this pr, but all features going into ESP8266Interface have been frozen for a while (sorry @janjongboom!).

geky avatar Dec 07 '17 18:12 geky

This is now ticket ONME-3341 and we can take ownership of the work within our sprints.

SeppoTakalo avatar Dec 15 '17 11:12 SeppoTakalo