Comments (5)
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.
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.
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.
Don't worry, it's merged to master. Updating libjuice on its own should work too!
from libdatachannel.
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)
- Having Issue Opening Negotiated Data Channels HOT 4
- Strange binary data received by PeerConnection.video.onMessage HOT 2
- Complilation failure. Cmake. HOT 1
- build error on winodows HOT 7
- media-receiver HOT 1
- expect result on streamer HOT 1
- SSL client certificate in impl::TlsTransport HOT 4
- build with mbedtls HOT 4
- Websocket remoteAddress() interface return value HOT 5
- VCPKG: compiling problems in windows VS2019 & VS2022. HOT 2
- Does libdatachannel have any examples of integration with GStreamer’s appsrc/appsink HOT 20
- Libdatachannel + LibJuice stopped working after the same peer connects -> disconnects -> connects HOT 1
- Cannot connect to TLS server(No way to configure related TLS was found)
- Description Media SDP parsing not working HOT 1
- Support all Certificate Fingerprint Algos
- How to check that connection is stucked? HOT 2
- Diagnostic when linking with LTO: `warning: 'send' violates the C++ One Definition Rule` HOT 2
- libdatachannel can't build on Microsoft Windows HOT 2
- Help~ WebRTC handshake failed. What should I do? HOT 1
- RtpHeader/Ssrc is not a member of 'rtc' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libdatachannel.