https://redmine.pfsense.org/https://redmine.pfsense.org/favicon.ico?16780521162016-04-21T13:17:38ZpfSense bugtrackerpfSense Packages - Feature #6226: Add usb_modeswitch to the pfSense package repohttps://redmine.pfsense.org/issues/6226?journal_id=266312016-04-21T13:17:38ZChris Buechlercbuechler@gmail.com
<ul><li><strong>Target version</strong> deleted (<del><i>2.3.1</i></del>)</li></ul> pfSense Packages - Feature #6226: Add usb_modeswitch to the pfSense package repohttps://redmine.pfsense.org/issues/6226?journal_id=292682016-11-05T07:45:16ZDan Lundqvistbetateam.mrzaz@gmail.com
<ul></ul><p>Has this feature request stalled ?</p>
<p>There is a package that that could handle this, it is only a matter of the correct config file to use with the package.</p>
<p><a class="external" href="http://pkg.freebsd.org/freebsd:10:x86:64/release_3/All/usb_modeswitch-2.2.5.txz">http://pkg.freebsd.org/freebsd:10:x86:64/release_3/All/usb_modeswitch-2.2.5.txz</a></p>
<p>I have used it with a Huawei E8372 using the following lazy working on 2.3.2 and 2.3.2_1</p>
<p>----------------------------------------------------------------------------------------------<br />pfSense 2.3 and Huawei E8372 - Making it Work<br />For my home network I like using a small nano PC by Foxconn as my router. The down side is that the nano only has a single Ethernet port. <br />My internet is an LTE connection and the carrier provides one of the new “smart” modems in my case the Huawei E8372. Because of the lack<br />of a second Ethernet port and the risk of double NAT I want the LTE modem to be directly connected to the pfSense PC.<br />As the modem defaults to storage mode it was an interesting journey to get pfSense to make use of it. I am no expert in pfSense or FreeBSD<br />and have trawled the forums and some websites for various bits I cobbled together into something that works for me. It may not be the best<br />way so your mileage may vary. I just wanted my LTE modem to work with pfSense.</p>
<p>Some notes on the setup<br />pfSense does not like it when there are not two network adapters. You will be constantly stuck and the interfaces configuration prompt. <br />I resolved this by using a USB Ethernet adapter for the curious Trendnet TU3-ETG.<br />I enable the Secure Shell and use Bitvise to SSH to the pfSense PC so I can easily copy and paste the contents of the configuration files.</p>
<p>What is needed:<br />- usb_modeswitch (This needs to be installed from the FreeBSD repositories as it's not included in pfSense.)<br />- Shellcmd (Available via the pfSense package manager)<br />- Text editor (Nano is a nice editor you can install it from the shell with pkg install nano)</p>
<p>You will install two packages (Three if you want nano)<br />You will create two files; lte.cfg for the modem configuration & lte.sh which will be used by Shellcmd</p>
<p>Install usb_modechange</p>
<p>Beware this is not a supported configuration and this may break with updates but it is the only way I found to install usb_modeswitch</p>
<p>From the shell run the command below and install the package:<br />pkg add <a class="external" href="http://pkg.freebsd.org/freebsd:10:x86:64/release_3/All/usb_modeswitch-2.2.5.txz">http://pkg.freebsd.org/freebsd:10:x86:64/release_3/All/usb_modeswitch-2.2.5.txz</a></p>
<p>Install Shellcmd<br />From the web GUI go to System / Package Manager then select Available Packages find Shellcmd and install it.</p>
<p>Create lte.cfg file for usb_modeswitch configuration for E8372</p>
<p>Use your prefered text editor to create the modem configuration file in cd /usr/local/sbin I named the file lte.cfg</p>
<p>Modem configuration for the E8372 was found here <a class="external" href="http://www.draisberghof.de/usb_modeswitch">http://www.draisberghof.de/usb_modeswitch</a></p>
<p>Modem Configuration copy the text below and paste it in the lte.cfg file.
###################################################<br />#Huawei E8372<br />#Contributed by: ozonejunkie</p>
<p>DefaultVendor= 0x12d1<br />DefaultProduct=0x1f01</p>
<p>TargetVendor= 0x12d1<br />TargetProduct= 0x14db</p>
<p>MessageContent="55534243123456780000000000000a11062000000000000100000000000000" <br />NoDriverLoading=1
#
###################################################</p>
<p>Create lte.sh file for Script to modeswitch modem</p>
<p>The code to correctly switch your modem you can put a script file in /etc/rc.d.<br />I named mine lte.sh remember to chmod +x the lte.sh file<br />#!/bin/sh<br />/usr/local/sbin/usb_modeswitch -c /usr/local/sbin/lte.cfg<br />sleep 5</p>
<p>Any shell script can be placed in the /usr/local/etc/rc.d/ directory. The filename must end in .sh and it must be marked as executable (chmod +x lte.sh).</p>
<p>Configure Shellcmd</p>
<p>Via the web GUI go to the Services menu and select Shellcmd & click Add</p>
<p>Shellcmd Configuration</p>
<p>Command: /etc/rc.d/lte.sh<br />Shellcmd Type: earlyshellcmd<br />Description: LTE Start<br />Click Save</p>
<p>You should now be able to configure the interface via the interfaces menu.</p> pfSense Packages - Feature #6226: Add usb_modeswitch to the pfSense package repohttps://redmine.pfsense.org/issues/6226?journal_id=394282018-11-28T02:48:43Zkhaled osama
<ul></ul><p>update for pfsense 2.4.4</p>
<p>run the following command to support pfsense 2.4.4</p>
<p>pkg add <a class="external" href="http://pkg.freebsd.org/freebsd:11:x86:64/release_2/All/usb_modeswitch-2.5.2.txz">http://pkg.freebsd.org/freebsd:11:x86:64/release_2/All/usb_modeswitch-2.5.2.txz</a></p> pfSense Packages - Feature #6226: Add usb_modeswitch to the pfSense package repohttps://redmine.pfsense.org/issues/6226?journal_id=394292018-11-28T03:35:09ZRenato Botelhorenato@netgate.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="Fix #6226: Add sysutils/usb_modeswitch to the list of packages" href="https://redmine.pfsense.org/projects/pfsense/repository/2/revisions/1b988ed0e7168ada9e6260274f63fd84b15873a1">pfsense:1b988ed0e7168ada9e6260274f63fd84b15873a1</a>.</p> pfSense Packages - Feature #6226: Add usb_modeswitch to the pfSense package repohttps://redmine.pfsense.org/issues/6226?journal_id=394302018-11-28T03:43:32Zkhaled osama
<ul></ul><p>i tried on pfsense 2.4.4 with same huawei model <br />and it worked fine</p> pfSense Packages - Feature #6226: Add usb_modeswitch to the pfSense package repohttps://redmine.pfsense.org/issues/6226?journal_id=403792019-04-15T04:27:17ZSavas Yucedag
<ul></ul><p>khaled osama wrote:</p>
<blockquote>
<p>update for pfsense 2.4.4</p>
<p>run the following command to support pfsense 2.4.4</p>
<p>pkg add <a class="external" href="http://pkg.freebsd.org/freebsd:11:x86:64/release_2/All/usb_modeswitch-2.5.2.txz">http://pkg.freebsd.org/freebsd:11:x86:64/release_2/All/usb_modeswitch-2.5.2.txz</a></p>
</blockquote>
<p>I followed the above mentioned step, however usb_modeswitch doesn't work on my 2.4.4 system.</p>
<p>usb_modeswitch-2.5.2<br />Name : usb_modeswitch<br />Version : 2.5.2<br />Installed on : Sun Apr 14 13:28:28 2019 +04<br />Origin : sysutils/usb_modeswitch<br />Architecture : FreeBSD:11:amd64<br />Prefix : /usr/local<br />Categories : sysutils<br />Licenses : GPLv2<br />Maintainer : <a class="email" href="mailto:franco@opnsense.org">franco@opnsense.org</a><br />WWW : <a class="external" href="http://www.draisberghof.de/usb_modeswitch/">http://www.draisberghof.de/usb_modeswitch/</a><br />Comment : Handling Mode-Switching USB Devices<br />Annotations :<br /> FreeBSD_version: 1101001<br />Flat size : 119KiB<br />Description :<br />USB_ModeSwitch is (surprise!) a mode switching tool for controlling<br />"flip flop" (multiple device) USB gear.</p>
<p>USB_ModeSwitch makes this process easy to handle by taking the important<br />parameters from a configuration file and doing all the initialization<br />and communication stuff, with heavy help from "libusb". It is mainly<br />used automatically - via udev events and rules - to do the switch<br />without any user interaction. But it can also be run as a command line<br />tool, usually when trying to make unknown devices work with it.</p>
<p>WWW: <a class="external" href="http://www.draisberghof.de/usb_modeswitch/">http://www.draisberghof.de/usb_modeswitch/</a></p> pfSense Packages - Feature #6226: Add usb_modeswitch to the pfSense package repohttps://redmine.pfsense.org/issues/6226?journal_id=403802019-04-15T07:23:44ZJim Pingle
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li></ul><p>usb_modeswitch has been available from the pfSense (not FreeBSD) repo for months now, including in the latest release. You do not need to install it from the FreeBSD repo. If you are having a problem with using it, please post on the forum or pfSense subreddit.</p> pfSense Packages - Feature #6226: Add usb_modeswitch to the pfSense package repohttps://redmine.pfsense.org/issues/6226?journal_id=403812019-04-15T08:08:28ZSavas Yucedag
<ul></ul><p>Jim Pingle wrote:</p>
<blockquote>
<p>usb_modeswitch has been available from the pfSense (not FreeBSD) repo for months now, including in the latest release. You do not need to install it from the FreeBSD repo. If you are having a problem with using it, please post on the forum or pfSense subreddit.</p>
</blockquote>
<p>Thanks Jim,</p>
<p>I used FreeBSD repo as <a class="external" href="https://docs.netgate.com/pfsense/en/latest/cellular/known-working-3g-4g-modems.html">https://docs.netgate.com/pfsense/en/latest/cellular/known-working-3g-4g-modems.html</a> says <br />"It’s not available in the pfSense repository, but there’s an open issue which requests to add it and explains how to install the package from the FreeBSD repository." I believe this needs to be updated.</p>
<p>Best,</p>
<p>Savas</p> pfSense Packages - Feature #6226: Add usb_modeswitch to the pfSense package repohttps://redmine.pfsense.org/issues/6226?journal_id=403842019-04-15T10:44:39ZJim Pingle
<ul></ul><p>Docs have been updated.</p>