-
Notifications
You must be signed in to change notification settings - Fork 130
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
tinydtls won't install on macOS without modifications #64
Comments
@morberg could you approach jkonra2m to discuss the issue further, or update the README here with macOS instructions please? |
I couldn't link my github account to the gitlab installation where jkonra2m has his tinydtls implementation to submit an issue there. I think jkonra2m is @kabel42 here on github. I'll try to get hold of him to discuss further. |
can confirm what @morberg says, replacing mentions of |
Hi, |
I'm not familiar with the history of this project, but it might be that Tradfri needs multicast DTLS. I have seen one mention of the Android Tradfri app using multicast DTLS to find the gateway. Perhaps @ggravlingen or @lwis know if multicast is needed or if the pypi version of tinydtls-cython would be enough? |
I'm 95% sure we don't need multicast, so we can probably switch to https://git.fslab.de/jkonra2m/tinydtls-cython |
I just read a use case for multicast and it didn't quite seem to apply to Tradfri so I'm prone to agree with @lwis. @morberg are you able to do a test using https://git.fslab.de/jkonra2m/tinydtls-cython? |
Ooh, if we can use DTLSSocket from PyPi, that would be the best. I am able to install DTLSSocket on my Mac after I installed the cython package. However, I think that this would also require an update to aiocoap to use DTLSSocket instead of plain tinydtls? |
Looks like it already uses it https://github.com/chrysn/aiocoap/search?utf8=%E2%9C%93&q=DTLSSocket |
ooh, when we do a |
I think we can switch our extras to reference an extra? https://github.com/ggravlingen/pytradfri/blob/master/setup.py#L8 I'll play around with it later, may also mean we don't have to do the aiocoap patch. |
We no longer need to install tinydtls in this way, as we use DTLSSocket which doesn't have the same problem. |
When trying to install tinydtls from
git clone --depth 1 https://git.fslab.de/jkonra2m/tinydtls.git
on macOS 10.12 it will fail with:../mc-helper.c:82:35: error: use of undeclared identifier 'IPV6_ADD_MEMBERSHIP' if(setsockopt(fd, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &mreq, sizeof(mreq))){
It seems
IPV6_ADD_MEMBERSHIP
is deprecated andIPV6_JOIN_GROUP
should be used instead (I am way out of my depth here and might be very wrong).Replacing the three mentions of
IPV6_ADD_MEMBERSHIP
withIPV6_JOIN_GROUP
inmc-helper.c
makes it possible to install tinydtls on macOS and tradfri seems to work fine in Home Assistant 0.55.0.(I also did
mv configure.in configure.ac
to get rid of a warning fromautoconf
.)The text was updated successfully, but these errors were encountered: