[Libwebsockets] Problem when running on ARM platform

Andy Green andy at warmcat.com
Sat Nov 8 01:36:22 CET 2014



On 8 November 2014 04:53:13 GMT+08:00, "Halpin, Joe" <jhalpin at navigationsolutions.com> wrote:
>Hello,
>
>I have a test program written to run on both i386 and ARM, which
>behaves differently from one platform to the other (it's a pared down
>version of test-echo.c). I'm not using command line options, so I have
>this as part of the variable setup:
>
>#ifdef __ARM_EABI__
>    char address[256] = "192.168.42.2";
>    char interface_name[128] = "usb0";
>#else
>    char address[256] = "echo.websocket.org";
>    char interface_name[128] = "eth0";
>#endif

It's not related to your problem, but for static strings that will never be written, you should drop the arbitrary length inside the [] because it's just wasting space.

And if these are declared at function scope but are never changed, also mark them static to save space and code.

>The program works perfectly on i386, but apparently does nothing on my
>ARM platform. I added some debug output, but it just shows the
>following
>
>[411859:4774] NOTICE: Initial logging level 7

Force the logging level to, eg, 65535

>[411859:4777] NOTICE: Library version: 1.3 unknown-build-hash
>[411859:4777] NOTICE: IPV6 not compiled in
>[411859:4778] NOTICE: libev support not compiled in
>[411859:4785] NOTICE:  static allocation: 4472 + (12 x 1024 fds) =
>16760 bytes
>[411859:4789] NOTICE:  canonical_hostname = production-7.11.24.5
>[411859:4789] NOTICE:  per-conn mem: 140 + 1606 headers + protocol rx
>buf
>Calling libwebsocket_client_connect

So starting the connection was okay?

>wsi created
>at bail:
>[411860:5119] NOTICE: libwebsocket_context_destroy
>
>The #ifdef block is the only difference between the two versions. Does
>this ring a bell with anyone here?

I would confirm the test apps work on your Arm toolchain / board before doing anything else.  These are the golden sanity check for lws.

If they work everything else should work.

Notice the connection request just starts the ball rolling, the actual connection happens asynchronously during subsequent service depending on network latencies etc.

-Andy

>Thanks
>
>Joe
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org
>http://ml.libwebsockets.org/mailman/listinfo/libwebsockets




More information about the Libwebsockets mailing list