Search code examples
iosalljoyn

Secure Signals between iOS and PC


I have a PC and an iOS device. the iOS device is using alljoyn 15.04 and the PC is using alljoyn 15.09. Both implement the same secure interface. We have secure signals as a part of this.

Our strategy includes joining a peer's session as soon as we discover them, then forcing authentication by calling a method on the remote device - using auth mechamism: ALLJOYN_ECDHE_PSK

This all works great!

  • Now, I can send a secure signal just fine from one ios device from another.

  • I can also send a secure signal from the iOS device to the PC just fine.

  • The PC can send a secure signal to another PC, but it cannot send a secure signal to the iOS client

We've compared everything - session options, interface names/options, bus connection options, etc. and everything is the same. Then I found this error in the alljoyn log on the iOS side:

145.449 ****** ERROR ALLJOYN iodisp2_2 .../src/Message_Parse.cc:1078 | Failed to read message on :wYxt8HAP.73: ER_OS_ERROR

I have no idea what to do about this. Can someone help?

I was hoping to not run into any lower level bugs like this with alljoyn. Dang.

Thanks for any help!


Solution

  • This error can occur if you are trying to send a secure signal out on session 0 (sessionless) instead of a valid hosted session. This is because the other end cannot decrypt the signal with your group key for the session. If you are hosting the session then try sending the signal out on ajn::SESSION_ID_ALL_HOSTED and see if that works.