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

A simple query (I think) #7

Open
ThomasWrobel opened this issue May 11, 2014 · 0 comments
Open

A simple query (I think) #7

ThomasWrobel opened this issue May 11, 2014 · 0 comments

Comments

@ThomasWrobel
Copy link

Whats to stop the API working on Android <4?

I did some investigating myself, and the connection seems to stop at:

  LFXLANTransportManager.gatewayDiscoveryControllerDidUpdateEntry( LFXGatewayDiscoveryController table, LFXGatewayDiscoveryTableEntry tableEntry, boolean entryIsNew)
  • because the "gatewayConnections" hashmap is empty.

Theres no actual error anywhere, its just no connection is made and it seems like gatewayConnections should have entries in it.

Looking for where those entries are put in, I find the problem seems to be here;

discoveryTable.transportManager.addMessageObserverObjectWithCallback(      discoveryTable, new LFXMessageObserverCallback()
    {
        @Override
        public void run( Object context, LFXMessage message)
        {

            Log.i("LFX Gateway Discovery", "LFXMessageObserverCallback run:"+ message.getType().name());

            LFXGatewayDiscoveryController discoveryTable = (LFXGatewayDiscoveryController) context;

            if( message.getType() != Type.LX_PROTOCOL_DEVICE_STATE_PAN_GATEWAY) 
            {
                return;
            }

            discoveryTable.handleStatePANGatewayMessage( message);
        }
    });

The log I added shows the value of the message is never the correct type;

I/LFX Gateway Discovery(29241): LFXMessageObserverCallback run:LX_PROTOCOL_DEVICE_GET_PAN_GATEWAY
I/LFX Gateway Discovery(29241): LFXMessageObserverCallback run:LX_PROTOCOL_DEVICE_GET_PAN_GATEWAY
 I/LFX Gateway Discovery(29241): LFXMessageObserverCallback run:LX_PROTOCOL_DEVICE_GET_PAN_GATEWAY
 ....

*Is this to do with the bulbs broadcast?
Something unique with the way the Android OS handles connections?

Anything else?*

I am curious as I dont mind putting a bit of time in to get it working on older phones, seeing as my bulb app works on them already interface wise.

my full log from the moment I hit connection

05-11 20:39:05.516: I/System.out(29241): Debug: LFXLAN Initializer
05-11 20:39:05.526: I/LFX Gateway Discovery(29241): addMessageObserverObjectWithCallback
05-11 20:39:05.526: I/System.out(29241): DISCOVERYMODE: NORMAL
05-11 20:39:05.536: I/System.out(29241): Making Discovery Timer task. Period: 30000
05-11 20:39:05.536: I/System.out(29241): Debug: Setup UDP Connections
05-11 20:39:05.606: I/System.out(29241): Debug: ConnectionState: NOT_CONNECTED
05-11 20:39:05.606: I/System.out(29241): Verbose: Connecting UDP Socket 192.168.178.255:56700
05-11 20:39:05.626: I/System.out(29241): UDP SOCKET MONITOR IS ONLINE - ip: /192.168.178.255, port: 56700
05-11 20:39:05.626: I/System.out(29241): Debug: ConnectionState: NOT_CONNECTED
05-11 20:39:05.626: I/System.out(29241): Verbose: Connecting UDP Socket 192.168.178.255:56750
05-11 20:39:05.626: I/System.out(29241): Debug: Start Discovery
05-11 20:39:05.626: I/System.out(29241): DISCOVERYMODE: ACTIVELY_SEARCHING
05-11 20:39:05.626: I/System.out(29241): Making Discovery Timer task. Period: 1000
05-11 20:39:05.626: I/System.out(29241): UDP SOCKET MONITOR IS ONLINE - ip: /192.168.178.255, port: 56750
05-11 20:39:05.626: I/LFX Gateway Discovery(29241): LFXMessageObserverCallback run:LX_PROTOCOL_DEVICE_GET_PAN_GATEWAY
05-11 20:39:05.636: I/System.out(29241): Connection State did change called.
05-11 20:39:05.636: I/System.out(29241): Connection State did change called.
05-11 20:39:06.627: I/LFX Gateway Discovery(29241): LFXMessageObserverCallback run:LX_PROTOCOL_DEVICE_GET_PAN_GATEWAY
05-11 20:39:07.628: I/LFX Gateway Discovery(29241): LFXMessageObserverCallback run:LX_PROTOCOL_DEVICE_GET_PAN_GATEWAY
05-11 20:39:08.629: I/LFX Gateway Discovery(29241): LFXMessageObserverCallback run:LX_PROTOCOL_DEVICE_GET_PAN_GATEWAY
05-11 20:39:09.630: I/LFX Gateway Discovery(29241): LFXMessageObserverCallback run:LX_PROTOCOL_DEVICE_GET_PAN_GATEWAY
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

1 participant