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

Where is the NFD source code for android studio #6

Open
Mohism opened this issue Mar 25, 2019 · 8 comments
Open

Where is the NFD source code for android studio #6

Mohism opened this issue Mar 25, 2019 · 8 comments

Comments

@Mohism
Copy link

Mohism commented Mar 25, 2019

Hi Alex,Team
I don't understand what crew.dir have done. I only saw some nfd.so ,and I do not know how does NFD(c++) be compiled to nfd.so for android. "nfd-wrapper.cpp" called several methods what can't be found in NFD(c++) source code.

非常感谢!

@Mohism
Copy link
Author

Mohism commented Mar 25, 2019

And I want to implement a transport via bluetooth,so I want to compiled NFD(c++) to nfd.so for my android project.Grantful!

@agawande
Copy link

Through crew, currently you just install the already built NFD code.
You can choose to get the NFD code from source and build it locally (after making any changes if you want to).
See the source command here: https://github.com/named-data-mobile/NFD-android/blob/master/README-dev.md#building-ndn-android-with-different-version-of-underlying-nfd-ndn-cxx-or-other-dependencies

@Mohism
Copy link
Author

Mohism commented Apr 4, 2019

Through crew, currently you just install the already built NFD code.
You can choose to get the NFD code from source and build it locally (after making any changes if you want to).
See the source command here: https://github.com/named-data-mobile/NFD-android/blob/master/README-dev.md#building-ndn-android-with-different-version-of-underlying-nfd-ndn-cxx-or-other-dependencies

Thanks for replay.
I already read the "crew" source code for a couple of days.But I do not know How to set the local resource path to compile.
When I use " ./crew.dir/crew remove-source nfd " then "./crew.dir/crew source nfd" ,and I build it " ./crew.dir/crew build nfd" receiver some erros.

build.log

@agawande
Copy link

agawande commented Apr 4, 2019

Have you already done this:
CREW_OWNER=named-data-mobile crew.dir/crew install target/sqlite target/openssl target/boost target/ndn_cxx
And made sure that these patches are applied to the nfd source code in ndk-build/packages/nfd/:
https://github.com/named-data-mobile/android-crew-staging/tree/for-ndk-r18/patches/packages/nfd/0.6.5

@Mohism
Copy link
Author

Mohism commented Apr 5, 2019

Have you already done this:
CREW_OWNER=named-data-mobile crew.dir/crew install target/sqlite target/openssl target/boost target/ndn_cxx
And made sure that these patches are applied to the nfd source code in ndk-build/packages/nfd/:
https://github.com/named-data-mobile/android-crew-staging/tree/for-ndk-r18/patches/packages/nfd/0.6.5

I install all this packages and CREW said they already be installed. When I install nfd ,I receiver some errors ,so I have remove the nfd patches. And I can find them in the caches path. like " .caches/packages"
AnyWay, When I reinstall my ubuntu ,I can build nfd again.

Now,I want to know where is the source code when I build nfd like " ./crew.dir/crew build nfd"
1.I can get nfd source like "./crew.dir/crew source nfd" in "ndk-bundle/packages/nfd".But I found this source was not that complied by "crew build" .
2.I tried to edit the formula nfd.rb. I set the "src_dir " to my local path in " def build_for_abi(......",but that cannot work.

I just want to compile my local nfd source,not in some caches or other path.Help me please. I have read the source of "crew" for more than one week.

@agawande
Copy link

agawande commented Apr 5, 2019

ndk-bundle/packages/nfd is the source compiled by crew build as far as I know. And you should apply your changes there (copy over from your local nfd source while maintaining the patches applied there).

@Mohism
Copy link
Author

Mohism commented Apr 6, 2019

ndk-bundle/packages/nfd is the source compiled by crew build as far as I know. And you should apply your changes there (copy over from your local nfd source while maintaining the patches applied there).

Thanks a lot!

@Mohism
Copy link
Author

Mohism commented Apr 7, 2019

ndk-bundle/packages/nfd is the source compiled by crew build as far as I know. And you should apply your changes there (copy over from your local nfd source while maintaining the patches applied there).

And I want to implement a transport via bluetooth(Android &iOS).I should follow this steps.
1.Implement a bluetooth transport in NFD(c++ source code, use jni communicate with android or iOS).
2.Extend and implement my bluetooth transport face in my client ( jndn java code).

As I know, local ndn client communicate with ndn server(nfd ) by tcp("localhost",port: 6363))?
local ndn client controll NFD by nfd or receive data from nfd by udp.
the data transfer like this .
receiver data:
android bluetooth ->jndn(client) ->via tcp NFD (ndn server)。
send data:
via tcp NFD (ndn server)->jndn(client)->android bluetooth->remote NFD server.
Am I right ,or some notices?
Help me.
Talking with you for one moment is much better than reading books for ten years.

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