Reply
Thread Tools
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#21
Not sure if related but:
in log there is two times restricted mode set to 1.
concerning background connection and roaming connection.
So if you have background connection set to off that could explain the disconnect (but not the 'reset to manually used'). Do you have background connection (on overall internet connection page) enabled?



Originally Posted by ginggs View Post
...
I have also tried the alternative method of pressing and holding on the connection on the 'Edit networks' page and selecting 'Use automatically' from the menu that pops up.
AND learned something new about N9 UI

I ran 'strings' on /usr/sbin/icd2
strings directly on N9??? (which package?) I have it only for N900.
Or ran from PC?
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 
ginggs's Avatar
Posts: 306 | Thanked: 582 times | Joined on Mar 2012
#22
Originally Posted by peterleinchen View Post
Not sure if related but:
in log there is two times restricted mode set to 1.
concerning background connection and roaming connection.
So if you have background connection set to off that could explain the disconnect (but not the 'reset to manually used'). Do you have background connection (on overall internet connection page) enabled?
I have 'Allow background connections' enabled for both 'Mobile data connection and WLAN' and 'Mobile data connection when roaming'.

Originally Posted by peterleinchen View Post
strings directly on N9??? (which package?) I have it only for N900.
Or ran from PC?
I ran a grep on the N9 looking for 'connectivity-test', then copied /usr/sbin/icd2 over to my PC and rans strings there.
 
ginggs's Avatar
Posts: 306 | Thanked: 582 times | Joined on Mar 2012
#23
Originally Posted by ginggs View Post
Maybe I just need to return the correct HTTP response code?
Yes, I modified the code as follows and it seems to have done the trick!
Code:
<?php
$headers = apache_request_headers();

if(isset($headers['X-Nokia-WLAN-Connectivity-Test']))
{
    http_response_code(204);
    exit();
}
?>
<html><body>WLAN Connectivity Test</body></html>
204 is the HTTP response code for No Content.

I guess this is how the N9 detects whether it has hit a wifi hotspot landing page; a landing page would inject some content and not return 204.

I'll try to host this somewhere and test it for a few days,
 

The Following 4 Users Say Thank You to ginggs For This Useful Post:
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#24
Thanks ginggs!

How did you think of 204?
I spent the evening with trying/altering response as from that other symbian user host. With 200 OK but to no avail.

I got it working with a local " host "
atm just with a few terminals open but should be doable with a 'service'
gimme a bit more time and I post local solution, so no need for a www host.

Bug definitely a big THANKS for that No Content!


(another example that Nokia chose the more close way -see Aegis- by using such proprietary solution, a simple if-up.d script should have it done also, right)
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 
ginggs's Avatar
Posts: 306 | Thanked: 582 times | Joined on Mar 2012
#25
Originally Posted by peterleinchen View Post
How did you think of 204?
I disassembled /usr/sbin/icd2 and found:

Code:
.text:000220C4                 CMP     R7, R9
.text:000220C8                 BGT     loc_22138
.text:000220CC                 CMP     R7, #300
.text:000220D0                 BGT     loc_22164
.text:000220D4                 CMP     R7, #200
.text:000220D8                 BEQ     loc_22164
.text:000220DC                 CMP     R7, #204
.text:000220E0                 BNE     loc_22144
.text:000220E4                 MOV     LR, #1
.text:000220E8                 STR     LR, [R10,#0xA4]
.text:000220EC                 LDR     R12, [R4,#0x40]
.text:000220F0                 CMP     R12, #0
.text:000220F4                 BEQ     loc_222C0
I had been thinking about the '200 OK' response code, so when I saw 300, 200 and 204 together, I looked up what 204 meant.

Originally Posted by peterleinchen View Post
I got it working with a local " host "
atm just with a few terminals open but should be doable with a 'service'
gimme a bit more time and I post local solution, so no need for a www host.
How will you detect a wifi hotspot landing page without a www host?
 

The Following 5 Users Say Thank You to ginggs For This Useful Post:
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#26
Very good find

I will for sure not be able to detect a landing page automatically.
But do we (really) need that convenience functionality? If we need to log in on a landing page we will be directed by first using the browser (or we will know that already by location!).

It would be nice if you set up this small http service and I might think about using it.
But I also would like to keep it locally. Not spreading out info where my device is located at which time (only a bit privacy paranoid not as much as not using the www). If I would have known that earlier ...

Made a daemon running socat on localhost with required response.
Disclaimer: all done on Open Mode kernel!

Untar to /. Or put socat (executable) to /usr/bin and connectivity*.conf to /etc/init/apps. And start daemon with /sbin/initctl start apps/custom-fake-connectivity-test.
Oh, and ofc add
127.0.0.1 connectivity-test.ext.nokia.com
to /etc/hosts.
Attached Files
File Type: gz connectivity-test.tar.gz (83.5 KB, 204 views)
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature

Last edited by peterleinchen; 2015-12-26 at 23:05. Reason: added files
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
Posts: 1,288 | Thanked: 4,316 times | Joined on Oct 2014
#27
Great work Guys?
Another example of what this forums members are capable of!
 
Posts: 1,288 | Thanked: 4,316 times | Joined on Oct 2014
#28
Originally Posted by ginggs View Post
I disassembled /usr/sbin/icd2 and found:

Code:
.text:000220C4                 CMP     R7, R9
.text:000220C8                 BGT     loc_22138
.text:000220CC                 CMP     R7, #300
.text:000220D0                 BGT     loc_22164
.text:000220D4                 CMP     R7, #200
.text:000220D8                 BEQ     loc_22164
.text:000220DC                 CMP     R7, #204
.text:000220E0                 BNE     loc_22144
.text:000220E4                 MOV     LR, #1
.text:000220E8                 STR     LR, [R10,#0xA4]
.text:000220EC                 LDR     R12, [R4,#0x40]
.text:000220F0                 CMP     R12, #0
.text:000220F4                 BEQ     loc_222C0
I had been thinking about the '200 OK' response code, so when I saw 300, 200 and 204 together, I looked up what 204 meant.


How will you detect a wifi hotspot landing page without a www host?
That! Is a good find.
Should be fixable by patching out those cmp instructions directly in the binary.

I think replacing

Code:
 CMP     R7, #204
BNE     loc_22144
With

Code:
MOV r0, r0  (0xe1a00000)
which is NOP should work, and no need for the service then.

Last edited by nieldk; 2015-12-27 at 07:56.
 

The Following 3 Users Say Thank You to nieldk For This Useful Post:
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#29
Yep, pretty good idea.
Just hexed through the binary but was unable to find the correct location ... Then I remembered something about ELF binaries that they are compressed on ROM and getting uncompressed in memory (for what reason nowadays? to save Nokia some 0.00x cent per device? D*#n capitalism ). Oh good ol' Symbian times
Unfortunately I did not find my old Symbian tools
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
Posts: 1,288 | Thanked: 4,316 times | Joined on Oct 2014
#30
Originally Posted by peterleinchen View Post
Yep, pretty good idea.
Just hexed through the binary but was unable to find the correct location ... Then I remembered something about ELF binaries that they are compressed on ROM and getting uncompressed in memory (for what reason nowadays? to save Nokia some 0.00x cent per device? D*#n capitalism ). Oh good ol' Symbian times
Unfortunately I did not find my old Symbian tools
Hmm will look at this later...
perhaps @ginggs have input on this?

I suppose upx can be helpfull ...

Last edited by nieldk; 2015-12-27 at 11:47. Reason: spelling
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 10:30.