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

"No route found" with C26X2R1 on Z-Stack 3.x.0 #12

Open
puddly opened this issue Feb 11, 2020 · 3 comments
Open

"No route found" with C26X2R1 on Z-Stack 3.x.0 #12

puddly opened this issue Feb 11, 2020 · 3 comments

Comments

@puddly
Copy link
Collaborator

puddly commented Feb 11, 2020

With no clear cause, all dataRequest commands were immediately rejected with a 205 status code, a "no route found" error. Rebooting individual devices or even restarting the network had no effect.

The only solution I could find was to send out a route discovery broadcast message:

if obj.command == "dataRequest":
    # XXX: dataConfirm can arrive before dataRequest response

    payload = {
        "endpoint": obj.payload["destendpoint"],
        "transid": obj.payload['transid'],
    }
    waiter = self.wait_for(CommandType.AREQ, Subsystem.AF, "dataConfirm", payload)
    result = await waiter.wait()
    LOGGER.debug('Got a dataRequest response: %s', result)

    status = result.payload['status']

    if status != 0:
        # No route found
        if status == 205:
            BEACON_MAX_DEPTH = 0x0F
            DEF_NWK_RADIUS = (2 * BEACON_MAX_DEPTH)

            LOGGER.warning('Received a routing failure! Attempting to discover a new route before failing...')

            await self.request(Subsystem.ZDO, 'extRouteDisc', {
                'dstAddr': obj.payload['dstaddr'],
                'options': 0x01,
                'radius': DEF_NWK_RADIUS
            })

            await asyncio.sleep(5)

        raise CommandError(result.payload['status'], f'Received a bad dataRequest status: {result.payload["status"]}')

Only one request like this is necessary because the dstAddr is really replaced with 0xFFFC, though I'm not sure what the consequences are of enqueuing a bunch of these messages are (especially since all of the useful parts of the Z-Stack firmware are not open source).

@sanyatuning
Copy link
Collaborator

Can't reproduce.
@puddly do you still have this problem?

@puddly
Copy link
Collaborator Author

puddly commented May 3, 2020

Occasionally. You have to enable route discovery or manually send a route discovery request.

@puddly
Copy link
Collaborator Author

puddly commented May 3, 2020

How many devices do you have in your network?

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