Comments (6)
the last few packets look like:
88 16.902087 192.168.1.1 192.168.1.146 DNS 156 Standard query response 0xb7ff A testhubti.azure-devices.net CNAME ihsu-eastus-2.eastus.cloudapp.azure.com A 20.49.109.129
89 16.903396 192.168.1.146 20.49.109.129 TCP 62 54335 → 8883 [SYN] Seq=0 Win=8192 Len=0 MSS=1460
90 16.947130 20.49.109.129 192.168.1.146 TCP 60 8883 → 54335 [SYN, ACK] Seq=0 Ack=1 Win=64240 Len=0 MSS=1440
after this I just get a retransmission, I assume because of the failure
No. Time Source Destination Protocol Length Info
99 19.950324 20.49.109.129 192.168.1.146 TCP 60 [TCP Retransmission] 8883 → 54335 [SYN, ACK] Seq=0 Ack=1 Win=64240 Len=0 MSS=1440
from netxduo.
a bit more information. I was able to correct the hard fault issue by doing this:
/* Copy the TCP header, since the actual packet can be delivered to
a waiting socket/thread during this routine and before we are done
using the header. */
/*lint -e{927} -e{826} suppress cast of pointer to pointer, since it is necessary */
// tcp_header_copy = *((NX_TCP_HEADER *)packet_ptr -> nx_packet_prepend_ptr);
memcpy((void *)&tcp_header_copy, (void *)packet_ptr -> nx_packet_prepend_ptr, sizeof(NX_TCP_HEADER));
not sure this is a good long term solution but after this modification everything seems to work and the device fully registers with Azure and I am receiving telemetering temperature info.
Any more insight?
from netxduo.
Could you check the value of packet_ptr -> nx_packet_prepend_ptr
? It is required to be 4 bytes aligned for IP header. From your last description, it looks like the fix is related to unaligned access.
from netxduo.
Thank you for the help. Yes, it looks like that is the issue.
Even though this is an M4F which I understand supports unaligned access (if the SCB_CCR_UNALIGN_TRP_Msk bit in the SBC->CCR register is clear ... which it is) it is still faulting.
I can see the nx_prepend_ptr is at 0x200037d6 which is indeed in RAM space but not 4 byte aligned.
So what is the answer? do all the buffer allocations need to be fixed up so prepend_ptr end up 4 byte aligned? how do you do that?
from netxduo.
Hi @dvescovi1 - typically, we use the hardware features of the MAC to insert two bytes of padding between the 14-byte MAC header and the payload. This aligns the payload on a 4-byte boundary.
from netxduo.
Feel free to reopen the issue if you have further questions.
from netxduo.
Related Issues (20)
- DNS cleint at non-blocking mode
- Missing include guards
- Wrong type across netxduo and threadx
- crypto hardware acceleration support HOT 15
- Inconsistent types across files
- NX_BSD_TIMEOUT_PROCESS_IN_TIMER
- CoAP addon HOT 1
- ULONG64 definition failing for rx architecture HOT 1
- PPP LCP Negotiation stops at state 4.
- BSD addon fails to compile HOT 3
- BSD socket create failed!
- Deployment in Device Update for IoT Hub is Failed with NETX DUO 6.4.1 HOT 3
- Improper handled of out of order packets in case Application connection restarts in multiple loop HOT 3
- http(s) client: how to download a big file chunk by chunk ? HOT 1
- DHCPv6 Server instance sends IPv6 response packets on incorrect index when DHCPv6 Client and DHCPv6 Server are brought up simultaneously
- Module (DHCPv6 Client) is getting a new IPv6 address each time we disconnect and reconnect from the Home Wi-Fi
- Can NETX DHCPv6 support simultaneous DHCPv6 Client & DHCPv6 Server on two interfaces?
- NetX BSD fails when select() is passed a timeout
- NetX Duo Socket Error NX_NOT_CONNECTED due to dropped SYN-ACKs
- MQTT with TLS1.3 on STMH563ZI nucleo board
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netxduo.