0

Luminaire Controller VS lighting_controller_service Binary

asked 2015-04-20 06:41:23 -0800

jacketkim gravatar image

Dear All. First of all, I don't good at English. Thank you acknowledge.

Control Light Bulb using lighting_controller_service is my goal.

I have actual Bulb Device. (LIFX LCM A19-TW) And, lighting_controller_service executed on Board. (Board OS is Android 4.2 jelly bean) also alljoyn-daemon executed on Board.

And Control Light bulb using LFS_Sample.apk, It is not working properly. But In the same wifi network, When using Luminaire controller, control Light bulb working well.

summary.

I execute "alljoyn-daemon & lighting_controller_service" on Android board. Control Light Bulb using LSF_Sample.apk Same Wifi network.

When I using lighting_controller_service, It is not working properly. When I using Luminaire controller, It it working well.

Luminaire Controller has been optimized ?

Thank you.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-07-07 09:21:40 -0800

jj-blanz gravatar image

updated 2015-07-08 02:27:12 -0800

OK, I guess with help of some AJ experts I got it to work now... see last paragraph.


Unfortunately, I do not have any answer to this question.

I am observing the exact same problem. This is happening with the CPP lighting_controller_service running with AllJoyn core v14.06a and v14.12. I have tried a few different platforms (lighting_controller_service running under Ubuntu 12.04 on a VM, lighting_controller_service running under linaro on a Dragonboard IFC6410, with stand-alone daemon as well bundled router). In all cases the lighting_controller_service seems to get the messages from the LSF sample app on an android phone fine... at least the state change of lamps is getting displayed when the command line sample lighting_controller_client is connected with the controller at the same time. But the LIFX bulbs only react occasionally to any requested state changes. Looks like the messaging between the controller and the bulbs is not working.

When I use the integrated LSF controller of Luminaire, everything runs just fine. Works with stand-alone daemon under 14.06a as well as 14.12.


Actually the reason for the strange behavior of the lighting_controller_service application is most likely some missing implementation of OEM code in inc/OEM_CS_Config.h and src/OEM_CS_Config.cc under ${AJ_ROOT}/core/service_framework/standard_core_library/lighting_controller_service/

In particular the function that is used to get time information is important. The code in the git repository only generates random numbers, which confuses the lamp services in the bulbs. You need to generate actual time information (this is in OEM_CS_Config.cc). Here is what I was using:

void OEM_CS_GetSyncTimeStamp(uint64_t& timeStamp)
    {
        // This is just a sample implementation and so it passes back a
        // random value. OEMs are supposed to integrate this
        // with their Time Sync module to return a valid time stamp

        struct timespec res;

        clock_gettime(CLOCK_REALTIME, &res);
        timeStamp = ((uint64_t) 1000 * res.tv_sec) + ((uint64_t) res.tv_nsec / 1e6);

        QCC_DbgPrintf(("%s: timestamp = %llu", __func__, timeStamp));
    }

With that change it all worked as expected for me.

I wonder whether this function should be used in the repository code instead of the random number generation. It should compile on most linux based platforms and if not: It is better to find out that this needs to be implemented rather than not noticing the random number generation.

BR J.J.

===========

BR

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-04-20 06:41:23 -0800

Seen: 170 times

Last updated: Jul 08 '15