Skip to content

Commit 440ca12

Browse files
committed
samples: net: lwm2m_client: support Pinnacle 100 with HL78xx driver
Add support for using the HL78XX modem driver with Pinnacle 100 modem boards. Signed-off-by: Ryan Erickson <[email protected]>
1 parent e032513 commit 440ca12

File tree

3 files changed

+61
-1
lines changed

3 files changed

+61
-1
lines changed

samples/net/lwm2m_client/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ config NET_SAMPLE_LWM2M_SERVER
4747

4848
config NET_SAMPLE_LWM2M_WAIT_DNS
4949
bool "Wait DNS server addition before considering connection to be up"
50-
depends on MODEM_HL7800 && !DNS_SERVER_IP_ADDRESSES
50+
depends on (MODEM_HL7800 || MODEM_HL78XX) && !DNS_SERVER_IP_ADDRESSES
5151
help
5252
Make sure we get DNS server addresses from the network
5353
before considering the connection to be up.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
CONFIG_MODEM_HL7800=n
2+
CONFIG_UART_ASYNC_API=y
3+
CONFIG_MODEM_HL78XX=y
4+
CONFIG_MODEM_HL78XX_AUTORAT=n
5+
6+
# The HL78xx driver gets its IP settings from the cell network
7+
CONFIG_NET_CONFIG_SETTINGS=n
8+
CONFIG_NET_CONNECTION_MANAGER=y
9+
CONFIG_NET_SAMPLE_LWM2M_WAIT_DNS=y
10+
CONFIG_DNS_RESOLVER=y
11+
12+
# NB-IoT has large latency, so increase timeouts. It is ok to use this for Cat-M1 as well.
13+
CONFIG_NET_SOCKETS_DNS_TIMEOUT=12000
14+
CONFIG_NET_SOCKETS_CONNECT_TIMEOUT=13000
15+
CONFIG_NET_SOCKETS_DTLS_TIMEOUT=15000
16+
CONFIG_COAP_INIT_ACK_TIMEOUT_MS=15000
17+
18+
# Logging
19+
# CONFIG_LOG_BUFFER_SIZE=65535
20+
# For extra debug
21+
# CONFIG_MODEM_MODULES_LOG_LEVEL_DBG=y
22+
# CONFIG_MODEM_LOG_LEVEL_DBG=y
23+
# CONFIG_MODEM_CHAT_LOG_BUFFER_SIZE=1024
24+
# CONFIG_MODEM_HL78XX_LOG_CONTEXT_VERBOSE_DEBUG=y
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/delete-node/ &hl7800;
2+
3+
/ {
4+
aliases {
5+
modem-uart = &uart1;
6+
modem = &hl7800;
7+
gnss = &gnss;
8+
};
9+
};
10+
11+
&uart1 {
12+
hl7800: hl7800 {
13+
compatible = "swir,hl7800";
14+
status = "okay";
15+
mdm-reset-gpios = <&gpio1 15 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
16+
mdm-wake-gpios = <&gpio1 13 (GPIO_OPEN_SOURCE | GPIO_ACTIVE_HIGH)>;
17+
mdm-pwr-on-gpios = <&gpio1 2 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
18+
mdm-fast-shutd-gpios = <&gpio1 14 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>;
19+
mdm-vgpio-gpios = <&gpio1 11 0>;
20+
mdm-uart-dsr-gpios = <&gpio0 25 0>;
21+
mdm-uart-cts-gpios = <&gpio0 15 0>;
22+
mdm-gpio6-gpios = <&gpio1 12 0>;
23+
socket_offload: socket_offload {
24+
compatible = "swir,hl7812-offload";
25+
status = "okay";
26+
/* optional properties for future: */
27+
max-data-length = <512>;
28+
};
29+
gnss: hl_gnss {
30+
compatible = "swir,hl7812-gnss";
31+
pps-mode = "GNSS_PPS_MODE_DISABLED";
32+
fix-rate = <1000>;
33+
status = "disabled";
34+
};
35+
};
36+
};

0 commit comments

Comments
 (0)