Skip to content
This repository was archived by the owner on Apr 24, 2019. It is now read-only.

Change socket mode to UDP for mesh in Jenkinsfile #133

Closed
wants to merge 2 commits into from
Closed

Conversation

kimlep01
Copy link
Contributor

@kimlep01 kimlep01 commented Dec 7, 2016

Change socket mode to UDP for mesh in Jenkinsfile

  • Change binding mode to UDP in simpleclient.h if building for mesh
    This is a workaround for IOTCLT-1296

@teetak01 @SeppoTakalo
CC @jankii01 @artokin

@JanneKiiskila
Copy link
Contributor

We could also consider modifying the .h-file to have this part;

#if MBED_CONF_APP_NETWORK_INTERFACE == MESH_LOWPAN_ND
NETWORK_STACK = M2MInterface::Nanostack_IPv6;
#elif MBED_CONF_APP_NETWORK_INTERFACE == MESH_THREAD
NETWORK_STACK = M2MInterface::Nanostack_IPv6;
#endif

applied also to the TCP vs UDP mode setting. Might be useful for others, too.

@SeppoTakalo
Copy link
Contributor

Yes!
That would be better solution.

@JanneKiiskila
Copy link
Contributor

JanneKiiskila commented Dec 8, 2016

//Select binding mode: UDP or TCP -- note - Mesh networking is IPv6 UDP ONLY
#if MBED_CONF_APP_NETWORK_INTERFACE == MESH_LOWPAN_ND || MBED_CONF_APP_NETWORK_INTERFACE == MESH_THREAD
M2MInterface::BindingMode SOCKET_MODE = M2MInterface::UDP;
M2MInterface::NetworkStack NETWORK_STACK = M2MInterface::LwIP_IPv6;
#else
// WiFi or Ethernet supports both - TCP by default to avoid
// NAT problems, but UDP will also work - IF you configure
// your network right.
M2MInterface::BindingMode SOCKET_MODE = M2MInterface::TCP;
// Select network stack mode: IPv4 or IPv6 - Eth + Wifi can be either
// Remember to match the mbed_app.json with this choice
M2MInterface::NetworkStack NETWORK_STACK = M2MInterface::LwIP_IPv4;
#endif

I think we should resolve the IPv4/IPv6 issue as well...

@JanneKiiskila
Copy link
Contributor

@JanneKiiskila
Copy link
Contributor

@SeppoTakalo @kimlep01 Ideally we could also handle the UDP vs. TCP via the mbed_app.json file, I don't think it's ideal one has to tweak the source files for configuration issues but I haven't figured out yet a way to do that.

@JanneKiiskila
Copy link
Contributor

Please see also this; #137

@kimlep01
Copy link
Contributor Author

@jankii01 I just ran tests with latest binaries from master as #139 was merged and 6lowpan has SOCKET_MODE : TCP enabled again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants