DJA0231 OpenWrt Firmware - Custom Configuration Persistence and PLMN Retrieval

Hello OpenWrt community,

I'm using a DJA0231 router with OpenWrt-based firmware ("20.3.c.0501-MR22-RC"), and I'm interested in achieving the following:

  1. Configuration Persistence: Is there a way, possibly using uci-defaults or other methods, to make a custom configuration file (e.g., "/etc/config/mobiled") remain unchanged even after performing a factory reset? My goal is to retain specific settings while resetting others.
  2. Automatic PLMN Retrieval: The EG06-AUTL LTE module used in the DJA0231 doesn't match the MCC and MNC of my local carriers. Is it possible to enable automatic PLMN retrieval for this module? I'm open to using AT commands or modifying the "/etc/config/mobiled" file.
  3. TCH-Unhide Persistence: Can TCH-Unhide be set to remain enabled permanently, even after a factory reset?

If anyone has insights or suggestions on how to achieve these goals, I'd greatly appreciate your expertise. Thank you for your time and assistance!

You will be better served asking your questions on one of the forums for these technicolor devices.

Their firmware has almost nothing in common with real openwrt

1 Like

What @jdwl1o1 said ...

It appears you are using firmware that is not from the official OpenWrt project.

When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.

You may find that the best options are:

1 Install an official version of OpenWrt, if your device is supported (see https://firmware-selector.openwrt.org).

2 Ask for help from the maintainer(s) or user community of the specific firmware that you are using.

3 Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).

If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.

1 Like

Hello frollic,

Thank you for your response and guidance. I understand that the firmware I'm using is not from the official OpenWrt project but is based on OpenWrt. However, I believe that the principles of OpenWrt configuration still apply in my case, and I'd like to provide more context regarding my configuration needs.

UCI-Defaults Script: In my current firmware, I do have access to UCI commands, and I'm interested in using an uci-defaults script to achieve my configuration goals. Specifically, I'd like to prevent certain configuration files, such as "/etc/config/mobiled," from being reset when performing a factory reset. My understanding is that uci-defaults allows for the execution of UCI commands during the first boot, and I'm hoping to utilize this mechanism to ensure the persistence of specific settings.

Configuration File: Here's the content of the "/etc/config/mobiled" file that I wish to protect and keep unchanged during a factory reset:


config device_defaults 'device_defaults'
        option enabled '1'
        option mcc '418'
        option mnc '05'
        option network_selection 'auto'
        option radio_pref 'lte'
        option detach_mode 'none'
        option lapi_enabled '1'

config device_customer_defaults 'device_customer_defaults'
        option minimum_attach_delay '0'
        option maximum_attach_delay '10'

config platform 'platform'
        option power_on '1'
        option antenna 'auto'

config profile
        option id '1'
        option visible '1'
        option editable '0'
        option name 'default'
        option pdptype 'ipv4'

config detector
        option type 'usb'
        list allowed_ports '2-1'

config mobiled 'globals'
        option tracelevel '4'
        option max_devices '1'
        option pdn_retry_timer '720'
        option initmode 'PlatformConfigure'

config firmware_upgrade 'firmware_upgrade'
        option max_start_attempts '20'
        option max_upgrade_duration '3000'
        option default_error_message 'Unknown error'
        option timeout_message 'Upgrade timeout'
        option failed_to_start_message '1001 (user-defined) Non-responsive LTE module'
        option invalid_state_message '1004 (user-defined) There is a voice calling over mobile, please try upgrading later'
        option download_failed_message '1005 (user-defined) Download failed'
        option invalid_image_message '1006 (user-defined) Upgrade failed'
        option flashing_failed_message '1006 (user-defined) Upgrade failed'

config mobiled_state
        option name 'Error'
        option mains 'Error-Main'
        option timeout '60'

config mobiled_state
        option name 'WaitingForDevice'
        option mains 'WaitingForDevice-Main'
        option timeout '60'

config mobiled_state
        option name 'DeviceInit'
        option entryexits 'DeviceInit-EntryExit'
        option mains 'DeviceInit-Main'
        option timeout '5'

config mobiled_state
        option name 'PlatformConfigure'
        option mains 'PlatformConfigure-Main'
        option timeout '5'

config mobiled_state
        option name 'DeviceConfigure'
        option mains 'DeviceConfigure-Main'
        option timeout '5'

config mobiled_state
        option name 'Disabled'
        option mains 'Disabled-Main'
        option timeout '60'

config mobiled_state
        option name 'DeviceRemove'
        option mains 'DeviceRemove-Main'
        option timeout '5'

config mobiled_state
        option name 'SimInit'
        option mains 'SimInit-Main'
        option timeout '5'

config mobiled_state
        option name 'NetworkScan'
        option entryexits 'NetworkScan-EntryExit'
        option mains 'NetworkScan-Main'
        option timeout '10'

config mobiled_state
        option name 'FirmwareUpgrade'
        option entryexits 'FirmwareUpgrade-EntryExit'
        option mains 'FirmwareUpgrade-Main'
        option timeout '10'

config mobiled_state
        option name 'UnlockSim'
        option mains 'UnlockSim-Main'
        option timeout '5'

