-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
m_receiveCallback in Receive function in lora-net-device #150
Comments
This is probably because you are calling
This is because - in the real world - the LoRaWAN stack (PHY + MAC layers) does not have an actual NetDevice in the traditional network sense. Unfortunately, ns-3 expects you to always have a NetDevice (it is part of the base ns-3 abstractions). As a consequence, in the current implementation packets are just forwarded through the NetDevice object, going from the MAC layer to the Application. We actually have a future proposal to completely remove the NetDevice from the LoRaWAN stack for this reason.
LoRaWAN gateways do not have a LoRaWAN address (i.e., a DevAddr) so, even if it was necessary (it's not, as motivated above), there would be nothing to put there on the LoRaWAN stack side. However, they usually do have an IP for forwarding packets from the LoRaWAN side to a server. This is reflected in the simulation, as they can have a second NetDevice (CSMA for instance) which can store their address and have an implemented version of the callback you mention. |
The SetReceiveCallback( ...) is already called in the network-server-helper, then at gateway-lorawan-mac-level in GatewayLorawanMac::Receive the Receive( ) function in net-device is called where we find the callback! All these implementation already exist and I didn't modify it ...however it still stopping at lora-net-device. level exactly at m_receiveCallback to generate msg="Attempted to dereference zero pointer error! |
Are you sure the callback in I think I understand where your error is coming from. In your example main file, make sure that Ideally this should give a better error message during installation that explains the issue. This is a known problem of the module, and it is already scheduled to be fixed in upcoming releases. Sorry for the inconvenience. |
Exactly! Thank you so much for the clarification!! Your indication has resolved the problem! I kindly ask you to keep this kind of remarks in a short tuto with the installation setup! it would be very useful! I was dealing with this error for a whole week! |
* Expose p2p connection of gateways to server (#150) * Expose gw registration to simplify NetworkServerHelper::Install + remove NodeContainer install of NetworkServerHelper + add P2PGwRegistration_t helper structure to facilitate independent instantiation of P2P and server app * Directly pass P2PGwRegistration_t to NetworkServerHelper
This instruction generates an error: msg="Attempted to dereference zero pointer". I try to find the problem, and I want to ask why you filled empty empty stuff in ptotocol and address m_receiveCallback (this, packet, 0, Address()); . the callback should not contain th eaddress of the gateway as aparameter?
The text was updated successfully, but these errors were encountered: