Page 1 of 1

SOLVED: Can't see minidlna server through RPi access point

Posted: Mon Jun 24, 2019 2:16 am
by pumpkinpi
I have a raspberry pi running a minidlna server on my hardwired LAN. I can see that server from VLC on computers hardwired into that LAN.

I have a couple raspberry pi's acting as wireless access points. I can't seem to see my minidlna server using VLC on my phone which is connected to the wireless access points. I suspect there is some kind of broadcast that does not pass through the access point backwards but I have no idea what to look for. Something related to that port 8200 on the server.

Just fishing here for some ideas on what to research.

This is my /etc/hostapd/hostapd.conf file on my access point:

Code: Select all

interface=wlan0
driver=nl80211
ssid=MYSSID
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=PASSWORD
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
This is my /etc/dnsmasq.conf file on my access point:

Code: Select all

dhcp-mac=set:client_is_a_pi,B8:27:EB:*:*:*
dhcp-reply-delay=tag:client_is_a_pi,2
interface=wlan0
domain-needed
bogus-priv
dhcp-range=192.168.6.2,192.168.6.100,12h
This is my /etc/dhcpcd.conf file on my access point:

Code: Select all

hostname
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option ntp_servers
option interface_mtu
require dhcp_server_identifier
slaac private
interface wlan0
static ip_address=192.168.6.1/24
static routers=192.168.6.1
static domain_name_servers=192.168.2.82
I don't have much in iptables on my access points:

Code: Select all

sudo iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination 
This is my /etc/minidlna.conf file (uncommented lines) on my minidlna server:

Code: Select all

user=minidlna
media_dir=V,/home/pi/drive1/Movies
media_dir=P,/home/pi/drive1/Photos
media_dir=V,/home/pi/drive1/Videos
media_dir=A,/home/pi/Media
db_dir=/home/pi/PiDrive/minidlna
log_dir=/home/pi/PiDrive/minidlna
port=8200
friendly_name=PiHome
serial=681019810597110
inotify=yes
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg
album_art_names=AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg
album_art_names=Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg
notify_interval=895
Any direction appreciated.

PPi.

Re: Can't see minidlna server through RPi access point

Posted: Tue Jun 25, 2019 4:36 pm
by Andresen
Can you share the IPs for
  • the minidlna computer
  • the access point (both eth0 and wlan0)
  • a mobile device using the access point
?


Regards,
Andresen

Re: Can't see minidlna server through RPi access point

Posted: Tue Jun 25, 2019 7:45 pm
by pumpkinpi
Ok. Good question.

The minidlna computer is:

Code: Select all

ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:9a:f7:a5  
          inet addr:192.168.2.103  Bcast:192.168.2.255  Mask:255.255.255.0
The access point is:

Code: Select all

ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.149  netmask 255.255.255.0  broadcast 192.168.2.255

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.6.1  netmask 255.255.255.0  broadcast 192.168.6.255
All the mobile devices on the access point are between 192.168.2.2 and something like 192.168.2.100.

Does this help?

Thanks,

PPi

Re: Can't see minidlna server through RPi access point

Posted: Tue Jun 25, 2019 8:00 pm
by Andyroo
There are a few notes from 2013 :o that show minidlna had a bug over multiple subnets but I doubt your version is that old.

Others note that it’s multicast routing that’s the issue and this post https://www.raspberrypi.org/forums/view ... ?p=1414184 has a possible fix...

Re: Can't see minidlna server through RPi access point

Posted: Wed Jun 26, 2019 2:05 am
by pumpkinpi
No, my version is not too old. Is there something better than minidlna I could use? Basically, I just have a bunch of audio and video files on a raspberry pi server and I want to dish them out to mobile VLC clients on the network. I am not married to this solution of using minidlna.

I am not clear on what computer I would issue this command and I am also not confident that the address written there is correct:

Code: Select all

sudo ip route add 224.0.0.0/4 dev wlan0
I would guess I do it on my access point.

I tried this, FYI:

Code: Select all

route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.2.1     0.0.0.0         UG    203    0        0 eth0
0.0.0.0         192.168.6.1     0.0.0.0         UG    302    0        0 wlan0
192.168.2.0     0.0.0.0         255.255.255.0   U     203    0        0 eth0
192.168.6.0     0.0.0.0         255.255.255.0   U     302    0        0 wlan0

Re: Can't see minidlna server through RPi access point

Posted: Wed Jun 26, 2019 2:17 pm
by Andresen
pumpkinpi wrote:
Tue Jun 25, 2019 7:45 pm

All the mobile devices on the access point are between 192.168.2.2 and something like 192.168.2.100.

PPi
Can you verify the IPs on the devices connecting to the access point? - I've not tried to recreate your setup, but my intuition expected to see something in the 192.168.6.2-192.168.6.100 range on the mobile device.

Did you follow any guides to setup the access point - and if so: can you share the link?


Regards,
Andresen

Re: Can't see minidlna server through RPi access point

Posted: Wed Jun 26, 2019 2:52 pm
by pumpkinpi
Crud. My bad. I mistyped. Your intuition is correct. Mobile devices are in .6.2 to .6.100 range.

I followed a guide I found years ago. I will try to dig it up later. The APs are running latest Stretch version and fully updated.

Re: Can't see minidlna server through RPi access point

Posted: Wed Jun 26, 2019 3:08 pm
by Andresen
pumpkinpi wrote:
Wed Jun 26, 2019 2:52 pm
Crud. My bad. I mistyped. Your intuition is correct. Mobile devices are in .6.2 to .6.100 range.

I followed a guide I found years ago. I will try to dig it up later. The APs are running latest Stretch version and fully updated.
Thx .

If you have a spare SD-card, could you then try to bridge the wired and the wireless network - as from:
https://www.raspberrypi.org/documentati ... et-sharing
on one of the access points?


Regards,
Andresen

Re: Can't see minidlna server through RPi access point

Posted: Wed Jun 26, 2019 8:21 pm
by pumpkinpi
Oh! That looks exactly like what I need to do. Will try it out later tonight and report back. Thanks!

Re: Can't see minidlna server through RPi access point

Posted: Wed Jun 26, 2019 8:33 pm
by Andresen
pumpkinpi wrote:
Wed Jun 26, 2019 8:21 pm
Oh! That looks exactly like what I need to do. Will try it out later tonight and report back. Thanks!
;-)

I'm pretty sure, the issue is that the broadcasts from the minidlna on 192.168.2.Y/24 never makes it to the wireless clients on 192.168.6.X/24 .. so your suspicion was right -- bridging the interfaces sounds like a much better way .. and turn the Pi into an actual Access Point and not NAT Router .. ;-)


Regards,
Andresen

Re: Can't see minidlna server through RPi access point

Posted: Thu Jun 27, 2019 2:48 am
by pumpkinpi
Boom. It works!

Thanks for the help Andresen.

Now I know about bridges.

PPi