|
| 1 | +.. zephyr:code-sample:: hello_hl78xx |
| 2 | + :name: Hello hl78xx modem driver |
| 3 | + |
| 4 | + get & set basic hl78xx modem information & functionality with HL78XX modem APIs |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +A simple sample that can be used with only Sierra Wireless HL78XX series modems |
| 10 | + |
| 11 | +Notes |
| 12 | +***** |
| 13 | + |
| 14 | +This sample uses the devicetree alias ``modem`` to identify |
| 15 | +the modem instance to use. |
| 16 | + |
| 17 | +Building and Running |
| 18 | +******************** |
| 19 | + |
| 20 | +This application can be built and executed on QEMU as follows: |
| 21 | + |
| 22 | +.. zephyr-app-commands:: |
| 23 | + :zephyr-app: samples/drivers/modem/hello_hl78xx |
| 24 | + :host-os: all |
| 25 | + :goals: build flash |
| 26 | + :compact: |
| 27 | + |
| 28 | +To build for another board, change "qemu_x86" above to that board's name. |
| 29 | + |
| 30 | +Sample Output |
| 31 | +============= |
| 32 | + |
| 33 | +.. code-block:: console |
| 34 | +
|
| 35 | + [00:00:12.840,000] <inf> hl78xx_socket: Apn="netfeasavodiot.mnc028.mcc901.gprs" |
| 36 | + [00:00:12.840,000] <inf> hl78xx_socket: Addr=10.149.105.74.255.255.255.252 |
| 37 | + [00:00:12.840,000] <inf> hl78xx_socket: Gw=10.149.105.73 |
| 38 | + [00:00:12.840,000] <inf> hl78xx_socket: DNS=141.1.1.1 |
| 39 | + [00:00:12.840,000] <inf> hl78xx_socket: Extracted IP: 10.149.105.74 |
| 40 | + [00:00:12.840,000] <inf> hl78xx_socket: Extracted Subnet: 255.255.255.252 |
| 41 | + [00:00:12.840,000] <inf> hl78xx_dev: switch from run enable gprs script to carrier on |
| 42 | + [00:00:15.944,000] <inf> main: IP Up |
| 43 | + [00:00:15.944,000] <inf> main: Connected to network |
| 44 | +
|
| 45 | + ********************************************************** |
| 46 | + ********* Hello HL78XX Modem Sample Application ********** |
| 47 | + ********************************************************** |
| 48 | + [00:00:15.980,000] <inf> main: Manufacturer: Sierra Wireless |
| 49 | + [00:00:15.980,000] <inf> main: Firmware Version: HL7812.5.7.3.0 |
| 50 | + [00:00:15.980,000] <inf> main: APN: netfeasavodiot |
| 51 | + [00:00:15.980,000] <inf> main: Imei: 351144441214500 |
| 52 | + [00:00:15.980,000] <inf> main: RAT: NB1 |
| 53 | + [00:00:15.980,000] <inf> main: Connection status: Not Registered |
| 54 | + [00:00:15.980,000] <inf> main: RSRP : -97 |
| 55 | + ********************************************************** |
| 56 | +
|
| 57 | + [00:00:15.980,000] <inf> main: Setting new APN: |
| 58 | + [00:00:15.980,000] <inf> main: IP down |
| 59 | + [00:00:15.980,000] <inf> main: Disconnected from network |
| 60 | + [00:00:16.013,000] <inf> main: New APN: "" |
| 61 | + [00:00:16.013,000] <inf> main: Test endpoint: flake.legato.io:6000 |
| 62 | + [00:00:17.114,000] <inf> main: Resolved: 20.29.223.5:6000 |
| 63 | + [00:00:17.114,000] <inf> main: Sample application finished. |
| 64 | +
|
| 65 | +After startup, code performs: |
| 66 | + |
| 67 | +#. Modem readiness check and power-on |
| 68 | +#. Network interface setup via Zephyr's Connection Manager |
| 69 | +#. Modem queries (manufacturer, firmware, APN, IMEI, signal strength, etc.) |
| 70 | +#. Network registration and signal strength checks |
| 71 | +#. Setting and verifying a new APN |
| 72 | +#. Sending an AT command to validate communication |
0 commit comments