Friday, February 24, 2006


BEFSR41 V.2 : I bought the router for support a bug report of CyberLink for Java by Yahoo! Japan Auction. I won the bid for about $8.

It is installed the Japanese firmware, but I wrote the latest English firmware, v1.46.2.

I check the router using the latest CyberLink of the CVS server, I could not confirm the problem yet. However I would like to study UPnP GW specification in more detail.

It seems that the router is based on Microsoft's UPnP protocol stack same as NP-BBRM.
M-SEARCH * HTTP/1.1
Host: 239.255.255.250:1900
Man: "ssdp:discover"
ST: upnp:rootdevice
MX: 3


HTTP/1.1 200 OK
Cache-Control:max-age=120
Location:http://192.168.1.1:5678/rootDesc.xml
Server:NT/5.0 UPnP/1.0
ST:upnp:rootdevice
USN:uuid:upnp-InternetGatewayDevice-1_0-0090a2777777::upnp:rootdevice
EXT:

GET /rootDesc.xml HTTP/1.0
Host: 192.168.1.1:5678
Content-Length: 0

HTTP/1.1 200 OK
Content-type: image/gif
Expires: Thu, 13 Dec 1969 10:29:00 GMT
Connection: close
Pragma: no-cache
<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<URLBase>http://192.168.1.1:5678</URLBase>
<device>
<deviceType>urn:schemas-upnp-org:device:InternetGatewayDevice:1</deviceType>
<presentationURL>/index.htm</presentationURL>
<friendlyName>Linksys BEFSR41/BEFSR11/BEFSRU31</friendlyName>
<manufacturer>Linksys Inc.</manufacturer>
<manufacturerURL>http://www.linksys.com</manufacturerURL>
<modelDescription>Internet Access Server</modelDescription>
<modelName>Linksys BEFSR41/BEFSR11/BEFSRU31</modelName>
<UDN>uuid:upnp-InternetGatewayDevice-1_0-0090a2777777</UDN>
<UPC>00000-00001</UPC>
<iconList>
<icon>
<mimetype>image/gif</mimetype>
<width>16</width>
<height>16</height>
<depth>8</depth>
<url>http://192.168.1.1/calc.gif</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:Layer3Forwarding:1</serviceType>
<serviceId>urn:upnp-org:serviceId:L3Forwarding1</serviceId>
<controlURL>/Layer3Forwarding</controlURL>
<eventSubURL>/Layer3Forwarding</eventSubURL>
<SCPDURL>/Layer3Forwarding.xml</SCPDURL>
</service>
</serviceList>
<deviceList>
<device>
<deviceType>urn:schemas-upnp-org:device:WANDevice:1</deviceType>
<friendlyName>WANDevice</friendlyName>
<manufacturer>Linksys Inc.</manufacturer>
<manufacturerURL>http://www.linksys.com</manufacturerURL>
<modelDescription>BROADBAND ROUTER</modelDescription>
<modelName>Linksys BEFSR41/BEFSR11/BEFSRU31</modelName>
<modelNumber>1</modelNumber>
<modelURL>http://www.linksys.com</modelURL>
<serialNumber>0000001</serialNumber>
<UDN>uuid:upnp-WANDevice-1_0-0090a2777777</UDN>
<UPC>00000-00001</UPC>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1</serviceType>
<serviceId>urn:upnp-org:serviceId:WANCommonInterfaceConfig</serviceId>
<controlURL>http://192.168.1.1:6688/WANCommonInterfaceConfig</controlURL>
<eventSubURL>/WANCommonInterfaceConfig</eventSubURL>
<SCPDURL>/WANCfg.xml</SCPDURL>
</service>
</serviceList>
<deviceList>
<device>
<deviceType>urn:schemas-upnp-org:device:WANConnectionDevice:1</deviceType>
<friendlyName>Internet Access Server</friendlyName>
<manufacturer>Linksys Inc.</manufacturer>
<manufacturerURL>http://www.linksys.com</manufacturerURL>
<modelDescription>BROADBAND ROUTER</modelDescription>
<modelName>Linksys BEFSR41/BEFSR11/BEFSRU31</modelName>
<modelNumber>1</modelNumber>
<modelURL>http://www.linksys.com</modelURL>
<serialNumber>0000001</serialNumber>
<UDN>uuid:upnp-WANConnectionDevice-1_0-0090a2777777</UDN>
<UPC>00000-00001</UPC>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:WANIPConnection:1</serviceType>
<serviceId>urn:upnp-org:serviceId:WANIPConnection</serviceId>
<controlURL>http://192.168.1.1:2468//WANIPConnection</controlURL>
<eventSubURL>/WANIPConnection</eventSubURL>
<SCPDURL>/WANIPCn.xml</SCPDURL>
</service>
</serviceList>
</device>
</deviceList>
</device>
</deviceList>
</device>
</root>

