“FPort values 1…223 (0x01…0xDF) are application-specific. FPort values 224…255 (0xE0…0xFF) are reserved for future standardized application extensions.”
In other words, you are free to use values between 1-223 for any purpose you chose, and it is entirely up to you do decide what values your node and infrastructure software sets or looks for and what meaning (if any) it assigns to each value.
Given that airtime is a precious commodity, since you pay for these bits anyway you might as well try to use them to distinguish various types of messages your components send to each other, rather than spending yet more to put that in the payload of your messages. (Granted, given the multi-byte coding, adding an extra byte doesn’t always increase airtime until you bump over the next coding group threshold)
It is used for whatever you decide it is used for.
Do I have to decide that my nodes and application software will use a certain fport number?
That would be the general idea, yes. Start with 1 for your first packet type and extend from there as your needs grow.
If they are not the same what happenes ?
You probably might need to set a legal value for packets to be sent and correctly interpreted. 1 is a legal value.
Depending on what software you use in the node, you may need to ignore illegal values if they are delivered to you. It’s probably simpler to only act on expected values.
TL;DR set it to 1 and check for that.
Or any other legal number you like.
Uplink and downlink numbers are distinct, you can chose to make them match or not.