XBP24-ZB joining with coordinator but not with other routers

Hi,
I’ve been banging my head against this issue now for a couple of weeks and would appreciate any help / ideas that I can get.

Situation is like this:
XBP24-ZB as API router with 23A7, connecting into existing ZB HA network with existing other routers, end devices and coordinators.

All works fine as long as the XBee decides to join directly to the coordinator, but as it’s trying to be smart on me it usually picks a router closer to me to handle the join - and that’s when the problem starts.
When it refuses to join then all I can do is to sit back and wait for it to decide to join to the coordinator instead, and then all works fine from there.

So what I can see from sniffing a bit is that the procedure when it works goes something like this:

  1. XBee -> beacon request.
  2. A whole list is being broadcasted.
  3. XBee -> 0x0000 Association and data request and consequent replies.
  4. 0x0000 -> XBee Transport key
  5. XBee -> 0x0000 [encrypted] Request trust center key, and consequent encrypted reply.
  6. Life goes on.

But when he tries to do join through an router then it goes like this:

  1. XBee -> beacon request.
  2. A whole list is being broadcasted.
  3. XBee -> 0x1234 Association and data request and consequent replies.
  4. 0x1234 -> 0x0000 [encrypted] Update device.
  5. 0x0000 -> 0x1234 [encrypted] Transport key. The odd thing here (or maybe not) is the double encryption. The package is encrypted and the data (transport key) is encrypted as well.
  6. 0x1234 -> XBee [encrypted] Transport key package.
  7. And we never get here.
    My understanding from step 6 is that if it’s trying to send the key, which will be used for encryption, encrypted - then it will never be understood by the XBee as it doesn’t have it. Or am I missing something here?

The intermediate router is EM250 based, but with a custom firmware, and it’s known for being slightly buggy on other features. But - other of these intermediate routers join just fine so…?

As far as I see it I have two choices right now. Getting my XBee to join with the second procedure by adjusting XYZ or something, alternatively get my XBee to join directly with the coordinator.
Is the second option even possible? I haven’t seen any ways to direct the join procedure in detail.

So… does anyone know how to go about resolving this?

-Christoffer