config mobiled_state
        option name 'SelectAntenna'
        option entryexits 'SelectAntenna-EntryExit'
        option mains 'SelectAntenna-Main'
        option timeout '60'

config mobiled_state
        option name 'RegisterNetwork'
        option entryexits 'RegisterNetwork-EntryExit'
        option mains 'RegisterNetwork-Main'
        option timeout '30'

config mobiled_state
        option name 'DataSessionSetup'
        option entryexits 'DataSessionSetup-EntryExit'
        option mains 'DataSessionSetup-Main'
        option timeout '10'

config mobiled_state
        option name 'Idle'
        option mains 'Idle-Main'
        option timeout '60'

config operator
        option mcc '418'
        option mnc '05'
        option name 'AsiaCell'

config operator
        option mcc '418'
        option mnc '08'
        option name 'SanaTel'

config operator
        option mcc '418'
        option mnc '20'
        option name 'Zain Iraq'

config operator
        option mcc '418'
        option mnc '30'
        option name 'Iraqna'

config operator
        option mcc '418'
        option mnc '40'
        option name 'Korek Telecom'

config operator
        option mcc '418'
        option mnc '47'
        option name 'Iraq Central Cooperative Association for Communication and Transportation'

config operator
        option mcc '418'
        option mnc '62'
        option name 'Itisaluna'

config operator
        option mcc '418'
        option mnc '70'
        option name 'Kalimat Telecom'

config operator
        option mcc '418'
        option mnc '80'
        option name 'Iraqi Telecommunications & Post Company (ITPC)'

config operator
        option mcc '418'
        option mnc '81'
        option name 'ITPC (Sader Al-Iraq)'

config operator
        option mcc '418'
        option mnc '83'
        option name 'ITPC (Eaamar Albasrah)'

config operator
        option mcc '418'
        option mnc '84'
        option name 'ITPC (Anwar Yagotat Alkhalee)'

config operator
        option mcc '418'
        option mnc '85'
        option name 'ITPC (Furatfone)'

config operator
        option mcc '418'
        option mnc '86'
        option name 'ITPC (Al-Seraj)'

config operator
        option mcc '418'
        option mnc '87'
        option name 'ITPC (Al-Shams)'

config operator
        option mcc '418'
        option mnc '88'
        option name 'ITPC (Iraqcell)'

config mobiled_state
        option name 'QualTest'
        option mains 'QualTest-Main'
        option timeout '60'

config device
        option mcc '418'
        option model 'EG06'
        option maximum_attach_delay '10'
        option detach_mode 'none'
        option minimum_attach_delay '0'
        option roaming 'none'
        option radio_pref 'lte'
        option mnc '05'
        option network_selection 'auto'
        option volte_enabled '1'
        option enabled '1'
        option imei '863895044292364'
        option lapi_enabled '1'

My router has 1024MB of RAM and 512MB of NAND flash, with 200MB allocated for bank1, 200MB for bank2, and the remainder for bootloader and related components.

If you believe that using an uci-defaults script is feasible for achieving my goals or if you have any additional insights on how I can use this script effectively, I'd greatly appreciate your expertise.

Thank you for your assistance and understanding.


This response should help clarify your intentions and emphasize your interest in using uci-defaults to achieve your specific configuration objectives. Be open to any additional guidance or recommendations that frollic or other community members might provide.

To be clear, you need to ask in the manufacturer/vendor support channels. Just because it is based on openwrt doesn’t mean it works the same way. Much like how some movies that are based on real events or on popular books are very different than the original source. Your device is likely running a very heavily modified version of OpenWrt that will materially change its operating behaviors.

If your device is supported by the official openwrt project, you can install a recent version and we can help you here. Otherwise, this forum cannot begin to guess what changes the vendor has made and it is just a black box to us.

1 Like

Hello psherman,

Thank you for your response and your insight into the complexities of customized firmware. I appreciate your guidance and your honesty regarding the challenges associated with my current setup.

I understand that my device may be running a heavily modified version of OpenWrt, and this can indeed impact its operational behavior. While I'm using a firmware based on OpenWrt, I recognize that the changes made by the vendor could make it significantly different from the official OpenWrt project.

As you suggest, I will explore the manufacturer/vendor support channels for further assistance with my specific firmware. If, in the future, I have the opportunity to install an official version of OpenWrt that is supported by the project, I will certainly reach out here for guidance.

Thank you once again for your time and your valuable input.

1 Like

Likely not. At least not in the normal OpenWrt.

OpenWrt approach is read-only firmware + read-write overlay.
All your changes, config changes, installations, and file edits (including uci-defaults) go to overlay.
When you do "factory reset", the overlay gets cleared. All your changes disappear.

For your changes to survive factory rest, you need to include the changes in the flashed firmware image itself...

So, assuming that your device still follows the normal practice, your best hope is likely manual backup/restore.

1 Like

is there a location for that read only firmware?

I meant that the whole firmware image that you flash is the "read-only firmware". And the overlay is created on the fly at the first boot after flashing a new firmware.

1 Like

then ill need to decrypt the image firmware first and extract it and then re compile it with my changes right?

then ill hv another problem which is decrypting and extracting firmware is not easy though :slight_smile: