Author Topic: Wireless Network Simulator for LWMesh  (Read 228 times)

0 Members and 1 Guest are viewing this topic.

Offline fgargiulo

  • Contributor
  • Posts: 8
  • Country: ar
Wireless Network Simulator for LWMesh
« on: March 21, 2017, 10:13:18 AM »
Hello,
 
I've found a software for wireless network simulations with LWMesh and I'm really interested in using it for my own application. I was hoping to use this simulation software for testing some modifications to the stack and in order to understand the behaviour of the whole network with 1000 nodes.
 
I started by compiling the PingPong example, but after a few debug lines, i keep getting an error of an unhandled write (Error: unhandled word write @ 0x480f4c0e = 0x00000008). I used the makefile inside the project folder and i added the missing files of the LWMesh directly from the source codes of Atmel Website (all files from network and system layer). Am i missing something? I would really appreciate the help of someone who has already used the software.

The software i'm talking about can be found on this topic http://community.atmel.com/forum/wireless-network-simulator
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 2565
  • Country: us
  • I informed you thusly
    • Personal site
Re: Wireless Network Simulator for LWMesh
« Reply #1 on: March 21, 2017, 10:40:51 AM »
Something is wrong with the port for the simulator. Address 0x480f4c0e does not match any of the peripherals on the real device or virtual device.

Can you describe your process of porting?

I will try to find already ported application as an example.

Also, simulation of 1000 nodes will be really-really slow.
Alex
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 2565
  • Country: us
  • I informed you thusly
    • Personal site
Re: Wireless Network Simulator for LWMesh
« Reply #2 on: March 21, 2017, 10:46:15 AM »
Here is a full port that I used for tests. This one should work.
Alex
 

Offline fgargiulo

  • Contributor
  • Posts: 8
  • Country: ar
Re: Wireless Network Simulator for LWMesh
« Reply #3 on: March 21, 2017, 11:05:08 AM »
Hello Alex,

I first tried to compile the files inside " LwMesh_Sim.zip" using arm-none-eabi-gcc, but it failed because of some files missing. Then i realized that the files included inside the .zip where only the part that needed to be ported, and that the base application was missing (system and network). I guess it is because those files don't need any changes for using it with the simulation software. So i added the missing files that the make file couldn't find and it compiled succesfully. I used the files from "Lightweight Mesh Software Stack v1.2.1" that are in the Atmel website. I did not change anything from the main application (PingPong.c) or any other file in the original project. When i use the new .bin file i get the error i mentioned. Any suggestions? I'm sorry if there is something i'm doing wrong or that i've missed. Thanks again for your help.
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 2565
  • Country: us
  • I informed you thusly
    • Personal site
Re: Wireless Network Simulator for LWMesh
« Reply #4 on: March 21, 2017, 11:12:24 AM »
Try the project I attached to my second message.

The reason I don't make full projects readily available is that I'm not sure if I can distribute Atmel code that way without violating the license.
Alex
 

Offline fgargiulo

  • Contributor
  • Posts: 8
  • Country: ar
Re: Wireless Network Simulator for LWMesh
« Reply #5 on: March 21, 2017, 11:13:49 PM »
Thanks for the new project. I've been able to compile the int_test project, but not the PingPong one using the attached makefile. If i use the makefile from int_test with PingPong it will compile succesfully. However, when i run the simulation using the PingPong.bin created from the PingPong folder, it frezees right after initializatation and i don't see any transmitted packets.

This is what i get:
Code: [Select]
0 TRX    R_0      started (-30.00, 30.00)
        0 TRX    R_1      started (-10.00, 30.00)
        0 TRX    R_2      started (10.00, 30.00)
        0 TRX    R_3      started (30.00, 30.00)
        0 TRX    R_4      started (-30.00, 10.00)
        0 TRX    R_5      started (-10.00, 10.00)
        0 TRX    R_6      started (10.00, 10.00)
        0 TRX    R_7      started (30.00, 10.00)
        0 TRX    R_8      started (-30.00, -10.00)
        0 TRX    R_9      started (-10.00, -10.00)
        0 TRX    R_10     started (10.00, -10.00)
        0 TRX    R_11     started (30.00, -10.00)
        0 TRX    R_12     started (-30.00, -30.00)
        0 TRX    R_13     started (-10.00, -30.00)
        0 TRX    R_14     started (10.00, -30.00)
        0 TRX    R_15     started (30.00, -30.00)
200000000 cycles in 44130 ms => 4532064 cycles/sec

Any idea why? Thanks again for all your help. Once i get this example to work, then i can make my own modifications without bothering you.
« Last Edit: March 21, 2017, 11:57:47 PM by fgargiulo »
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 2565
  • Country: us
  • I informed you thusly
    • Personal site
Re: Wireless Network Simulator for LWMesh
« Reply #6 on: March 22, 2017, 02:41:13 AM »
Makefile from Peer2Peer should work, so let's figure that out first. What errors do you get?

The output you get looks correct, if devices just started and did not send anything.

You need to set APP_NWK_SIZE equal to the size of the network. Although even with your config, device 0 should have sent something.

