brocaar / chirpstack-simulator

Simulator utility for the ChirpStack open-source LoRaWAN Network-Server.
https://www.chirpstack.io
MIT License
64 stars 52 forks source link

Cannot run binary #10

Open eldiablo-data opened 3 years ago

eldiablo-data commented 3 years ago

Hi,

I am working on Windows 10. I followed the instructions in README.md and the binary file was created in build.

    Directory: C:\Temp_Data\chirpstack\chirpstack-simulator\build
Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       09/07/2021     09:46       14884864 chirpstack-simulator

I created the toml file manually using the template from README. When I try to run the simulator, it does not work. I get the following output from powershell:

PS C:\Temp_Data\chirpstack\chirpstack-simulator> .\build\chirpstack-simulator -c .\chirpstack-simulator.toml
Program 'chirpstack-simulator' failed to run: No application is associated with the
specified file for this operationAt line:1 char:1
+ .\build\chirpstack-simulator -c .\chirpstack-simulator.toml
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
At line:1 char:1
+ .\build\chirpstack-simulator -c .\chirpstack-simulator.toml
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

When running the same from bash, i get the following error message:

$ ./build/chirpstack-simulator -c chirpstack-simulator.toml
bash: ./build/chirpstack-simulator: cannot execute binary file: Exec format error

Does the simulator work well in Windows? Any suggestions to get it to work?

Thanks.

liangyuanpeng commented 2 years ago

You should build file for windows, like chirpstack-simulator.exe and it's build linux binary by default.

reza-aslani commented 9 months ago

install go lang in your windows cd chirpstack-simulator\cmd\chirpstack-simulator go build copy chirpstack-simulator.exe ..\..\build\ and the rest of process...