Justement, je n'ai pas de sauvegarde de ce fichier (omcid.sh),
Tu n'as pas besoin d'avoir une sauvegarde. Si tu veux le remettre à sa valeur d'origine, tu fais "firstboot + reboot".
Ou bien, tu récupères ton fichier dans "/rom".
je te demande son contenu pour remettre le miens d'origine si jamais je l'ai modifié.
Voici mon fichier "/etc/init.d/omcid.sh" :
#!/bin/sh /etc/rc.common
# Copyright (C) 2011 OpenWrt.org
# Copyright (C) 2011 lantiq.com
. $IPKG_INSTROOT/lib/falcon.sh
START=85
OMCID_BIN=/opt/lantiq/bin/omcid
status_entry_create() {
local path=$1
local base=`basename $path`
local dir=`dirname $path`
touch $path
uci -c $dir set $base.ip_conflicts=status
uci -c $dir set $base.dhcp_timeouts=status
uci -c $dir set $base.dns_errors=status
}
wait_for_jffs()
{
while ! grep overlayfs:/overlay /proc/self/mounts >/dev/null
do
sleep 1
done
}
is_flash_boot()
{
grep overlayfs /proc/self/mounts >/dev/null
}
start() {
#(
local mib_file
local omcc_version
local tmp
local omci_iop_mask
local lct=""
config_load omci
tmp=`fw_printenv omci_hw_ver 2>&- | cut -f2 -d=`
if [ -n "$tmp" ]; then
sed "s/256 0 HWTC 0000000000000/256 0 HWTC ${tmp}/" /rom/etc/mibs/data_1g_8q_us1280_ds512.ini > /tmp/auto_generated_
mib_file="/tmp/auto_generated_mib.ini"
else
mib_file="/rom/etc/mibs/data_1g_8q_us1280_ds512.ini"
fi
tmp=`fw_printenv mib_file_custom 2>&- | cut -f2 -d=`
if [ -f "/etc/mibs/$tmp" ]; then
mib_file="/etc/mibs/$tmp"
fi
tmp=`fw_printenv omci_omcc_ver 2>&- | cut -f2 -d=`
if [ -n "$tmp" ]; then
omcc_version=$tmp
else
omcc_version=160
fi
config_get tmp "default" "status_file" "/tmp/omci_status"
status_entry_create "$tmp"
case $(uci -q get network.lct.ifname) in
lct0)
lct=-g1
;;
lct1)
lct=-g2
;;
lct2)
lct=-g3
;;
lct3)
lct=-g4
;;
lct8)
lct=-g9
;;
esac
tmp=`fw_printenv omci_iop_mask 2>&- | cut -f2 -d=`
if [ -n "$tmp" ]; then
omci_iop_mask=$tmp
else
config_get omci_iop_mask "default" "omci_iop_mask" 0
fi
logger -t omcid "Use OMCI mib file: $mib_file"
${OMCID_BIN} -d3 -p$mib_file -o$omcc_version -i$omci_iop_mask ${lct} -l/tmp/log/debug > /dev/console 2> /dev/console &
#)&
}
stop() {
killall -q omcid
}
Je précise que j'ai bien l'Huawei SmartAX MA5671a et que je l'ai configuré par moi-même.
Rentrer ces valeurs sous une autre forme dans les ENVs ou dans l'Eeprom me semble inutile. Tu as testé de ne pas les saisir ?
Je n'ai pas que "FS Modded" pour l'Image 0. J'ai la version d'origine Huawei dans l'Image 1, et ça fonctionne aussi et je n'aimerai pas la casser. Donc oui, il est possible que je mettes trop de paramètres, mais en l'état, ça fonctionne et je n'y touche plus.
Je me suis attaché à faire une synthèse de ce que j'ai pu trouver dans le forum "LaFibre.info" pour construire mon script.
Si tu prends la liste de tous les paramètres dans le site "
hack gpon FS Modded", je n'ai fait que :
--> Flashing the firmware
--> GPON/OMCI settings
et en particulier :
--> Setting ONU GPON Serial Number
--> Setting ONU GPON PLOAM password
tout ce qui est après, je ne l'ai pas fait.
Que te donne le "Vendor_Id" et "Version" quand tu fais "omci_pipe.sh meg 256 0" ?
Voici le mien :
root@SFP:~# omci_pipe.sh meg 256 0
Class ID = 256 (ONU-G)
Instance ID = 0
Upload = yes
Alarms = 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
-------------------------------------------------------------------------------
0 Vendor id 4b STR R--A---P---
0x53 0x50 0x54 0x43
SPTC
-------------------------------------------------------------------------------
1 Version 14b STR R--A---P---
0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x00
0000000000000\x00
-------------------------------------------------------------------------------
2 Serial number 8b STR R--A---P---
0x50 0x54 0x49 0x4e 0x11 0x22 0x33 0x44
PTIN\x11\x22\x33\x44
-------------------------------------------------------------------------------
3 Traffic management opt 1b ENUM R----------
0x02 (2)
-------------------------------------------------------------------------------
4 VP/VC cc function option 1b UINT R---O------
0x00 (0)
-------------------------------------------------------------------------------
5 Battery backup 1b UINT RW-------E-
0x00 (0)
-------------------------------------------------------------------------------
6 Administrative state 1b UINT RW-------E-
0x00 (0)
-------------------------------------------------------------------------------
7 Operational state 1b UINT R--A-----E-
0x00 (0)
-------------------------------------------------------------------------------
8 ONU survival time 1b UINT R--------E-
0x00 (0)
-------------------------------------------------------------------------------
R - Readable O - Not supported (optional)
W - Writable E - Excluded from MIB upload (template)
S - set-by-create T - Table
A - Send AVC V - Volatile
U - No upload P - No swap
N - Not suported Y - Partly supported
N - No swap
errorcode=0
root@SFP:~#
J'ai modifié mon Serial Number.
Voici les vérifications supplémentaires :
root@SFP:~# fw_printenv omci_hw_ver
## Error: "omci_hw_ver" not defined
root@SFP:~#
root@SFP:~# fw_printenv mib_file_custom
## Error: "mib_file_custom" not defined
root@SFP:~#
root@SFP:~# fw_printenv mib_file
## Error: "mib_file" not defined
root@SFP:~#
Tiens d'ailleurs @artemus tu devrais tester de changer le "traffic management" pour voir si ca règle ton probleme de débit.
Il est à "2" comme chez toi.
root@SFP:~# omci_pipe.sh meg 131 0
Class ID = 131 (OLT-G)
Instance ID = 0
Upload = yes
Alarms = -
-------------------------------------------------------------------------------
0 OLT vendor id 4b STR RW-----P---
0x20 0x20 0x20 0x20
-------------------------------------------------------------------------------
1 Equipment id 20b STR RW-----P---
0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20
-------------------------------------------------------------------------------
2 Version 14b STR RW-----P---
0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20 0x20
-------------------------------------------------------------------------------
3 Time of day information 14b STR RW--O--P---
0x30 0x78 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x30
0x000000000000
-------------------------------------------------------------------------------
R - Readable O - Not supported (optional)
W - Writable E - Excluded from MIB upload (template)
S - set-by-create T - Table
A - Send AVC V - Volatile
U - No upload P - No swap
N - Not suported Y - Partly supported
N - No swap
errorcode=0
root@SFP:~#