miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mediatomb/Miniupnpd
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation
View previous topic :: View next topic  
Author Message
cykotix



Joined: 19 Jun 2008
Posts: 14

PostPosted: Mon Oct 06, 2008 6:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1387

PostPosted: Mon Oct 06, 2008 6:39 pm    Post subject: Reply with quote

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 Smile 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.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
cykotix



Joined: 19 Jun 2008
Posts: 14

PostPosted: Mon Oct 06, 2008 6:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
NkM



Joined: 16 Oct 2008
Posts: 8

PostPosted: Thu Oct 16, 2008 8:25 pm    Post subject: Reply with quote

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 Smile

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
View user's profile Send private message
NkM



Joined: 16 Oct 2008
Posts: 8

PostPosted: Fri Oct 17, 2008 12:01 am    Post subject: Reply with quote

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. Sad

cykotix, I hope your setup is working.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1387

PostPosted: Fri Oct 17, 2008 7:16 am    Post subject: Reply with quote

thanks for your posts. Obviously minissdpd doesn't do all its job Sad
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.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1387

PostPosted: Fri Oct 17, 2008 7:21 am    Post subject: Reply with quote

just a question :
Have you several LAN interfaces on your FreeBSD7 box ?
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
NkM



Joined: 16 Oct 2008
Posts: 8

PostPosted: Fri Oct 17, 2008 3:38 pm    Post subject: Reply with quote

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 Smile

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
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1387

PostPosted: Fri Oct 17, 2008 4:24 pm    Post subject: Reply with quote

tcpdump -w ssdp_1.pcap -i re0 -s 64000 udp port 1900
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
NkM



Joined: 16 Oct 2008
Posts: 8

PostPosted: Sat Oct 18, 2008 1:24 am    Post subject: Reply with quote

Okay, here are 4 files.

http://twinwork.net/sandbox/cap.mediatomb
http://twinwork.net/sandbox/cap.mediatomb.ssdpd

http://twinwork.net/sandbox/cap.miniupnpd
http://twinwork.net/sandbox/cap.miniupnpd.ssdpd

Mediatomb worked in all instances with the PS3. I used "search for media servers" on the PS3, and it found them both times.

To figure out if the PS3 can hears the UPnP server, I went to the test connection where it shows if UPnP is available and what kind of NAT Type it's using.

Unfortunately, this time around their both NAT Type 3 and a missing UPnP server.

I don't know if I messed with my pf rules and screwed something up between miniupnpd and my PS3...

I went back to the old miniupnpd via ports: http://www.freshports.org/net/miniupnpd/

I know this one was working and it's the version I was using for the last 5 months or so.

It still can't find the UPnP server with this version. So I'll have to look into it what I'm doing wrong (double check /etc/pf.conf, check all other config, etc) and I'll get back to you. Neutral
Back to top
View user's profile Send private message
NkM



Joined: 16 Oct 2008
Posts: 8

PostPosted: Sat Oct 18, 2008 2:04 am    Post subject: Reply with quote

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 Smile

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. Sad
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1387

PostPosted: Sat Oct 18, 2008 8:35 am    Post subject: Reply with quote

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.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1387

PostPosted: Sat Oct 18, 2008 8:53 am    Post subject: Reply with quote

NkM wrote:
Okay, here are 4 files.

http://twinwork.net/sandbox/cap.mediatomb
http://twinwork.net/sandbox/cap.mediatomb.ssdpd

http://twinwork.net/sandbox/cap.miniupnpd
http://twinwork.net/sandbox/cap.miniupnpd.ssdpd

That is strange, there are only "NOTIFY" packets in thoses captures, no M-SEARCH and responses...
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
NkM



Joined: 16 Oct 2008
Posts: 8

PostPosted: Mon Oct 20, 2008 12:12 am    Post subject: Reply with quote

http://twinwork.net/sandbox/cap2.mediatomb
http://twinwork.net/sandbox/cap2.mediatomb.ssdpd

http://twinwork.net/sandbox/cap2.miniupnpd
http://twinwork.net/sandbox/cap2.miniupnpd.ssdpd

Okay, I ran tcpdump again with the -p flag.

The mediatomb results are the same: the PS3 sees it with minissdpd running or not.

With the patched miniupnpd, I ran it once without minissdpd and the PS3 sees the UPnP service and NAT Type 2 just fine.

With minissdpd + miniupnpd running, the PS3 does not see the UPnP service and it's NAT Type 3.

I hope these new logs have more information than the last ones.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1387

PostPosted: Mon Oct 20, 2008 6:52 pm    Post subject: Reply with quote

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.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.