4G usb modem

You need to send the NDISDUP command to your modem.

echo 'AT^NDISDUP= 1,1,"<APN>"' > /dev/cuaU0

Of course, you must replace <APN> by the APN of your ISP.

Many thanks!

echo 'AT^NDISDUP= 1,1,"internet"' > /dev/cuaU0

did the trick for me.

Is this something I need to do everytime I insert the modem and how would I automate it?

Also how do accommodate routing to this ISP?
 
and how would I automate it?
That is why I opened this thread at the beginning ;). I wanted someone to tell me how to do it right, in the FreeBSD way.

If you just want to plug this modem from time to time, creating a devd rule should be enough.

Also how do accommodate routing to this ISP?
That depends on what you want to achieve.
My ADSL connection is very slow and I added this modem on my nanoBSD router to increase the bandwith. That means that I need to deal with two "default gateways", and that is why I opened this other thread : https://forums.freebsd.org/threads/multiple-default-gateways.67299

If you do need to use two different routing tables, you will have to be more specific because I do not see what your problem could be.
 
I've temporarily given up on trying to get my stick modem configured properly and just tried my Hilink modem which I've been unable to get to get working on my current FreeBSD installation. To my amazement it worked once I ran dhclient ue0 and got the following result using speedtest:-
root@Vbox:~ # speedtest
Retrieving speedtest.net configuration...
Testing from Play (5.173.168.128)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by NETIA S.A. (Warsaw) [2.05 km]: 38.178 ms
Testing download speed................................................................................
Download: 51.01 Mbit/s
Testing upload speed................................................................................................
Upload: 11.90 Mbit/s

This is 20 times!!! faster than my home ISP in the UK.

I managed to get it working following the usb_modeswitch cmd mentioned earlier in this thread.
 
That is why I opened this thread at the beginning ;). I wanted someone to tell me how to do it right, in the FreeBSD way.

If you just want to plug this modem from time to time, creating a devd rule should be enough.

I recently ran into the same problem, I solved it by putting something like:

Code:
case $reason in
PREINIT)
    echo 'AT^NDISDUP=1,1,"<APN>"' > /dev/cuaU0
    ;;
esac

…in /etc/dhclient-enter-hooks. While this might be a bit of a late reply for the original questioner, it might be some help for others looking for a solution to this problem.
 
Back
Top