We have moved to a new Sailfish OS Forum. Please start new discussions there.
1

Mobile access point - Can I change the WLAN gateway adress? [answered]

asked 2020-06-13 18:12:14 +0200

Andrea777 gravatar image

Xperia 10 Dual SIM, SFOS 3.3.0.16 How can I set the network adress of the mobile access point to a special IP adress, e.g. 192.168.0.1?

In my weekend house the Xperia 10 and its mobile access point function is the only internet connection I have. I have a laptop and a desktop computer and a network printer here. The desktop computer and the printer connects to the X10 by cable via a tp-link TL-WA850 network device / range extender, that has also a wired net RJ45 connector.

Everything works fine with DHCP, but the network adress given to the laptop is 172.28.172.2 and the gateway and DNS adress is 172.28.172.1 .

Can the Xperia 10 work as a router or gateway, so I can use "private" IP adresses (192.168. ....) in my home LAN?

Many thanks for information and ideas!

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by peterleinchen
close date 2020-06-18 23:43:42.837947

Comments

2 Answers

Sort by » oldest newest most voted
1

answered 2020-06-13 22:21:06 +0200

attah gravatar image

Can the Xperia 10 work as a router or gateway, so I can use "private" IP adresses (192.168. ....) in my home LAN?

Doesn't it already?

172.16.0.0 – 172.31.255.255 is a private range.

edit flag offensive delete publish link more

Comments

Thank you! I did not know about this private range, but now I know. But the private range is only the half of my problem. The other half problem remains.

Can I change the gateway adress or range, given to the clients by the Xperia 10 by DHCP, from 172.28.172.xxx to 192.168.0.xxx? If yes, what have I to do? I found no setup possibility for the Hotspot except the pre shared key. Maybe some config file deep in the system?

Andrea777 ( 2020-06-14 12:06:04 +0200 )edit
1

Okay, i didn't understand why using any private range would be different from the next, and thus why it can be a problem. What is the problem anyway? A quick grep -r in /etc suggests it may be controlled by /etc/connman/main.conf

attah ( 2020-06-14 12:10:48 +0200 )edit

The problem is: I have 2 network printers, 1 desktop computer and 1 laptop here. The printers have static IP adresses. I have 3 UMTS/4G gateways in use. One of them is the Sailfish phone. I want to match the gateway adress of the Sailfish Phone to an existing and working system and I want NOT to change all network adresses every time if changing to one of the other UMTS/4G gateways.

Because of this I am seachting for a possibility for changing the gateway + DNS adress to 192.168.0.1 and the adress range for the hosts to 192.168.0.xxx (2-254).

So I will look into the main.conf file and report later what there is and if its helpful.

Andrea777 ( 2020-06-14 12:33:09 +0200 )edit

Yes, editing IP range in /etc/connman/main.conf
and restarting connman via

systemctl restart connman

should do the trick.
Please report back...

peterleinchen ( 2020-06-14 14:36:56 +0200 )edit

I did now enter developer mode, then open this file with tIDEditor. In the line 11 was "TetheringSubnetBlock = 172.28.172.0" I changed this to 192.168.0.0 and wanted to save this. Then I got a long error message on the top of the screen. Before I could read it completely, this error message disappeared. It contained "Could not assign..." and a path that started with some /usr/share/harbour... instead of the original path /etc/connman/main.conf . I tried 3 times, always the same...

I also tried to restart in the terminal with the systemctl restart connman command, but this required a password. "Failed to restart connman.service: Interactive authentication reqiured". Have no idea what to do here...

Andrea777 ( 2020-06-18 12:31:01 +0200 )edit
0

answered 2020-06-18 15:31:49 +0200

updated 2020-06-18 15:33:08 +0200

Developer mode is not yet being root (the super user which is able to modify system files).
So it seems your are not yet ready for using terminal and change system files?

If you feel brave
go to settings - developer tools - enable ssh and give a strong password
(not really intuitive, or?)

Then in terminal first enter root mode

devel-su

and then use vi or nano or

sed -e 's/172.28.172.0/192.168.0.0/' -i /etc/connman/main.conf

But only if you are brave enough! No guaranty :)

edit flag offensive delete publish link more

Comments

This did work successfully. Now I have the adress range I wanted to have.

Thank you so much!

Andrea777 ( 2020-06-19 12:55:08 +0200 )edit

Question tools

Follow
3 followers

Stats

Asked: 2020-06-13 18:12:14 +0200

Seen: 398 times

Last updated: Jun 13 '20