Hi Guillaume,
I’ve just verified the sample with current master (4bd247af700a88df3d5f2cca60e46b5669b4aa71), and it works fine on my machine.
Please double check if:
- The tap0 interface is up before running the sample (for instance with `ifconfig` command, it should have 192.0.2.2 IPv4 address assigned). Perhaps there were some errors during initialization?
For me the output looks like this:
$ sudo ./loop-slip-tap.sh
********SLIP started on ``/tmp/slip.dev''
slipfd and inslip reopened
ip neigh flush dev tap0
Cannot find device "tap0"
opened tap device ``/dev/tap0''
ifconfig tap0 up
ip -6 route add 2001:db8::/64 dev tap0
ip -6 addr add 2001:db8::2/64 dev tap0
ip route add 192.0.2.0/24 dev tap0
ip addr add 192.0.2.2/24 dev tap0
ifconfig tap0
tap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.0.2.2 netmask 255.255.255.0 broadcast 0.0.0.0
inet6 fe80::207d:e5ff:fef5:83b8 prefixlen 64 scopeid 0x20<link>
inet6 2001:db8::2 prefixlen 64 scopeid 0x0<global>
ether 22:7d:e5:f5:83:b8 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
- Probably you’ve overwritten the default port number somehow? ` CONFIG_LWM2M_PEER_PORT` shall be set to 5683 (default Leshan configuration).
- Leshan server is actually running (not sure how to verify this properly, maybe by opening its web GUI in the web browser,
localhost:8080 by default).
You may also monitor the traffic on the tap0 interface with wireshark easily.
Regards,
Robert
From: devel@... [mailto:devel@...]
On Behalf Of Guillaume PAQUET via lists.zephyrproject.org
Sent: Monday, August 17, 2020 11:22
To: devel@...
Subject: Re: [Zephyr-devel] [LWM2M] Client example - QEMU x86
Sorry for bad manipulation, my previous mail was not finished ...
So to complete it, I run ./loop-socat.sh and sudo ./loop-slip-tap.sh in net-tools to be able to run QEMU x86 properly.
Hello Zephyr Community,
I am Guillaume Paquet, I worked for STIMIO company and I am now working for SMILE company, specialised in Linux Open Source Embedded topics.
[00:00:37.230,000] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/0/1, buf:0x00144373, buflen:1
[00:00:37.230,000] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:0/0/10, buf:0x001443b2, buflen:2
[00:00:37.230,000] <dbg> net_lwm2m_engine.lwm2m_engine_get: path:1/0/1, buf:0x0013dea0, buflen:4
[00:00:37.230,000] <inf> net_lwm2m_rd_client: RD Client started with endpoint 'qemu_x86' with client lifetime 30
[00:00:37.230,000] <dbg> net_lwm2m_engine.lwm2m_parse_peerinfo: Parse url: coap://192.0.2.2
[00:00:37.230,000] <dbg> net_lwm2m_rd_client.sm_send_registration: registration sent [192.0.2.2]
[00:00:39.590,000] <inf> net_lwm2m_engine: Resending message: 0x0013b4a0
[00:00:44.280,000] <inf> net_lwm2m_engine: Resending message: 0x0013b4a0
[00:00:53.660,000] <inf> net_lwm2m_engine: Resending message: 0x0013b4a0
[00:01:12.420,000] <wrn> net_lwm2m_rd_client: Registration Timeout
[00:01:12.420,000] <dbg> net_lwm2m_client_app.rd_client_event: Disconnected
[00:01:12.420,000] <dbg> net_lwm2m_client_app.rd_client_event: Registration failure!
I only activated IPv4 (I also tried IPv6 and it does not work too).
Maybe I missed something in configuration.
For information, I run ./loop-socat.sh a
--

10-12 rue Nicolas Appert
44100 NANTES
|
|
Pour
la planète, n'imprimez ce mail que si c'est nécessaire
--

10-12 rue Nicolas Appert
44100 NANTES
|
|
Pour
la planète, n'imprimez ce mail que si c'est nécessaire