View previous topic :: View next topic |
Author |
Message |
cykotix
Joined: 19 Jun 2008 Posts: 14
|
Posted: Mon Oct 06, 2008 6:35 pm Post subject: |
|
|
miniupnp wrote: |
The patch doesnt require minissdpd. If minissdpd is not running, the patch should not modify the behaviour of Mediatomb.
I think it could be submitted but it needs some work to handle errors correctly. |
Excellent. It appears to work fantastically! I started minissdpd first, then started miniupnpd followed by the patched mediatomb and all 3 appear to be working. It would be very nice to have a patch to submit to the mediatomb guys; however, I would be unable to fix the error handling myself.
Thank you very much for your diligence it helping me out with this issue. I can't tell you how much it was driving me crazy! It is very much appreciated! Now I just need to write a freebsd startup script for minisspd.
I assume minisspd needs to start before miniupnpd & mediatomb, correct? What would happen if minisspd was restarted or was killed? Would miniupnpd/mediatomb have to be restarted to work properly again together after minisspd is started again? |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1592
|
Posted: Mon Oct 06, 2008 6:39 pm Post subject: |
|
|
cykotix wrote: |
Thank you very much for your diligence it helping me out with this issue. I can't tell you how much it was driving me crazy! It is very much appreciated! Now I just need to write a freebsd startup script for minisspd. |
That shouldn't be difficult If that's like OpenBSD, a few lines in rc.local and that's it !
cykotix wrote: | I assume minisspd needs to start before miniupnpd & mediatomb, correct? What would happen if minisspd was restarted or was killed? Would miniupnpd/mediatomb have to be restarted to work properly again together after minisspd is started again? |
Yes. Currently if minissdpd is killed it loose it's "memory". And miniupnpd/mediatomb would not know... So indeed they would need to be restarted. _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
cykotix
Joined: 19 Jun 2008 Posts: 14
|
Posted: Mon Oct 06, 2008 6:48 pm Post subject: |
|
|
For anyone else that may need a FreeBSD startup script:
Code: |
#!/bin/sh
. /etc/rc.subr
minissdpd_enable=${minissdpd_enable:-"NO"}
minissdpd_flags=${minissdpd_flags}
name=minissdpd
rcvar=`set_rcvar`
load_rc_config $name
command="/usr/local/sbin/minissdpd"
pidfile="/var/run/${name}.pid"
run_rc_command "$1"
|
and add to /etc/rc.conf
Code: |
minissdpd_enable="YES"
minissdpd_flags=""
|
In my case, I added `minissdpd_flags="-i 192.168.5.1"`. Just make sure those lines in rc.conf are before miniupnpd and mediatomb. |
|
Back to top |
|
|
NkM
Joined: 16 Oct 2008 Posts: 8
|
Posted: Thu Oct 16, 2008 8:25 pm Post subject: |
|
|
I'm relieved to find this thread since I ran into the same problem and was wondering if there was a solution to it. This question is probably directed more toward cykotix since I'm using a setup very similar to his: FreeBSD7, pf, mediatomb, miniupnpd, and a PS3 (saw your other post that you were trying to configure it with your PS3).
I recompiled both miniupnpd and mediatomb (with the supplied patch) as well as the minissdpd. I start minisspdp first (using the rc script above). That worked fine. I startup miniupnpd second... it initially failed, but its log told me it would fail back to try to use minissdpd. So I assumed that part worked. I started mediatomb last. I check the status of all three of them, and they all seem to be running just fine. I also reloaded my pf rules just because. Nothing changed, I still have the anchor and rdr-anchor in there and it all worked fine prior to this... just never miniupnpd and mediatomb at the same time of course
I started my PS3 to check things out. At first, mediatomb didn't show up. Even when searching for possible media servers, it wouldn't find it. I went back and stopped all services and started them back up again. Next time I started the PS3, mediatomb showed up just fine. (I didn't bother trying to stream a video over the network... I assume this still works considering this thread is about the discovery of devices and not the actual functionality of them.)
Next up, I went into the PS3's networking setting snd did a connection test. I want to make sure that it could still find the UPnP service as well as stick to NAT Type 2.
Unfortunately, it failed at finding a UPnP service and it was NAT Type 3.
cykotix, is everything working fine with your PS3? I just tried this yesterday with PS3 firmware 2.50. I haven't had a chance to start miniupnpd without minissdp (keep mediatomb off for now) to check if it works. I did this test late last night, but I will try that when I get home today. |
|
Back to top |
|
|
NkM
Joined: 16 Oct 2008 Posts: 8
|
Posted: Fri Oct 17, 2008 12:01 am Post subject: |
|
|
Okay, I stopped all services and started just miniupnpd and checked the PS3. It found that the UPnP is enabled and NAT Type 2.
I stopped miniupnpd and started minissdpd and miniupnpd (no mediatomb this time).
The PS3 couldn't find UPnP and it's NAT Type 3.
So yes, miniupnpd looks like it's working. However, it doesn't look like it plays well with minissdpd first.
cykotix, I hope your setup is working. |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1592
|
Posted: Fri Oct 17, 2008 7:16 am Post subject: |
|
|
thanks for your posts. Obviously minissdpd doesn't do all its job
maybe you can capture all SSDP traffic 1) without minissdpd, PS3 finding MiniUPnPd 2) with minissdpd, PS3 not finding MiniUPnPd so I could compare and find what's wrong. _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1592
|
Posted: Fri Oct 17, 2008 7:21 am Post subject: |
|
|
just a question :
Have you several LAN interfaces on your FreeBSD7 box ? _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
NkM
Joined: 16 Oct 2008 Posts: 8
|
Posted: Fri Oct 17, 2008 3:38 pm Post subject: |
|
|
miniupnp wrote: | maybe you can capture all SSDP traffic 1) without minissdpd, PS3 finding MiniUPnPd 2) with minissdpd, PS3 not finding MiniUPnPd so I could compare and find what's wrong. |
Could you direct me on how I could do that. I'm not the greatest when it comes to monitoring traffic/ports
I actually have 3 interfaces on this box: fxp0 (Internet), re0 (LAN), and xl0 (not connected to anything, I was just too lazy to physically remove the card after I added re0). |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1592
|
Posted: Fri Oct 17, 2008 4:24 pm Post subject: |
|
|
tcpdump -w ssdp_1.pcap -i re0 -s 64000 udp port 1900 _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
NkM
Joined: 16 Oct 2008 Posts: 8
|
|
Back to top |
|
|
NkM
Joined: 16 Oct 2008 Posts: 8
|
Posted: Sat Oct 18, 2008 2:04 am Post subject: |
|
|
Okay, I'm narrowing the problem down. And I don't know if it's just my configuration and I'm hoping that cykotix will see this post
I found that either the miniupnpd from FreeBSD ports or the 20081006 version found in this thread will NOT work with the PS3 (UPnP not found, NAT Type 3 would be the result) are when:
1) ssdpd is running
2) When I'm trying to do the tcpdump
Mediatomb works with or without ssdpd is running or whether or not I'm taking a tcpdump.
I found that really strange and now am curious if it's my setup. |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1592
|
Posted: Sat Oct 18, 2008 8:35 am Post subject: |
|
|
If for some reason tcpdump change something (it sets the network interface to promiscuious mode) you can try to run it on another machine. But then you will see only broadcast/multicast traffic unless you're using a Hub and not a Switch... _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1592
|
Posted: Sat Oct 18, 2008 8:53 am Post subject: |
|
|
That is strange, there are only "NOTIFY" packets in thoses captures, no M-SEARCH and responses... _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
NkM
Joined: 16 Oct 2008 Posts: 8
|
|
Back to top |
|
|
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1592
|
Posted: Mon Oct 20, 2008 6:52 pm Post subject: |
|
|
For some reason minissdpd doesn't answer to M-SEARCH requests...
I'll investigate here to see what could happen.
Have you any error message from minissdpd when you run it with the -d flag ? (or even in /var/log/daemon) _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
|
|