# HL7800 as a network interface in Linux

**URL:** <https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224>\
**Category:** HL78\
**Created:** [May 4, 2020, 9:25am UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224 "2020-05-04T09:25:41Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![gustav.sohtell](https://avatars.discourse-cdn.com/v4/letter/g/e480ec/32.png) [@gustav.sohtell](https://forum.sierrawireless.com/u/gustav.sohtell)\
**Post date:** [May 4, 2020, 9:25am UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/1 "2020-05-04T09:25:41Z")

</div>

Hi,

Has anyone got a guide or similar to how to make a HL7800-module which is connected by USB appear as a networking interface in Linux? I’m not too familiar with PPP, as I assume should be used? Can I use any guide for LTE USB modems with Linux online or do I need anything special with these modems?

Best regards,  
Gustav

---

<div class="post-metadata">

**Author:** ![AE5000](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/ae5000/32/4828_2.png) [@AE5000](https://forum.sierrawireless.com/u/AE5000)\
**Post date:** [May 4, 2020, 2:51pm UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/2 "2020-05-04T14:51:08Z")

</div>

Hi @gustav.sohtell,

I assume that HL7800 is already in USB mode. You can confirm this with AT+KUSBCOMP? command. If it returns “1”, that means device is in USB mode.

Once in USB mode, you will see three ttyACMx ports. Typically, ttyACM0, ttyACM1 and ttyACM2.

USB-ACM0 — AT port

USB-ACM1 — AT/PPP data port

USB-ACM2 — NMEA data port

I will recommend to you ACM1 as your PPP port.

- You will also need PPP daemon installed on your host. Check that pppd is available with pppd version

- Check that your kernel is built with the ppp module: uname -a; dmesg | grep -i ppp

- Before configuring the ppp link, check first you can connect to your ISP (Internet Service Provider) manually. Send manually ATDT123 (or “ATD_99_\*\*1#” for later releases). You should get a response of “CONNECT or CONNECTED”. Then close the AT link.

- Create an /etc/chatscripts/hl78xx-chat file which contains:  
_ABORT BUSY_  
_ABORT “NO CARRIER”_  
_ABORT VOICE_  
_ABORT “NO DIALTONE”_  
_ABORT “NO ANSWER”_  
_ABORT DELAYED_  
_ABORT ERROR_  
_TIMEOUT 10_  
_“” AT_  
_OK "ATD_99\*\*_1#"_  
_CONNECT_

- Create an /etc/ppp/peers/hl78xx file which contains:

_noauth_  
_connect “/usr/sbin/chat -v -t 5 -f /etc/chatscripts/hl78xx-chat”_  
_debug_  
_/dev/ttyACM1_  
_115200_  
_defaultroute_  
_noipdefault_  
_usepeerdns_  
_lcp-echo-interval 20_  
_noaccomp_

- Launch PPP session with : sudo pppd call hl78xx

- If PPP was successfully established, “ifconfig” should show something like:

ppp0 Link encap:Point-to-Point Protocol

inet addr:10.0.0.10 P-t-P:1xx.xx.xx.xx Mask:255.255.255.255

UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1

RX packets:7 errors:0 dropped:0 overruns:0 frame:0

TX packets:7 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:3

RX bytes:345 (345.0 B) TX bytes:201 (201.0 B)

- If you have access to the embedded Linux shell, the syslog file shows very useful information about the ppp connection.

=======================

I have also uploaded PPP chatscripts that you can use.  
[PPP.7z](https://forum.sierrawireless.com/uploads/short-url/8suYBKqgoD6iaDsIabwepOs9yt7.7z) (422 Bytes)

---

<div class="post-metadata">

**Author:** ![gustav.sohtell](https://avatars.discourse-cdn.com/v4/letter/g/e480ec/32.png) [@gustav.sohtell](https://forum.sierrawireless.com/u/gustav.sohtell)\
**Post date:** [May 5, 2020, 8:00am UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/3 "2020-05-05T08:00:49Z")

</div>

Thank you very much for your detailed post, AE5000. Very helpful! I’ll see if we can make this work.

---

<div class="post-metadata">

**Author:** ![gustav.sohtell](https://avatars.discourse-cdn.com/v4/letter/g/e480ec/32.png) [@gustav.sohtell](https://forum.sierrawireless.com/u/gustav.sohtell)\
**Post date:** [May 5, 2020, 1:31pm UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/4 "2020-05-05T13:31:27Z")

</div>

Hi, we got stuck very quickly.  
ATDT123 directly gives the reply “ERROR”.

AT+KUSBCOMP gives 1.

What could be the potential reasons that ATDT could return just “ERROR”?

Best regards,  
Gustav

---

<div class="post-metadata">

**Author:** ![gustav.sohtell](https://avatars.discourse-cdn.com/v4/letter/g/e480ec/32.png) [@gustav.sohtell](https://forum.sierrawireless.com/u/gustav.sohtell)\
**Post date:** [May 5, 2020, 1:35pm UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/5 "2020-05-05T13:35:57Z")

</div>

ATD=? also gives  
ERROR

---

<div class="post-metadata">

**Author:** ![gustav.sohtell](https://avatars.discourse-cdn.com/v4/letter/g/e480ec/32.png) [@gustav.sohtell](https://forum.sierrawireless.com/u/gustav.sohtell)\
**Post date:** [May 5, 2020, 2:32pm UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/6 "2020-05-05T14:32:56Z")

</div>

Found another thread which specifies a different ATDT command… That gave some results. Perhaps that is good 🙂

ATDT_99_\*\*1#

CONNECT

~?}#?!}!}!} }4}"}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}!}!} }4}”}&} } } } }%}&}9+?}2}’}"}(}“u}0~~?}#?!}%}”} }0User requestS3~

NO CARRIER

---

<div class="post-metadata">

**Author:** ![gustav.sohtell](https://avatars.discourse-cdn.com/v4/letter/g/e480ec/32.png) [@gustav.sohtell](https://forum.sierrawireless.com/u/gustav.sohtell)\
**Post date:** [May 5, 2020, 2:38pm UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/7 "2020-05-05T14:38:40Z")

</div>

Aha! when I posted my own answer I found part of the problem. This forum system removes stars. The command is always `ATD*99***1#` but if I write it here it removes some stars, like this: ATD_99_\*\*1#

---

<div class="post-metadata">

**Author:** ![AE5000](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/ae5000/32/4828_2.png) [@AE5000](https://forum.sierrawireless.com/u/AE5000)\
**Post date:** [May 5, 2020, 3:30pm UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/8 "2020-05-05T15:30:04Z")

</div>

> [@AE5000](#):
>
> _"ATD_ 99\*\* _1#"_

HI @gustav.sohtell,

My earlier reply also suggested use of “ATD\* 99\*\* \*1#”. The attached chatscripts also use the same command. Please use the same. It should work.

---

<div class="post-metadata">

**Author:** ![jesper.persson](https://avatars.discourse-cdn.com/v4/letter/j/48db29/32.png) [@jesper.persson](https://forum.sierrawireless.com/u/jesper.persson)\
**Post date:** [May 5, 2020, 6:55pm UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/9 "2020-05-05T18:55:56Z")

</div>

Hi,  
I am working on this as well with Gustav.  
I have followed the guide by creating the chatscript and pppd files that you linked in the zip archive. However, the interface doesn’t show up when doing `ifconfig`. I add `debug` in the pppd script but I don’t think it gives any more information.  
This is what syslog shows:

```auto
daemon.notice pppd[2267]: pppd 2.4.7 started by root, uid 0
local2.info chat[2268]: abort on (BUSY)
local2.info chat[2268]: abort on (NO CARRIER)
local2.info chat[2268]: abort on (VOICE)
local2.info chat[2268]: abort on (NO DIALTONE)
local2.info chat[2268]: abort on (NO ANSWER)
local2.info chat[2268]: abort on (DELAYED)
local2.info chat[2268]: timeout set to 10 seconds
local2.info chat[2268]: send (AT^M)
local2.info chat[2268]: expect (OK)
local2.info chat[2268]: alarm
local2.info chat[2268]: Failed
daemon.debug pppd[2267]: Script /usr/sbin/chat -v -t 5 -f /etc/chatscripts/hl78xx-chat
 finished (pid 2268), status = 0x3
daemon.err pppd[2267]: Connect script failed

```

When calling “ATD_99_\*\*1#” manually the output that Gustav posted above shows up, ending with _NO CARRIER_. `ppp` version is 2.4.7.

Best Regards  
Jesper

---

<div class="post-metadata">

**Author:** ![AE5000](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/ae5000/32/4828_2.png) [@AE5000](https://forum.sierrawireless.com/u/AE5000)\
**Post date:** [May 5, 2020, 7:12pm UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/10 "2020-05-05T19:12:12Z")

</div>

Hi @jesper.persson,  
Please confirm that right “ttyACM” port is used in “hl78xx” file. The one I sent had ttyACM1. On your platform it may be different.

noauth  
connect “/usr/sbin/chat -v -t 5 -f /etc/chatscripts/hl78xx-chat”  
debug  
**/dev/ttyACM1**  
115200  
defaultroute  
noipdefault  
usepeerdns  
lcp-echo-interval 20  
noaccomp

Provide the list of ttyACM ports on your platform before and after HL78xx enumerates. This will tell us what ports are assigned to HL78xx.

The issue you are experiencing is that AT command are timing out. Very likely it has to do with providing the right port to PPP scripts.

---

<div class="post-metadata">

**Author:** ![jesper.persson](https://avatars.discourse-cdn.com/v4/letter/j/48db29/32.png) [@jesper.persson](https://forum.sierrawireless.com/u/jesper.persson)\
**Post date:** [May 5, 2020, 7:43pm UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/11 "2020-05-05T19:43:14Z")

</div>

Hi @AE5000,  
It is using `/dev/ttyACM1`.  
The other ACM devices are `/dev/ttyACM0` and `/dev/ttyACM2`.

I’ve tried both of the devices, with `ttyACM2` the error is the same and with `ttyACM0` the syslog shows:

```auto
daemon.notice pppd[4855]: pppd 2.4.7 started by root, uid 0
local2.info chat[4856]: abort on (BUSY)
local2.info chat[4856]: abort on (NO CARRIER)
local2.info chat[4856]: abort on (VOICE)
local2.info chat[4856]: abort on (NO DIALTONE)
local2.info chat[4856]: abort on (NO ANSWER)
local2.info chat[4856]: abort on (DELAYED)
local2.info chat[4856]: timeout set to 10 seconds
local2.info chat[4856]: send (AT^M)
local2.info chat[4856]: expect (OK)
local2.info chat[4856]: AT^M^M
local2.info chat[4856]: OK
local2.info chat[4856]: -- got it
local2.info chat[4856]: send (AT^M)
local2.info chat[4856]: expect (OK)
local2.info chat[4856]: ^M
local2.info chat[4856]: AT^M^M
local2.info chat[4856]: OK
local2.info chat[4856]: -- got it
local2.info chat[4856]: send (ATD*99***1#^M)
local2.info chat[4856]: expect (CONNECT)
local2.info chat[4856]: ^M
local2.info chat[4856]: ATD*99***1#^M^M
local2.info chat[4856]: CONNECT
local2.info chat[4856]: -- got it
local2.info chat[4856]: send ()
daemon.debug pppd[4855]: Script /usr/sbin/chat -v -t 5 -f /etc/chatscripts/hl78xx-chat finished (pid 4856), status = 0x0
daemon.info pppd[4855]: Serial connection established.
daemon.err pppd[4855]: Couldn't set tty to PPP discipline: Invalid argument
daemon.info pppd[4855]: Exit.

```

Best Regards  
Jesper

---

<div class="post-metadata">

**Author:** ![AE5000](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/ae5000/32/4828_2.png) [@AE5000](https://forum.sierrawireless.com/u/AE5000)\
**Post date:** [May 5, 2020, 8:02pm UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/12 "2020-05-05T20:02:16Z")

</div>

Let me look into this and try at my end. Will get back soon.

---

<div class="post-metadata">

**Author:** ![AE5000](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/ae5000/32/4828_2.png) [@AE5000](https://forum.sierrawireless.com/u/AE5000)\
**Post date:** [May 5, 2020, 10:20pm UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/13 "2020-05-05T22:20:56Z")

</div>

Hi @jesper.persson,  
I tried it on my setup. It is working well. Sometimes you may have to relaunch PPP.

Here is how I started PPP session:  
 ![ppp](https://us1.discourse-cdn.com/flex025/uploads/sierrawireless/original/2X/4/4b0a32aa3cf3357cf80036a34afb1410f00d8b14.png)

Here is the Syslog which shows the connection was successful. Note that I am testing with Verizon SIM. So I have to use “ATD\*99\*\*\*3#” instead of “ATD\*99\*\*\*1#”.  
[ppp\_syslog.txt](https://forum.sierrawireless.com/uploads/short-url/6nujszBYngtbGYiIL5qZLUDrxRt.txt) (8.1 KB)

---

<div class="post-metadata">

**Author:** ![jesper.persson](https://avatars.discourse-cdn.com/v4/letter/j/48db29/32.png) [@jesper.persson](https://forum.sierrawireless.com/u/jesper.persson)\
**Post date:** [May 6, 2020, 11:18am UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/14 "2020-05-06T11:18:17Z")

</div>

> [@AE5000](#):
>
> pppd call hl78xx

Hi,  
I tried with all three devices and also with `“ATD*99***3#”` but still not seeing any ppp0 interface.  
We are using CAT-M1 if that makes any difference.

Best Regards  
Jesper

---

<div class="post-metadata">

**Author:** ![jesper.persson](https://avatars.discourse-cdn.com/v4/letter/j/48db29/32.png) [@jesper.persson](https://forum.sierrawireless.com/u/jesper.persson)\
**Post date:** [May 6, 2020, 2:45pm UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/15 "2020-05-06T14:45:01Z")

</div>

Hi,  
I tried upgrading the firmware to the latest version. Now I am getting this error instead:

```auto
pppd[5676]: pppd 2.4.8 started by root, uid 0
chat[5677]: abort on (BUSY)
chat[5677]: abort on (NO CARRIER)
chat[5677]: abort on (VOICE)
chat[5677]: abort on (NO DIALTONE)
chat[5677]: abort on (NO ANSWER)
chat[5677]: abort on (DELAYED)
chat[5677]: timeout set to 10 seconds
chat[5677]: send (AT^M)
chat[5677]: expect (OK)
chat[5677]: AT^M^M
chat[5677]: OK
chat[5677]: -- got it
chat[5677]: send (AT^M)
chat[5677]: expect (OK)
chat[5677]: ^M
chat[5677]: AT^M^M
chat[5677]: OK
chat[5677]: -- got it
chat[5677]: send (ATD*99***1#^M)
chat[5677]: expect (CONNECT)
chat[5677]: ^M
chat[5677]: ATD*99***1#^M^M
chat[5677]: CONNECT
chat[5677]: -- got it
pppd[5676]: Serial connection established.
pppd[5676]: Couldn't set tty to PPP discipline: Invalid argument
pppd[5676]: Exit.

```

---

<div class="post-metadata">

**Author:** ![AE5000](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/ae5000/32/4828_2.png) [@AE5000](https://forum.sierrawireless.com/u/AE5000)\
**Post date:** [May 6, 2020, 4:05pm UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/16 "2020-05-06T16:05:09Z")

</div>

Hi @jesper.persson,

This error is not from the HL device. It has something to do with the PPP daemon and related setup. HL device is already in PPP mode (CONNECT).

You will have to investigate this from the host/Linux side.

---

<div class="post-metadata">

**Author:** ![jesper.persson](https://avatars.discourse-cdn.com/v4/letter/j/48db29/32.png) [@jesper.persson](https://forum.sierrawireless.com/u/jesper.persson)\
**Post date:** [May 6, 2020, 7:17pm UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/17 "2020-05-06T19:17:28Z")

</div>

Ok, thanks a lot for all the help @AE5000!

---

<div class="post-metadata">

**Author:** ![georges.torval91](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@georges.torval91](https://forum.sierrawireless.com/u/georges.torval91)\
**Post date:** [July 26, 2021, 2:38pm UTC](https://forum.sierrawireless.com/t/hl7800-as-a-network-interface-in-linux/20224/18 "2021-07-26T14:38:20Z")

</div>

Hi @AE5000, thanks for the detailed steps above, i have just one question about how can i get the syslog (port to use, config …) i use my HL78 with Linux pc
