Code Monkey home page Code Monkey logo

Comments (5)

X-Kent avatar X-Kent commented on July 26, 2024 1

I updated libjuce from current master and it fixed the problem.
Linux to Android (when android is answering) is working.
Android to Android is working too.

This may be my build specific issue(I build libdatachannel/juice in my project build environment) but I will mention:
I have noticed that libjuice has a call to "getrandom" in random.c
getrandom() is not available on old androids (I target API 21) I believe it was added in API 28.
proper/safe random number generation is obviously out of scope of our debug/testing so I just replaced "static int random_bytes(void *buf, size_t size)" body with:
char ptr = (char)buf;
for (int i = 0; i < size; ++i)
ptr[i] = rand();
You may want to add some ifdef android there or something (with something better than what I did obviously :-)

Thank you for your great work!
I find libjuice and libdatachannel to be very useful components. I have experience working with other ICE libraries(nice/pjnath etc) and this one seems to be the easiest to work with.
The part that you can libjuice instead of libnice is just fantastic (libnice is OK but it requires all the gobject/glib etc stuff which are just too big for small libraries/projects)
Having webrtc.datachannel capability without full WebRTC behemoth library is a great benefit.

from libdatachannel.

paullouisageneau avatar paullouisageneau commented on July 26, 2024

Thanks for the logs, looking at them it seems the DTLS handshake failure is not the root of the problem. It actually looks like Android does not receive what is sent by Linux after ICE is connected when it is the answerer (so when it is in the ICE controlled role), in particular it never receives the DTLS server hello. So my guess is this is probably an Android-specific issue with ICE.

I recently merged some minor fixes in libjuice, and I just added error checking on send since it was missing. Could you please retry with the current master? (Don't forget to update the submodules)

If it still doesn't work, the log might give us more information about the issue.

from libdatachannel.

X-Kent avatar X-Kent commented on July 26, 2024

I used the https://github.com/paullouisageneau/libdatachannel/tree/usrsctp-fix-notifications branch. Is it already merged to master ? As without this fix, I get the problem of len(messages)>65k...
I will update libjuice from it's own git master repo, rebuild and see if it fixes it.
If the problem still happens I will update to libdatachannel to master branch and check again.
I will report back my findings.

from libdatachannel.

paullouisageneau avatar paullouisageneau commented on July 26, 2024

Don't worry, it's merged to master. Updating libjuice on its own should work too!

from libdatachannel.

paullouisageneau avatar paullouisageneau commented on July 26, 2024

Thanks for your very positive feedback, I'm glad the libraries are useful for you! The usage simplicity was indeed the main goal so it's cool to have achieved it in some extend.

It's great it works now, I don't exactly know what the problem was on Android but that's for the better.

Rather than replacing random_bytes(), I think you could get away with changing #if defined(__linux__) to #if defined(__linux__) && !defined(__ANDROID__) here:
https://github.com/paullouisageneau/libjuice/blob/7cd5e53d54f83048122e14a6cc52f6ac38b7a98c/src/random.c#L27
This will output a failing random_bytes() instead and juice_random will fallback on random() which should be available on Android.

from libdatachannel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.