PDA

View Full Version : $MAC working??



ggee
2007-08-27, 01:47 AM
How does this work? I added the following to my config file.



if [ $MAC = "00:0D:FE:00:3A:93" ]; then
mvpmc --vlc 192.168.10.44 -f /etc/helvB14.pcf -c 192.168.10.44 --emulate 192.168.10.20 --web-port 80 --weather-location CAXX0212_c &
else
mvpmc --startup emulate --vlc 192.168.10.44 -f /etc/helvB14.pcf -c 192.168.10.44 --emulate 192.168.10.20 --web-port 80 --weather-location CAXX0212_c &
fi
But it didn't work. I tried the following.



# echo $MAC

#
Shouldn't that have returned something? I am using the Aug24 alpha dongle with the new GUI stuff. Is it because my MVP use eth1 instead of eth0?



# ifconfig
eth1 Link encap:Ethernet HWaddr 00:0D:FE:0C:3A:93
inet addr:192.168.10.80 Bcast:192.168.10.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20098 errors:0 dropped:0 overruns:0 frame:0
TX packets:15266 errors:1 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:18193905 (17.3 MiB) TX bytes:2006668 (1.9 MiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

I have a wireless MVP. I assume eth0 would be the wired port.

Greg

ggee
2007-08-27, 01:54 AM
Quick question. When I telnet to the MVP, is there a command to tell me the version of dongle I am running?

Thanks,
Greg

mvallevand
2007-08-27, 02:42 AM
I'm not sure I extracted the wireless mac, in fact I just tested and it is the wired mac, You can see what I set doing this from telnet

cat /etc/tftp.config

Using the wired mac address should still id the machine it might be hard to do more than this.

I didn't export $MAC to shell (telnet), but this is no different than $IP. If you need it I can explain the process.

Yes, eth1 is wireless and eth0 is wired.

Finally the only way I can tell via telnet is

ls -lt /bin/mvpmc


Martin

ggee
2007-08-27, 03:30 AM
Is that the right file? I am loading dongle config from windows share via gbpvr.



# cat /etc/tftp.config
cat: /etc/tftp.config: No such file or directory
#


Finally.



# ls -lt /bin/mvpmc
-rwxr-xr-x 1 root root 1700248 Aug 24 23:41 /bin/mvpmc
#



Greg

mvallevand
2007-08-27, 03:38 AM
Is that the right file? I am loading dongle config from windows share via gbpvr.

That is the right file and you would need to load from a share. Its not there if you load the linux/mythtv way via dhcp.

You can confirm and recreate it from telnet with

vpdread -t

Martin

ggee
2007-08-27, 11:34 PM
Tried again. After reboot.



192.168.10.80 login: root


BusyBox v1.1.3 (2007.07.07-04:44+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

# ls /etc/tf*
ls: /etc/tf*: No such file or directory
# vpdread -t
Killed
# ls /etc/tf*
ls: /etc/tf*: No such file or directory
# cat /etc/tftp.config
cat: /etc/tftp.config: No such file or directory
# echo $MAC

#


I used to tftp dongle and config from linux tftp, but switched to gbpvr. But I noticed something interesting. Even though I chose gbpvr in MVP setup, it still gets config from linux tftp. Probably because of my dhcp setup.



group {
next-server 192.168.10.41; # IP address of your TFTP server
host mvp {
hardware ethernet 00:0d:fe:0c:3a:93;
fixed-address 192.168.10.80;
filename "dongle.bin";
option root-path "/home/mvp,rsize=4096,wsize=4096,nolock";
}
}
SYSLOG of linux server.


Aug 27 19:12:34 netmgt atftpd[7237]: Serving dongle.bin.config to 192.168.10.80:2049
Aug 27 19:12:35 netmgt atftpd[7237]: Serving dongle.bin.xml to 192.168.10.80:2049


I didn't know I code do that.

Greg

mvallevand
2007-08-27, 11:46 PM
I used to tftp dongle and config from linux tftp, but switched to gbpvr. But I noticed something interesting. Even though I chose gbpvr in MVP setup, it still gets config from linux tftp. Probably because of my dhcp setup.

For the pre-model H's that respect netboot this method will always supercede GBPVR. You could actually feed a Hauppauge dongle and mvpmc through the use of the appropriate filename "dongle.bin".

The good news with this method is that the $IP variable will be guaranteed so you don't need to worry about the $MAC variable.

Martin

ggee
2007-08-28, 02:37 AM
So I can do the following instead?



if [ $IP = "192.168.10.80" ]; then
mvpmc --vlc 192.168.10.44 -f /etc/helvB14.pcf -c 192.168.10.44 --emulate 192.168.10.20 --web-port 80 --weather-location CAXX0212_c &
else
mvpmc --startup emulate --vlc 192.168.10.44 -f /etc/helvB14.pcf -c 192.168.10.44 --emulate 192.168.10.20 --web-port 80 --weather-location CAXX0212_c &
fi


As for the netboot, it's a wireless MVP, which I believe is a model H.

Greg

mvallevand
2007-08-28, 03:25 AM
So I can do the following instead?



if [ $IP = "192.168.10.80" ]; then
mvpmc --vlc 192.168.10.44 -f /etc/helvB14.pcf -c 192.168.10.44 --emulate 192.168.10.20 --web-port 80 --weather-location CAXX0212_c &
else
mvpmc --startup emulate --vlc 192.168.10.44 -f /etc/helvB14.pcf -c 192.168.10.44 --emulate 192.168.10.20 --web-port 80 --weather-location CAXX0212_c &
fi


That should work (--web-port 80 is the default)


As for the netboot, it's a wireless MVP, which I believe is a model H.


Congratulations, you must even have mvprelay working on your linux box. A lot of people don't make it that far.

Martin

ggee
2007-08-28, 04:03 AM
That should work (--web-port 80 is the default)


Congratulations, you must even have mvprelay working on your linux box. A lot of people don't make it that far.

Martin


Yah, it worked fairly well, except the tftp of the dongle.bin started acting up when I started fiddling with the wireless. Not sure how it got impacted. This is all I have on the server.



/usr/sbin/atftpd --daemon --port 16869 --retry-timeout 120 --mcast-port 1758 --mcast-addr 192.168.10.0-255 --mcast-ttl 2 --maxthread 100 --verbose=7 /tftpboot
/usr/sbin/atftpd --daemon --port 69
mvprelay 16881 5906 6337 192.168.10.41