POST /WANIPConnection HTTP/1.0
Host: 192.168.1.1:2468
Content-Length: 311
Content-Type: text/xml; charset="utf-8"
SOAPACTION: "urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress"

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:GetExternalIPAddress xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">
</u:GetExternalIPAddress>
</s:Body>
</s:Envelope>

HTTP/1.1 200 OK
Connection: close
Server: Microsoft-Windows-NT/5.1 UPnP/1.0 UPnP-Device-Host/1.0
Content-length: 467
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<m:GetExternalIPAddressResponse xmlns:m="urn:schemas-upnp-org:service:WANIPConnection:1">
<NewExternalIPAddress xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">192.168.100.109</NewExternalIPAddress>
</m:GetExternalIPAddressResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

POST /WANIPConnection HTTP/1.0
Host: 192.168.1.1:2468
Content-Length: 346
Content-Type: text/xml; charset="utf-8"
SOAPACTION: "urn:schemas-upnp-org:control-1-0#QueryStateVariable"

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:QueryStateVariable xmlns:u="urn:schemas-upnp-org:control-1-0">
<u:varName>PortMappingNumberOfEntries</u:varName>
</u:QueryStateVariable>
</s:Body>
</s:Envelope>

HTTP/1.1 200 OK
Connection: close
Server: Microsoft-Windows-NT/5.1 UPnP/1.0 UPnP-Device-Host/1.0
Content-length: 206
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
</SOAP-ENV:Body></SOAP-ENV:Envelope>

POST /WANIPConnection HTTP/1.0
Host: 192.168.1.1:2468
Content-Length: 346
Content-Type: text/xml; charset="utf-8"
SOAPACTION: "urn:schemas-upnp-org:control-1-0#QueryStateVariable"

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:QueryStateVariable xmlns:u="urn:schemas-upnp-org:control-1-0">
<u:varName>PortMappingNumberOfEntries</u:varName>
</u:QueryStateVariable>
</s:Body>
</s:Envelope>

HTTP/1.1 200 OK
Connection: close
Server: Microsoft-Windows-NT/5.1 UPnP/1.0 UPnP-Device-Host/1.0
Content-length: 206
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
</SOAP-ENV:Body></SOAP-ENV:Envelope>

Thursday, February 23, 2006


VLC : I wanted to check a problem of UPnP patch using CyberLink for C++ on MacOSX, and I got the latest source codes from the SVN server. However I knew that the current or future version seems accept the new patch based on Intel UPnP SDK as default. I would like to check a problem based on the CyberLink, but I have lost the mind today X-<

Tuesday, February 21, 2006


NP-BBRM : I am checking some functions of UPnP IGD using the broad band router in my home.

However, It seems that the device description is wrong such as the control URL, and the response for the control action is very slow. I have to wait for one minute to get the response. Accorrding to the response, It seems that the router uses Microsoft UPnP protocol stack or WindowsCE, but I don't know wheter the device information is not wrong. I upgraded the router to the latest firmware, v1.05, but I can't solve this problem yet.

HTTP/1.1 200 OK
Cache-Control:max-age=120
Location:http://192.168.0.1:5678/rootDesc.xml
Server:NT/5.0 UPnP/1.0
ST:upnp:rootdevice
USN:uuid:upnp-InternetGatewayDevice-1_0-0090a2777777::upnp:rootdevice
EXT:

