# Chat script failed with PPP cellular connection



## Jason_25 (Sep 30, 2022)

I am using a Sierra 340 USB cellular device and feel I am very close to making a connection.

This is the ppp configuration:

```
test:
 set device /dev/cuaU0
 set timeout 0
 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
        \"\" \
        AT OK-AT-OK \
        #AT+CPIN="" OK-AT-OK \
        ATH OK-AT-OK \
        ATE1 OK-AT-OK \
        AT+CGDCONT=1,\\\"IP\\\",\\\"broadband\\\" OK \
        \\dATD*99***1# TIMEOUT 40 CONNECT"
 set authname " "
 set authkey " "
 set ifaddr 10.0.0.1/0 10.64.64.64 255.255.255.255 0.0.0.0
 add default HISADDR
```

Every possible permutation has been met with chat script failed in the ppp log.  Keep in mind there is no /dev/cuaU0.0 only a cuaU0.

I do not require an AT style dialup connection and the MBIM style connection this device supports would be fine too.  wwan0 does not appear through MBIM as it does with Linux.

I did not see a cuaU0 until I installed usb_modeswitch but that could just be a a coincidence.  I installed usb_modeswitch so I could try some other cellular devices if this was not going to work.  I have not configured usb_modeswitch at all.

This device works with Windows using MBIM or Linux using AT dialup with disablembimglobal in the usb_modeswitch configuration or MBIM in Linux by default.

How might I proceed?


----------



## Phishfry (Sep 30, 2022)

MBIM is not supported on FreeBSD.

What you need to do is switch it to Direct IP mode.

That will get your ppp working.


Jason_25 said:


> I did not see a cuaU0


When working correctly you will see several sub-interfaces for cuaU0
For example:
cuaU0.0
cuaU0.1
cuaU0.2
cuaU0.3

To test those you would send some AT commands via cu. ATI will show modem status.
You will probably need to use the Sierra unlock code to change modes to direct IP.









						usb id & cu id
					

What is the link between a USB device id such as /dev/ugen1.3 and the cu device id such /dev/cuaU0.2 which you can use to connect to it?  I can see a number of @ugen's in /dev which correspond to the output of lsusb. I can also see cuaU2 cuaU2.init cuaU2.lock in dev but can't figure out how to...




					forums.freebsd.org


----------



## Jason_25 (Sep 30, 2022)

Hmm I do not do AT commands manually.  I'm trying to build a smart phone not "phreak" somebody's phone network.  Regardless nothing happens when I type with "cu" to do the cuaU0 device anyway.

I also tried the experimental MBIM driver posted here:





						263783 – USB MBIM: Support for LTE/4G USB modems (MBIM)
					






					bugs.freebsd.org
				



Just like the others there is no interface showing up after loading the driver.  Even after "blacklisting" the umodem driver.

In a way, this is not suprising that making a cellular connection is so arduous.  FreeBSD has a way of uncovering things that look simple to be actually very difficult.  With Android, you click the "data connection" buttton in the top bar.  With FreeBSD, you research for weeks and weeks and eventually give up.  If only everyone had to program their computer in machine language every time they wanted to do something what a world we would have!

Anyway, I am simply going to try my other cellular devices and if they do not work without manual AT commands I will erase FreeBSD from this computer and have more reinforcing reasons for why FreeBSD computers only comprise about 13% of my network.  I am not compromising here.  Having to enter AT commands manually has changed my attitude on this VERY fast.  I can and will make some something far superior that I guarantee I am not going to need to enter any commands for.


----------



## Jason_25 (Sep 30, 2022)

Very unlikely good news here.  The ZTE MF861 aka ATT Velocity is simply the best cellular device there is.  The signal/USB quality, overall speed, low power usage, ability to set a "DMZ" for a business connection, and now the out of the box compatibility with FreeBSD is just exceptional.

I am not sure if usb_modeswitch is playing into this or not but it is installed.  Obviously the Sierra 340 did not work.  Sierra 313 never transitioned from USB drive mode.  VSVABEFV USB device was the same way.  Then the champion ZTE MF861 came in and took care of everything.  A few seconds after plugging it in unbelievably a ue0 device popped up.  Then just sudo dhclient ue0.  All done.  I can finger scroll on Slashdot on the 7" touch screen with Falkon smoother than a smart phone now.

I would be left with nothing technologically if it was not for ZTE MF861.  It has solved USB and signal reliability issues on the MID project, it has solved issues with static IP addressing on the big networking project, and now it has solved issues with FreeBSD networking.  I see that ATT still advertises it as their go-to USB device and for good reason.

This situation reminds me of the situation with ethernet with FreeBSD.  When you pick the "wrong" manufacturer such as Realtek you suffer punishment but if you pick Intel all is fine.  It can be the difference between feeling like you know something and feeling like you know nothing.  Of course it is all an illusion and the person that suffers through with Realtek ethernet and Sierra cellular devices learns a lot more.  Even if that learning is sometimes more about self hate than anything else.


----------

