setup MTU in Movian RPI or startup script.
Added by Dmitry Petrov about 7 years ago
How to setup MTU in Movian RPI or start some script during startup?
When I was using movian on PS3 there was no problem with MTU because PS3 allowed to setup it in network configuration.
Movian is using connman which does not allow to setup MTU and EVEN WORSE!
This connection manager does not take MTU from DHCP.
My DHCP manages MTU on my network and standard Linux machines take this setting from DHCP.
Replies (16)
RE: setup MTU in Movian RPI or startup script. - Added by Anonymous about 7 years ago
I'm going to take a guess and say that if you have it hooked to your router, you could allow it to control the MTU for the Pi.
I have options to control my Jumbo Frame settings and streaming from NAS to Pi worked very well.
I'm using open source firmware so it may vary for you from router to router but check the attached images.
MTU.PNG (10.1 KB)
Jumbo Frames.PNG (9.22 KB)
RE: setup MTU in Movian RPI or startup script.
-
Added by Dmitry Petrov about 7 years ago
My professional router AT-AR440S does manage MTU via DHCP on LAN.(option 26)
The problem is that ConnMan does not take this option from my DHCP server neither makes MTU discovery.
Would be nice to fix ConnMan in the manner all standard Linux systems work or make autostart.sh somewhere in persistent system or even on the FAT partition which executes before showtime.
I believe the best place for the script would be /tmp/stos/persistent/showtime/autostart.sh which is run after system startup but before showtime itself.
RE: setup MTU in Movian RPI or startup script.
-
Added by Dmitry Petrov about 7 years ago
ConnMan's guys on IRC channel promised to fix MTU from DHCP issue today.
Anyway the autostart.sh is still desired.
RE: setup MTU in Movian RPI or startup script.
-
Added by Andreas Smas about 7 years ago
Dmitry Petrov wrote:
ConnMan's guys on IRC channel promised to fix MTU from DHCP issue today.
Cool, i read the scrollback (i'm also in #connman but not saying much)
Anyway the autostart.sh is still desired.
Yeah, I agree, I'll try to add something
RE: setup MTU in Movian RPI or startup script.
-
Added by Andreas Smas about 7 years ago
Good news for you my friend!
In latest stos (2.3.7) (You will get it if you upgrade Movian to 4.99.808) it will run a script during boot (Just before Movian starts)
Example:
# cat /stos/persistent/scripts/boot.sh #!/bin/sh sleep 3 ifconfig eth0 mtu 1460
Will result in:
# ifconfig eth0|grep MTU UP BROADCAST RUNNING MULTICAST MTU:1460 Metric:1
Remember that the script must be executable: chmod 755 boot.sh
Also I added a sleep in the script when testing it because the splash screen will show "Running boot script" while executing the script, and if the script is too quick the text will just flicker by. Maybe the sleep is needed also depending on how fast connman sets up the interface. I'm not sure TBH, but this should get you started.
RE: setup MTU in Movian RPI or startup script.
-
Added by Dmitry Petrov about 7 years ago
Thanks a lot!
It is working without any delay/sleep.
To run something on boot is really useful thing not only to setup networking interfaces but usually for the most workarounds.
For example on KODI I setup timeservers when there was a bug in it.
Timerserver is also a very big issue because RPI does not have RTC.
Now I quit from KODI after found Movian for RPI but there is still some cool things to get from KODI to implement on Movian.
For Example setting up Display during Playback via XML templates:
Each template consists of what to show and where in different modes like in Movian: Standard, Enter, F2, F4, F6
I configured there in "Standard mode" to show clock() in the upper right corner always because my wife required it.
Hope one day it will arrive to Movian...
RE: setup MTU in Movian RPI or startup script.
-
Added by nikkpap (Nikos) almost 7 years ago
auto startup script can some one make on for rpi static ip please
RE: setup MTU in Movian RPI or startup script.
-
Added by Dmitry Petrov almost 7 years ago
should be something like this:
connmanctl services
(write down your interface's name) = "IF" (something like ethernet_b827eb3110d9_cable)
vi /tmp/stos/persistent/scripts/boot.sh
Press "i" and type
#!/bin/sh
connmanctl service config "IF" --ipv4 manual <address> <netmask> <gateway> --nameservers <dns1> [<dns2>] [<dns3>]
Press "Esc":wq
chmod a+x /tmp/stos/persistent/scripts/boot.sh
I did not test this
RE: setup MTU in Movian RPI or startup script.
-
Added by nikkpap (Nikos) almost 7 years ago
thanks for the replay...
but i cant login via ftp to rpi anymore i use a my pass and username with filezila on mac os x
the only path i can access is a folder with this file README.txt
This is Movian's exported file system
Items on home screen and in 'Local network' that contain files and
folders will appear here
by ssh with root - showtime
i have no script folder on persistent folder do i have to create one?
README.TXT
(131 Bytes)
Screen Shot 2016-04-18 at 18.28.04.png (21.4 KB)
RE: setup MTU in Movian RPI or startup script.
-
Added by Dmitry Petrov almost 7 years ago
yes, create scripts folder in persistent
RE: setup MTU in Movian RPI or startup script.
-
Added by Andreas Smas almost 7 years ago
Seems the MTU from DHCP has been added to connman.
This commit made it into connman 1.32
I will upgrade STOS and make some tests
RE: setup MTU in Movian RPI or startup script.
-
Added by Andreas Smas almost 7 years ago
Here is a new rootfs with connman 1.32: https://movian.tv/static/rootfs-with-connman-1.32.sqfs
Dmitry, please download this and replace rootfs.sqfs on the FAT partition (/boot) on your rpi and test, see if it fixes your MTU problems without you needing your script.
Thanks,
Andreas
RE: setup MTU in Movian RPI or startup script.
-
Added by Dmitry Petrov almost 7 years ago
I confirm it is working on Eth as well as on Wi-Fi.
Thanks. God bless us.
RE: setup MTU in Movian RPI or startup script.
-
Added by Dmitry Petrov almost 7 years ago
I forgot to tell.
Please do not remove boot.sh capability!
It is very useful for other things.
Thanks!
RE: setup MTU in Movian RPI or startup script.
-
Added by Andreas Smas almost 7 years ago
Dmitry Petrov wrote:
I confirm it is working on Eth as well as on Wi-Fi.
Thanks. God bless us.
Ah good!
RE: setup MTU in Movian RPI or startup script.
-
Added by Andreas Smas almost 7 years ago
Dmitry Petrov wrote:
I forgot to tell.
Please do not remove boot.sh capability!
It is very useful for other things.
Yes, I agree. It will stay.
(1-16/16)