<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<URLBase>http://192.168.0.1:5678</URLBase>
<device>
<deviceType>urn:schemas-upnp-org:device:InternetGatewayDevice:1</deviceType>
<presentationURL>/index.htm</presentationURL>
<friendlyName>NP-BBRM</friendlyName>
<manufacturer></manufacturer>
<manufacturerURL></manufacturerURL>
<modelDescription>Broadband Router</modelDescription>
<modelName>NP-BBRM</modelName>
<UDN>uuid:upnp-InternetGatewayDevice-1_0-0090a2777777</UDN>
<UPC>00000-00001</UPC>
<iconList>
<icon>
<mimetype>image/gif</mimetype>
<width>16</width>
<height>16</height>
<depth>8</depth>
<url>http://192.168.0.1/calc.gif</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:Layer3Forwarding:1</serviceType>
<serviceId>urn:upnp-org:serviceId:L3Forwarding1</serviceId>
<controlURL>/Layer3Forwarding</controlURL>
<eventSubURL>/Layer3Forwarding</eventSubURL>
<SCPDURL>/Layer3Forwarding.xml</SCPDURL>
</service>
</serviceList>
<deviceList>
<device>
<deviceType>urn:schemas-upnp-org:device:WANDevice:1</deviceType>
<friendlyName>WANDevice</friendlyName>
<manufacturer></manufacturer>
<manufacturerURL></manufacturerURL>
<modelDescription>BROADBAND ROUTER</modelDescription>
<modelName>NP-BBRM</modelName>
<modelNumber>1</modelNumber>
<modelURL></modelURL>
<serialNumber>0000001</serialNumber>
<UDN>uuid:upnp-WANDevice-1_0-0090a2777777</UDN>
<UPC>00000-00001</UPC>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1</serviceType>
<serviceId>urn:upnp-org:serviceId:WANCommonInterfaceConfig</serviceId>
<controlURL>http://192.168.0.1:6688/WANCommonInterfaceConfig</controlURL>
<eventSubURL>/WANCommonInterfaceConfig</eventSubURL>
<SCPDURL>/WANCfg.xml</SCPDURL>
</service>
</serviceList>
<deviceList>
<device>
<deviceType>urn:schemas-upnp-org:device:WANConnectionDevice:1</deviceType>
<friendlyName>Broadband Router</friendlyName>
<manufacturer></manufacturer>
<manufacturerURL></manufacturerURL>
<modelDescription>BROADBAND ROUTER</modelDescription>
<modelName>NP-BBRM</modelName>
<modelNumber>1</modelNumber>
<modelURL></modelURL>
<serialNumber>0000001</serialNumber>
<UDN>uuid:upnp-WANConnectionDevice-1_0-0090a2777777</UDN>
<UPC>00000-00001</UPC>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:WANIPConnection:1</serviceType>
<serviceId>urn:upnp-org:serviceId:WANIPConnection</serviceId>
<controlURL>http://192.168.0.1:2468//WANIPConnection</controlURL>
<eventSubURL>/WANIPConnection</eventSubURL>
<SCPDURL>/WANIPCn.xml</SCPDURL>
</service>
</serviceList>
</device>
</deviceList>
</device>
</deviceList>
</device>
</root>


POST /WANIPConnection HTTP/1.0
Host: 192.168.0.1:2468
Content-Length: 311
Content-Type: text/xml; charset="utf-8"
SOAPACTION: "urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress"

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:GetExternalIPAddress xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">
</u:GetExternalIPAddress>
</s:Body>
</s:Envelope>

HTTP/1.1 200 OK
Connection: close
Server: Microsoft-Windows-NT/5.1 UPnP/1.0 UPnP-Device-Host/1.0
Content-length: 467
Content-Type: text/xml; charset="utf-8"
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body><m:GetExternalIPAddressResponse xmlns:m="urn:schemas-upnp-org:service:WANIPConnection:1">
<NewExternalIPAddress xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">192.168.100.108</NewExternalIPAddress>
</m:GetExternalIPAddressResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

Thursday, February 09, 2006


VLC : I have a cold but I have to write some program at work until this week X-< I am busy and tired this week but I was checking the UPnP module on MacOSX last week because I knew the problem from the comment of my blog.

I haven't been fixed the problem yet and the result is bellow using VLC v0.8.4a. According to the latest comment, I have to use the latest source tree because the UPnP module of v0.8.4a is not stable version.

I knew a new UPnP module based on Intel SDK, upnp_intel.cpp, is added last week from the comment, and the module name is renamed from upnp.cpp to upnp_cc.cpp.

$ cd vlc-0.8.4a
$ cd extras/contrib
$ ./bootstrap
$ make src
$ cd ../..
$ ./boostrap
$ ./configure --disable-x11 --disable-xvideo --disable-glx --disable-gtk
--enable-sdl --enable-ffmpeg --with-ffmpeg-mp3lame --with-ffmpeg-faac
--with-ffmpeg-zlib --enable-mad --enable-dvbpsi --enable-a52 --disable-dvdplay
--enable-dvdnav --enable-faad --enable-vorbis --enable-ogg --enable-theora
--enable-faac --enable-mkv --enable-freetype --disable-cddax --disable-vcdx
--enable-speex --enable-flac --enable-goom --enable-livedotcom --enable-caca
--disable-skins2 --disable-wxwidgets --enable-modplug --enable-daap --enable-x264
--enable-shout --enable-twolame --enable-release --enable-dts --disable-mkv
--with-cyberlink-tree=/Users/skonno/src/clinkcc --enable-cyberlink

$ cp vlc-config vlc-config.org
$ vi vlc-config
$ diff -r vlc-config.org vlc-config
275c275
< ldflags="${ldflags} /Users/skonno/src/clinkcc/lib/unix/libclink.a -lexpat"
---
> ldflags="${ldflags} /Users/skonno/src/clinkcc/lib/unix/libclink.a -lexpat -liconv"
$make