It may be easier to start with configuration where APP_PEER_ADDR is defined, so you will only have 2 devices (0 and APP_PEER_ADDR) sending things to each other.
Alex
 

Offline fgargiulo

  • Contributor
  • Posts: 8
  • Country: ar
Re: Wireless Network Simulator for LWMesh
« Reply #7 on: March 22, 2017, 07:51:07 AM »
This is the error i get
Code: [Select]
process_begin: CreateProcess(NULL, gmkdir -p Debug, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [directory] Error 2

The only difference between both makefile is the line with the directory command. In PingPong makefile it is set to:
Code: [Select]
directory:
@gmkdir -p $(CONFIG)
while in the int_test makefile is set to:
Code: [Select]
directory:
@mkdir -p $(CONFIG)

I will try the example with the APP_PEER_ADDR defined and let you know if that works.
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 2565
  • Country: us
  • I informed you thusly
    • Personal site
Re: Wireless Network Simulator for LWMesh
« Reply #8 on: March 22, 2017, 08:00:38 AM »
Yeah, that's insignificant.

I'm traveling at the moment. I will try this stuff once I get a chance. I have not touched this simulator in a while. It was working when I left it.
Alex
 

Offline fgargiulo

  • Contributor
  • Posts: 8
  • Country: ar
Re: Wireless Network Simulator for LWMesh
« Reply #9 on: March 22, 2017, 08:03:29 AM »
Thanks, i would appreciate it.

I just tried with the APP_PEER_ADDR defined but i get the same behavior as if there is no transmission from node 0. Peer address is set to 24
Code: [Select]
#define APP_PEER_ADDR           24and the config file for the simulation is
Code: [Select]
# 1x2 grid configuration

seed 123456
time 200000000
scale 1.0

# Name X Y ID Firmware
node R_0 -30.0 30.0 0 PingPong.bin
node R_24 0 30.0 24 PingPong.bin

# Name X Y Freq Sens Output
sniffer S_0 0.0 0.0 2405-2480 -100.0 sniffer.dcf

# Name X Y Freq Power On Off
#noise N_1 100.0 100.0 2405-2480 -10.0 2000000 1000000

Is this OK?
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 2565
  • Country: us
  • I informed you thusly
    • Personal site
Re: Wireless Network Simulator for LWMesh
« Reply #10 on: March 22, 2017, 10:04:48 AM »
Ok, I see a problem, but I will need some time to get things fixed. It will have to wait until this weekend, I will need to figure out what exactly went wrong. I think header file for the simulated SoC got mixed up with the one from an experimental version.

You will have a working solution by the end of the week.

On the other hand, I will add some other cool new features from that experimental version.
« Last Edit: March 22, 2017, 10:07:17 AM by ataradov »
Alex
 
The following users thanked this post: fgargiulo

Offline fgargiulo

  • Contributor
  • Posts: 8
  • Country: ar
Re: Wireless Network Simulator for LWMesh
« Reply #11 on: March 22, 2017, 10:50:28 PM »
Great. I'll be waiting for the new source files. Thanks a lot for you help Alex.
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 2565
  • Country: us
  • I informed you thusly
    • Personal site
Re: Wireless Network Simulator for LWMesh
« Reply #12 on: March 25, 2017, 02:38:38 PM »
I just pushed the update. The major difference - it works :) It includes better (but less tested) RF model. It also includes new logging capability. Now you can just do something like this 'SYS_CTRL_LOG = "test string 123" ' and the string will be sent to the simulation environment and printed on the console. Because of this change, I disabled debug output for TRX. You can enable it back in the utils.h, just set DEBUG_TRX back to 1.

Another major change is support for interrupts and sleep. Now you can call "asm("wfi");" when application is waiting for the external event (a frame from other devices, or a timer event). Doing so will exclude this device from the simulation, which will speed up the whole thing quite a bit.

I will make a simple example that takes advantage of this feature tomorrow. For now, I'm including another version of LwMesh port. When you run it, you should see the output that look like this:
Code: [Select]
    20942 LOG    R_11     --- main() ---
    21652 LOG    R_9      --- main() ---
    74447 LOG    R_15     --- main() ---
   106942 LOG    R_8      --- main() ---
   136807 LOG    R_0      --- main() ---
   139442 LOG    R_1      --- main() ---
   140383 LOG    R_0      appSendData()
   144327 LOG    R_6      --- main() ---
   167202 LOG    R_10     --- main() ---
   179337 LOG    R_14     --- main() ---
   185237 LOG    R_4      --- main() ---
   199692 LOG    R_3      --- main() ---
   272212 LOG    R_12     --- main() ---
   277732 LOG    R_7      --- main() ---
   304702 LOG    R_5      --- main() ---
   307712 LOG    R_13     --- main() ---
   317747 LOG    R_2      --- main() ---
  3144264 LOG    R_11     appDataInd()
  3149412 LOG    R_0      appDataConf()
  3242088 LOG    R_11     appSendData()
  6249321 LOG    R_12     appDataInd()
  6254516 LOG    R_11     appDataConf()
Alex
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf