How to connect a STM32L072 device to TTN

I am new user of TTN and I am trying to connect a device ( ST b-l072z-lrwan1 board) to the TTN. I have learned that I have to create an application and a device in the console platfrom of TTN. But should I also define a Gateway ? How TTN understand that I will connect to the local gateway (I am working from Rome) ?
Thank you . Bye

Are you in range of an existing GW? If yes, then no GW needed, but would be recommended as then if you have direct access to GW logs you can more easily debug/develop your node and application. If not in range, can you easily drive/move close to one for initiall testing? If not then yes you need to acquire and register a GW…

…do that anyway as it helps expand the comunity and the coverage :wink:

Thank you very much. OK. Now I need to now which Lorawan version, regional parameters version, and frequency plan to define for this device. Where to find these values that are needed in the manual registration as end device ?

As per Slack (please only post in one place) depends on the software - the hardware you have is a processor & a radio - the protocol is determined by the software.

I would like to ask . Since I did not yet had success in registering a device and I wanted to have access to the gateway in order to better understand and have a diagnosis of failure of loramac command I should I do ? Thank you
bye

As sub question … How can I know if I am in the range of a local gateway or not ?
Thank you
Bye

Look at the map on ttnmapper or use https://www.thethingsnetwork.org/map to check if there are any gateways close to you. In a city close means < 500 m away. Larger distances may work but there are no guarantees.

To gain access to a gateway you need to buy one yourself and add it to TTN or find the owner of another gateway close by and ask him/her to grant you read access.

I suppose that I am far some 5-6 kilometres from my closest gateway. So it should not work. And I need to add my own gateway. Right ?

In a city that probably will not work. Only if you have a clear line of sight (no buildings or windows with coating in between) from you node to the gateway antenna it might work.

Yes, very likely required.

Please, I see this discussion and I am asking if you know with which parameter should I register a B-L072Z-LRWAN1 device . I mean V1.0.2 or V1.0.3 ? or anything else ? And what PHY- version V1.0.3 REV A ? or REV B?
Thank you for your help
bye

If you are using i-cube-lrwan, please read the documentation of the version you are using which specifies the information you are looking for.

This is triple posting, two on here, one on Slack - please consider the volunteers answering your questions don’t have time to figure out which thread to use