Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Customizing /var/etc/mpd.script for proprietary modem (solved)

    Scheduled Pinned Locked Moved 2.1 Snapshot Feedback and Problems - RETIRED
    7 Posts 2 Posters 2.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      Guest
      last edited by

      Hi - My usb modem is a bit picky and answers at+cpin? requests with READY  (instead of at+cpin=?) .and
      I plan to patch /var/etc/mpd.script to take care of this.

      –-----------snip----snip ---
      Temporary adapted /var/etc/mpd.script Line 104. (linked to /usr/local/sbin)
      --------------snip---snip-----

      but im still searching for the Script which generates /var/etc/mpd_wan.conf.
      Maybe someone knows this from his Head?

      Anyway, i slowly get to know how to customize things.  I really like pfSense.

      • Tho
        cutomize.mpd.script.png_thumb
        cutomize.mpd.script.png
        cutomize.mpd.script_2.png
        cutomize.mpd.script_2.png_thumb
      1 Reply Last reply Reply Quote 0
      • D
        databeestje
        last edited by

        you'll have to look in the PHP code in /etc/inc/

        grep in that directory for part of that string and you should be able to find the code that generates the script.

        It's probably in interfaces.inc, but I've never worked on the mpd code before.

        1 Reply Last reply Reply Quote 0
        • ?
          Guest
          last edited by

          ah yes - serching for mpd interface instead of mpd_wan.config is really better.
          Found the spot in interface.inc where mpd[interface].config is written.

          Tho

          1 Reply Last reply Reply Quote 0
          • D
            databeestje
            last edited by

            That fix works for other Huawei devices I have too. Neat!

            Huawei E220, cuaU0.0, 3mbit down, 0.3 up
            Huawei E173u, cuaU0.0, 5mbit down, 1.1 up
            Huawei K3715, cuaU0.0, 5mbit down, 1.2 up

            ZTE MF190, only works on warm boot, need to disable SIM PIN because It doesn't work.

            1 Reply Last reply Reply Quote 0
            • ?
              Guest
              last edited by

              Oh - Thats cool !
              If your with me then it might be possible that yor modem answers at+cpin? with [READY} and at+cpin=?  with [OK].
              pfSense asks at+cpin=? and waits for a [READY] so when you have the time to make a cu -l /dev/cuaU0.0 (~. to end) and try it, it might make sense to accept both values in the modemscript.

              Thinking further it could be nice if we had some GUI possibility to store custom chatcommands.
              These would than be used by mpd  instead of the generic ones.
              Ill try myself on this task but cant promise :p

              hanD Tho

              1 Reply Last reply Reply Quote 0
              • D
                databeestje
                last edited by

                Huawei E270, 4.5mbit down, 1.1 up.

                1 Reply Last reply Reply Quote 0
                • ?
                  Guest
                  last edited by

                  Mmh, its motivating to see when groundwork is useful for more people :)
                  As told i started to code some gui to use for cases wher users need some further customization of pfsenses chatscripts.
                  So just some status info about some work on the frontend widgets i created for that task.

                  adv_custom_chatscript_edit.png_thumb
                  adv_custom_chatscript.png_thumb
                  adv_custom_chatscript.png
                  adv_custom_chatscript_edit.png

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.