Commit 06c27621 authored by Bjarki Arge Andreasen's avatar Bjarki Arge Andreasen Committed by Carles Cufi
Browse files

samples: net: cloud: tagoio: Remove GSM modem overlay



The gsm modem driver is deprecated and will be removed. Remove
the build overlay and dependency on the gsm modem from the
tagoio sample.

The new cellular modem driver and subsystem use the native
networking stack and the pm subsystem, so just like ethernet,
enabling the cellular modem is up to the board configuration.

Signed-off-by: default avatarBjarki Arge Andreasen <bjarki@arge-andreasen.me>
parent 2cb559c5
Loading
Loading
Loading
Loading
+0 −54
Original line number Diff line number Diff line
@@ -24,8 +24,6 @@ Requirements

  * Ethernet: Using default configuration
  * WiFi: Using default configuration plus wifi overlay
  * Modem: Using default configuration plus modem overlay


TagoIO Device Configuration
***************************
@@ -81,58 +79,6 @@ need fill ``CONFIG_TAGOIO_HTTP_WIFI_SSID`` with your wifi network SSID and
   :goals: build flash
   :compact:


Modem
=====

The Modem support is quite similar to WIFI, you need a board with an embedded
Modem support or you can add a shield.  Currently, the overlay was created to
allow modems with PPP support.  This was tested using ``SIMcom SIM808 EVB``.
Additionally you need fill ``CONFIG_MODEM_GSM_APN`` with the correspondent Access
Point Name (APN) at
:zephyr_file:`samples/net/cloud/tagoio_http_post/overlay-modem.conf` file. A
DTC overlay file should be used to configure the glue between the modem and the
uart port. It can reside at boards directory, with the board name, or it can be
a special designator like defined at ``arduino.overlay``.

.. zephyr-app-commands::
   :zephyr-app: samples/net/cloud/tagoio_http_post
   :board: sam4e_xpro
   :gen-args: -DEXTRA_CONF_FILE=overlay-modem.conf
   :goals: build flash
   :compact:

.. zephyr-app-commands::
   :zephyr-app: samples/net/cloud/tagoio_http_post
   :board: frdm_k64f
   :gen-args: -DEXTRA_CONF_FILE=overlay-modem.conf -DDTC_OVERLAY_FILE=arduino.overlay
   :goals: build flash
   :compact:

In a terminal window you can check if communication is happen:

.. code-block:: console

    $ minicom -D /dev/ttyACM0

    *** Booting Zephyr OS build zephyr-v2.4.0-1135-g137732e23c1e  ***


    [00:00:02.172,000] <inf> modem_gsm: Manufacturer: SIMCOM_Lt
    [00:00:02.227,000] <inf> modem_gsm: Model: SIMCOM_SIM808
    [00:00:02.283,000] <inf> modem_gsm: Revision: 1418B04SIM808M32
    [00:00:02.338,000] <inf> modem_gsm: IMSI: XXXXXX
    [00:00:02.393,000] <inf> modem_gsm: ICCID: XXXXXX
    [00:00:02.453,000] <inf> modem_gsm: IMEI: XXXXXX
    [00:00:02.574,000] <inf> modem_gsm: Attached to packet service!
    [00:00:02.575,000] <inf> net_ppp: Initializing PPP to use UART_3
    [00:00:13.370,000] <inf> tagoio: TagoIO IoT - HTTP Client - Temperature demo
    [00:00:13.370,000] <inf> tagoio: Temp: 20
    [00:00:25.237,000] <inf> tagoio: Temp: 76
    [00:00:37.581,000] <inf> tagoio: Temp: 36
    [00:00:50.437,000] <inf> tagoio: Temp: 98


Visualizing TagoIO dashboard
****************************

+0 −14
Original line number Diff line number Diff line
/*
 * Copyright (c) 2021 G-Technologies Sdn. Bhd.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

 &arduino_serial {
	status = "okay";
	current-speed = <115200>;

	gsm: gsm-modem {
		compatible = "zephyr,gsm-ppp";
	};
};
+0 −1
Original line number Diff line number Diff line
CONFIG_USART_SAM=y
+0 −14
Original line number Diff line number Diff line
/*
 * Copyright (c) 2021 G-Technologies Sdn. Bhd.
 *
 * SPDX-License-Identifier: Apache-2.0
 */

&usart1 {
	status = "okay";
	current-speed = <115200>;

	gsm: gsm-modem {
		compatible = "zephyr,gsm-ppp";
	};
};
+0 −24
Original line number Diff line number Diff line
# UART support
CONFIG_SERIAL=y

# GSM modem support
CONFIG_MODEM=y
CONFIG_MODEM_SHELL=y
CONFIG_MODEM_CMD_HANDLER_MAX_PARAM_COUNT=20
CONFIG_MODEM_GSM_PPP=y
CONFIG_MODEM_GSM_RX_STACK_SIZE=1024
CONFIG_MODEM_GSM_APN="<your Access Point Name (APN)>"

# Network management events
CONFIG_NET_CONNECTION_MANAGER=y

# PPP networking support
CONFIG_NET_NATIVE=y
CONFIG_NET_DRIVERS=y
CONFIG_NET_PPP=y
CONFIG_NET_L2_PPP=y
CONFIG_NET_L2_PPP_TIMEOUT=10000

CONFIG_DNS_RESOLVER_MAX_SERVERS=1
CONFIG_DNS_SERVER_IP_ADDRESSES=y
CONFIG_DNS_SERVER1="8.8.8.8"
Loading