$cd /Users/skonno/Application/VLC.app/Contents/MacOS/modules
$cp /Users/skonno/src/vlc-0.8.4a/modules/services_discovery/libupnp_plugin.dylib .

$cd /Users/skonno/Application/VLC.app/Contents/MacOS/
$gdb VLC
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x0000000c
[Switching to process 26361 thread 0x6203]
0x03968fe8 in UPnPHandler::deviceSearchResponseReceived ()
(gdb) where
#0 0x03968fe8 in UPnPHandler::deviceSearchResponseReceived ()
#1 0x0396d438 in CyberLink::ControlPoint::performSearchResponseListener
(this=0xf0509c88, ssdpPacket=0x64616ec)
at ../../src/cybergarage/upnp/ControlPoint.cpp:279
#2 0x03992750 in CyberLink::SSDPSearchResponseSocket::run (this=0x64616d0)
at ../../src/cybergarage/upnp/ssdp/SSDPSearchResponseSocket.cpp:54
#3 0x03993a7c in PosixThreadProc (param=0xf0509c88)
at ../../src/cybergarage/util/Thread.cpp:72
#4 0x9002b200 in _pthread_body ()

Thursday, February 02, 2006


VLC : I have checked to compile with the upnp module on WindowsXP as the following step. I could compile the module normally, but the VLC could not recognize the module X-<.

It seems that I have to add some changes the main binary or the configuration to recognize the module or the command line option
$ tar xvfz expat-2.0.0.tar.gz
$ cd expat-2.0.0
$ export CC="gcc -mno-cygwin"
$ export CXX="g++ -mno-cygwin"
$ ./configure
$ make
$ mkdir -p /usr/win32/include
$ mkdir -p /usr/win32/lib
$ cp lib/*.h /usr/win32/include
$ cp libexpat.la /usr/win32/lib/
$ cp -r .libs/ /usr/win32/lib/

$ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/clinkcc login 
$ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/clinkcc co -P clinkcc
$ cd clinkcc
$ export CC="gcc -mno-cygwin"
$ export CXX="g++ -mno-cygwin"
$ export CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml -D_WIN32_WINNT=0x501"
$ export LDFLAGS=-L/usr/win32/lib
$ ./boostrap
$ ./configure --enable-expat
$ make

$ gcc --version
gcc (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
$ tar xjfv contrib-20060113-win32-bin-gcc-3.4.4-only.tar.bz2 -C /
$ tar xjvf vlc-0.8.4a.tar.bz2
$ cd vlc-0.8.4a
$ export PKG_CONFIG_PATH=/usr/win32/lib/pkgconfig
$ export CC="gcc -mno-cygwin"
$ export CXX="g++ -mno-cygwin"
$ export CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml"
$ export LDFLAGS=-L/usr/win32/lib
$ ./boostrap
$ ./configure
--disable-gtk
--enable-nls --disable-sdl
--enable-ffmpeg --with-ffmpeg-mp3lame --with-ffmpeg-faac
--with-ffmpeg-zlib --enable-faad --enable-flac --enable-theora
--with-wx-config-path=/usr/win32/bin
--with-freetype-config-path=/usr/win32/bin
--with-fribidi-config-path=/usr/win32/bin
--enable-caca --with-caca-config-path=/usr/win32/bin
--with-xml2-config-path=/usr/win32/bin
--disable-cddax --disable-vcdx --enable-goom
--enable-twolame --enable-dvdread
--enable-debug
--disable-sdl --disable-wxwidgets --disable-skins2 --disable-dvdnav
--enable-cyberlink --with-cyberlink-tree=/cygdrive/c/src/clinkcc
$ cp vlc-config vlc-config.org
$ vi vlc-config
$ diff -r vlc-config.org vlc-config
250c250
< ldflags="${ldflags} /cygdrive/c/src/clinkcc/lib/unix/libclink.a -lexpat"
---
> ldflags="${ldflags} /cygdrive/c/src/clinkcc/lib/unix/libclink.a -lpthread -lexpat -lws2_32"
$ cd modules/services_discovery/
$ make

copy C:\src\vlc-0.8.4a\modules\services_discovery\libupnp_plugin.dll C:\Program Files\VideoLAN\VLC\plugins
copy C:\src\expat-2.0.0\.libs\cygexpat-1.dll C:\Program Files\VideoLAN\VLC

C:\>cd \Program Files\VideoLAN\VLC
C:\Program Files\VideoLAN\VLC>vlc -v -S upnp

This page is powered by Blogger. Isn't yours?