lds icon indicating copy to clipboard operation
lds copied to clipboard

Error while running cli

Open AntoineLeLoarer opened this issue 4 years ago • 3 comments

Hello,

I've tried yesterday the simulator. I succcesfully run the gui version and so i've decided to try the cli with the same configuration file but each time i do a : run go main.go I have an error that say :

# command-line-arguments ./main.go:171:15: undefined: lds.DataRate ./main.go:190:7: undefined: err ./main.go:212:14: undefined: lds.RxInfo ./main.go:246:4: unknown field 'Timestamp' in struct literal of type "github.com/brocaar/loraserver/api/gw".UplinkRXInfo ./main.go:276:22: device.Uplink undefined (type device has no method Uplink)

I'm a beginner to go so I don't truly understand where it's come from so if you can add some documentation on the cli version and how to run it, it'll be a great help.

AntoineLeLoarer avatar Jun 09 '21 09:06 AntoineLeLoarer

Hi @AntoineLeLoarer

The GUI version had undergone some overhaul, however GLI version was not touched at all. Most probably it is broken. I'll take a look a.s.a.p.

Thank you for noticing.

scartill avatar Jun 09 '21 09:06 scartill

Hi @AntoineLeLoarer,

It looks like the CLI tool haven't been touched for a while and requires some re-thinking. Could you please shortly describe the use case? Is it a single-call tool, interactive loop, or maybe a kind of scripting?

scartill avatar Jun 27 '21 07:06 scartill

Hi @scartill,

Thanks for your time,

I've studied a little bit and a use case will be :

  • A command to make a join that return a json of the keys ( DevAdr, NWSKey, APPSKey ...)
  • A command to make a simple emit of a lora frame

Each command will take a path to conf.toml. The file conf.toml don't be edited, maybe you can delete the part about redis and window size. I don't need either encoded type, just a raw payload in toml will be enough.

I hope it'll be easier to you

AntoineLeLoarer avatar Jun 28 '21 13:06 AntoineLeLoarer