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

tcp client #2

Open
st0ff3r opened this issue Mar 6, 2018 · 1 comment
Open

tcp client #2

st0ff3r opened this issue Mar 6, 2018 · 1 comment

Comments

@st0ff3r
Copy link

st0ff3r commented Mar 6, 2018

Hi, i am trying to use espsim to test libmqtt, but I am running into a problem about how to start the networking. On the esp8266 hardware I would call espconn_gethostbyname() and do espconn_connect() in the callback.

Should I just setup the espconn connection struct myself and call espconn_connect()?

Do you have any example how you start the networking?

@afnid
Copy link
Owner

afnid commented Mar 7, 2018

I didn't have any different code to setup the networking in all of my esp sources. My application would have made the wifi connect calls and then made the espconn calls after that, just enough in the wifi was stubbed out to make it bootstrap and run.

I was running on a host on my physical lan and participating as a peer with other esp8266 devices on my wireless lan. I have no idea if anybody else has ever gotten this to work, it is a pretty specialized use case, but it was worth it in my case.

I didn't do much more than a simple stand-alone startup but I got my code to compile and link again. I think I was on a 1.X sdk before and now tested with 2.1.0-18. So cleaned up several conflicts and added a couple more functions. Again, not tested, mileage will vary.

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

No branches or pull requests

2 participants