Comments (7)
Alan, sorry to bother - any change you could update nuget with the latest version please?
from mono.nat.
Sorry!
from mono.nat.
Huh, bonkers!
Could you capture the whole set of requests/responses? The shape of the response is somewhat dependent on the shape of the request. I'll double check this anyway in case there's an obvious issue!
from mono.nat.
Ah it's actually an easy one - the response is invalid. This is a proper response. Please ignore the escaping in the string, i just pulled it straight from the debugger:
"<?xml version=\"1.0\"?>\r\n<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:DeletePortMappingResponse xmlns:u=\"urn:schemas-upnp-org:service:WANIPConnection:1\"></u:DeletePortMappingResponse></s:Body></s:Envelope>\r\n"
The xml namespace for the 'DeletePortMappingResponse' element is supposed to be the service type. In my case it's WANIPConnection:1
. Your device has a broken response and sets the namespace to DeletePortMapping
. I'm not really sure how this should be handled. I'll have to review the spec and see if this is actually a feature of a newer version of the spec.
What is the service type for your device?
from mono.nat.
It's a real funny device - fibre dsl router with build in wifi.
Would be surprised as far as the response not being standard. It's ISP provided so will be as cheap as they come!
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns="urn:schemas-upnp-org:device-1-0" configId="1337">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:schemas-upnp-org:device:InternetGatewayDevice:1</deviceType>
<friendlyName>EE Smart Hub</friendlyName>
<manufacturer>EE</manufacturer>
<manufacturerURL>http://www.ee.co.uk/</manufacturerURL>
<modelDescription>EE Smart Hub 6.0B</modelDescription>
<modelName>EE Smart Hub 6.0B</modelName>
<modelNumber>1</modelNumber>
<modelURL>http://eehub.home</modelURL>
<serialNumber>+EEH001+1903011269</serialNumber>
<UDN>uuid:32c7b261-fdb8-43f2-99a1-9ec907178949</UDN>
<deviceList>
<device>
<deviceType>urn:schemas-upnp-org:device:WANDevice:1</deviceType>
<friendlyName>WANDevice</friendlyName>
<manufacturer>EE</manufacturer>
<manufacturerURL>http://www.ee.co.uk/</manufacturerURL>
<modelDescription>EE Smart Hub 6.0B</modelDescription>
<modelName>EE Smart Hub 6.0B</modelName>
<modelNumber>1</modelNumber>
<modelURL>http://eehub.home</modelURL>
<serialNumber>+EEH001+1903011269</serialNumber>
<UDN>uuid:32c7b261-fdb8-43f2-99a1-9ec90717894a</UDN>
<UPC>000000000000</UPC>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1</serviceType>
<serviceId>urn:upnp-org:serviceId:WANCommonIFC1</serviceId>
<controlURL>/32c7b261/ctl/CmnIfCfg</controlURL>
<eventSubURL>/32c7b261/evt/CmnIfCfg</eventSubURL>
<SCPDURL>/32c7b261/WANCfg.xml</SCPDURL>
</service>
</serviceList>
<deviceList>
<device>
<deviceType>urn:schemas-upnp-org:device:WANConnectionDevice:1</deviceType>
<friendlyName>WANConnectionDevice</friendlyName>
<manufacturer>EE</manufacturer>
<manufacturerURL>http://www.ee.co.uk/</manufacturerURL>
<modelDescription>EE Smart Hub 6.0B</modelDescription>
<modelName>EE Smart Hub 6.0B</modelName>
<modelNumber>1</modelNumber>
<modelURL>http://eehub.home</modelURL>
<serialNumber>+EEH001+1903011269</serialNumber>
<UDN>uuid:32c7b261-fdb8-43f2-99a1-9ec90717894b</UDN>
<UPC>000000000000</UPC>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:WANPPPConnection:1</serviceType>
<serviceId>urn:upnp-org:serviceId:WANPPPConn1</serviceId>
<controlURL>/32c7b261/ctl/PPPConn</controlURL>
<eventSubURL>/32c7b261/evt/PPPConn</eventSubURL>
<SCPDURL>/32c7b261/WANPPPCn.xml</SCPDURL>
</service>
</serviceList>
</device>
</deviceList>
</device>
</deviceList>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:Layer3Forwarding:1</serviceType>
<serviceId>urn:upnp-org:serviceId:L3Forwarding1</serviceId>
<SCPDURL>/32c7b261/L3F.xml</SCPDURL>
<controlURL>/32c7b261/ctl/L3F</controlURL>
<eventSubURL>/32c7b261/evt/L3F</eventSubURL>
</service>
</serviceList>
<presentationURL>http://eehub.home</presentationURL>
</device>
</root>
from mono.nat.
@BaronGreenback I released what's in master as of now as v3.0.0. There was an API break which necessitated a major version change.
However, i don't know how to fully resolve the issue you're facing with your router yet. To figure this one out I'd need the full sequence of request/response messages in a single log file.
It looks like whoever created that xml response literally hardcoded the strings, including the xmlns prefixes, rather than construct a proper response. The response has u:
prefixes but there's no namespace declaration which tells the xml parse what u:
actually means. there should be something like: xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1"
but it's not there!
from mono.nat.
Thanks!
I totally understand what you mean about the xml - i've been doing some dlna to my sharp tv - and i've had to write a "loose" parser as they return questionable xml to say the least.
Wouldn't worry about the xml at the moment. As soon as i've finished my current PR - i'll do a network trace and post you the results.
from mono.nat.
Related Issues (14)
- Unable to connect to the external server HOT 1
- How to use it?) HOT 11
- Unable to create any port mapping. HOT 27
- Add support for Port Control Protocol
- Issue with UpnpSearcher.cs HOT 15
- Replace HttpWebRequest with HttpClient HOT 1
- Dot net foundation induction HOT 2
- Creating a port map does not error on duplicate mappings
- Device.CreatePortMapAsync(Mapping) creates a deadlock HOT 2
- Router as mesh repeater returns empty external IP HOT 1
- [Feature Request] Expose ISearcher and the searcher types or something similar publicly for DI (among other things)
- Port mapping not working until router reload
- Documentation???? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mono.nat.