TheThingsArchive / ttn

The Things Network Stack V2
https://www.thethingsnetwork.org
MIT License
461 stars 276 forks source link

ttnctl gateway register doesn’t support negative lat/long coordinates #694

Closed Tombar closed 6 years ago

Tombar commented 6 years ago

This is a bug report for ttnctl.

What do you want to do?

Register a gateway through ttnctl from Uruguay, South America which happens to have negative coordinates.

What steps did you take?

ttnctl gateway register eui-00800000a0000d05 US_902_928 -34.912467,-54.975863 --router-id ttn-router-us-west

What went wrong or what is missing?

unknown shorthand flag: '3' in -34.912467, -54.975863

Do you have Screenshots?

:)

What kind of OS/Browser/Gateway are you using? Which version?

ttnctl version
INFO Got build information                    Branch=master BuildDate=2018-01-03T14:29:22Z Commit=8477a84c83a4c4e3e33749d62c03c8b4b4d21924 Version=v2.9.1-dev
INFO This is an up-to-date ttnctl build

It looks like ttnctl gateway register doesn’t support negative lat/long coordinates being passed in as CLI args, is there any workaround for this?

I believe it’s a problem upstream with spf13/cobra - https://github.com/spf13/cobra/issues/124

htdvisser commented 6 years ago

It doesn't look like this is going to be fixed upstream. A workaround would be to register your gateway at a different location and then change its location with ttnctl gateways edit <gateway id> --location "-34.912467,-54.975863"