named-data-iot/ndn-iot-package-over-nordic-sdk

What if board2 out of Android BLE communication range?Will board1 forward interest from Android to board2?

Opened this issue · 5 comments

Assuming that board1 is in Android connection range,board2 is out of Android BLE connection range but can connect with board1.If Android want to send an interest to board2,will board1 forward this interest to board2?

If you have added the prefix of the interest that the Android phone is sending to the ble face for forwarding, the board should forward the interest to the other board.

But board1 and board2 own the same named face in main.c ,how to distinguish between these two faces?

Ah, looking at my previous answer, I'm realizing it was inadequate; below I give a more detailed answer.

For example, you can have board 1 register an onInterest callback function to receive the Android's interest, and then in that onInterest callback function you can express the same interest again, which should then reach board 2. When board 2 responds with data, it will trigger the onData callback that board 1 registered when expressing the interest, and then board 1 can put that data to the forwarder again and have it be sent to the Android phone.

Using the strategy above would not require the boards to have ble faces with different prefixes registered.

I've tried the way you provided,board2 didn't get forwarded interest from board1 at all.
I read the wiki page and found board1 maintains an unicast connection and send evey message from ble face to unicast connection first,is there such a possibility that board1 sends interest back to Android again with unicast connection.

And I think normally board1 just need to insert prefix and face of board2 into the FIB,once board1 gets interest request for data of board2,it will check FIB and forward it to board2.This operation does't need to be done in application level.