 Lora i Lora van introdukcjon. Więc co jest w tej części to zróbmy elementy Lora van ponieważ Lora jest fizyczna modulacją, to nie Lora van. Lora jest komponent, element Lora van. Więc zróbmy elementy Lora van to sprawy zróbmy problem wynuuyorsun moment. Jak zróbmy elementy Lora mão dialogy 很 mail Lora 3 Dzieci ma 3 c Cynthia to n de beats i praktyczna część jest certyfikacja flow. Co jest Lora Van? Lora Van to nie tylko radio. Radio jest tylko tutaj. Mamy 4 lęki systemu. Ten jest watermeter lub flowmeter. I jest to dziewczynka, i jest to dziewczynka. I w dalszej słowce możesz spotkać się w módze mote. Mód to naprawdę ważna część, naprawdę elementarowa część. Więc mód czy mód, czy mód czy dziewczynka. To jest dziewczynka. Teraz mamy gait węgnię. I to jest wystarczające. Funkcja gait węgnię to być pabą. To wszystko. Nie ma węgnię węgnię. Wszystko węgnię węgnię jest schłoną po węgnię. Więc węgnię węgnię wygłania w którym gait węgnię będzie wywiedził do gęcia do gęcia z pąty. I tak jak w oprogramowaniu oprogramowania, sierwery networku zdecydowali, z którymi szkodzie odpoczywały msg od modułów. I najwyższa lera jest aplikacja sierwera. Więc faktycznie aplikacja sierwera jest aplikacją, która jest widziana z klientami, z nie wiem, z utylitą. Więc tutaj mamy laura fizyczną, laura modulacją. Tutaj mamy IP-koneksje. Tutaj możemy mieć IP-koneksje, czy może być implementowane na fizyczną maszynę, czy może być implementowane jako serwery wirtualne. Wydaje się do expertów IT, ale tutaj mamy IP-koneksje, jak friży, jak wifi, optyka, fibr, jakiegoś. Link budżet. Dzieci, dla laura, całkowicie cieszy, o rączach, distances z komunikacją. Miałem bardzo atrakty egzempli na to. Jednym egzempliem jest, że jedna z integratorów laura networków podczas odpoczywania z Niemczech do Czajna, sprawdziła się laurę, i zapomnę, przeszkodzić laura moduł. A laura moduł wchodził do aircrafta, a kiedy w Czajniku wylądali, zauważyli, że to była transmisja pomiędzy laura modułem w środku aircrafta i laura gateway w Berlinie. Dysk z komunikacją było 113 km z południą antenę i z metanami aircrafta. To jest jednym egzempliem, ale oczywiście gateway w Berlinie jest bardzo dobrze pokazany, ponieważ to jest na południu tego TV toweru. To jest bardzo charakterystyczne budowanie w Berlinie z południą. I druga egzempla jest komunikacją pomiędzy base stationu, gateway i laura moduł w balonu w Alpsie. Dysk z komunikacją było dłużej niż 1000 km. Ale te dwa egzempli są teoretyczne, ponieważ w praktyce dystans jest mniejsze. Ok, więc nie mówimy o kilometrach, metrach, jeśli considerujemy ręcz komunikacji. Z jednej strony możemy considerować, że to jest budynek linkowy. To jest realne wartość i realny punkt, żeby analizować. Co jest budynek linkowy? Co są komponenty budynek linkowy? To jest wypowiedź o rozmiarze. Nie możemy zwiększyć wypowiedź na infinitu. To jest wypowiedź z regulacją, z hardwareem, etc. A potem mamy antenę. To jest też wypowiedź. Zdecydowałyśmy pewnego antena i nie ma dyskusji. Zdecydowałyśmy pewnego antena. A potem mamy wypowiedź od aktywnych antena. Zdecydowałyśmy antenę. Zdecydowałyśmy pewnego antena. Nie ma dyskusji. Tak więc to jest wypowiedź. I sensitowity od aktywnych antena. To może być wypowiedź. Niestety. Więc co jest konklusy? Możemy wypowiedzić budynek linkowy ale maximalizować sensitowity od aktywnych antena. Zdecydowujemy sensitowity od aktywnych antena. Wydaje komponenty, które wypowiedzą sensitowity. To jest wielka wypowiedź. Tzw. wypowiedź. To jest 10 desimalizm od aktywnych antena. Zbyt per sekund. To jest signal-to-noise ratio. I to jest noise factor od aktywnych antena. I znowu zanalizujemy. Signal-to-noise ratio jest limitowany przez kapacitynę. Więc powiedzmy to jest wypowiedź. Noise floor od aktywnych antena. To jest definyta przez design hardware. Być design of the front end. Fixed again. The noise power density, the background noise is fixed. We cannot change the physics. So the only degree of freedom, the only point to discuss, to tune is the data rate. So we can maximize the sensitivity by lowering data rate. That's the cost of the big distance of communication. And this is the chart. So as you can see, the lower data rate, the data rate is here on the x-axis. This is 10 in power of 0, 1 bit per second. The better sensitivity. Key message. You can reach expected distance of communication. But the cost is the data rate. And what is the cost of the data rate? One word. Energy. We are coming back to the modulation. So spread spectrum, chirp modulation. So cyclic shift from F0 to F1, then from F1 to F0. Patented modulation, so we don't know the details. Information is in shift of the direction of modulation. We have half duplex. So the communication is bidirectional, but we have half duplex. We have frequency-hoping, but not so advanced. In Europe we have three channels. We can use frequency-hoping to fulfill the duty-cycle limitation. The free band in Europe 868 MHz. So well-known to you, like wireless embass. 9.5 in US. The power limitation is 14 dBms in Europe. In US a little bit more. And duty-cycle limitation is 1%. The integration period for the duty-cycle is 1 hour, 60 minutes. 3600 sekund. 1% of duty-cycle limitation means that we can continuously transmit data for 36 seconds. This feature is automatically controlled by protocol stack and practical hint for you to switch off this feature for the development stage. Because it is annoying. You are testing something, you need to have quite frequent transmission because of testing. And the duty-cycle feature of protocol stack can stop your transmission. This table is very nice to catch the distance of communication details following the spreading factor. As you can see here for the spreading because in Europe we are using spreading factor from 7 to 12. So from 128 chips per symbol up to 4K chips per symbol. For spreading factor 7 we have very nice bit rate. Much more than 5Kbps. But the sensitivity of the receiver is FSK-like. So there is no difference. There is no added value comparing to FSK comparing to wireless embass. So I expect the comparable distance of communication for spreading factor 7. For the spreading factor, maximum spreading factor allowed in Europe 12. We have very nice sensitivity. 136 dbms. But the data rate dramatically drops down to 250 bits per second. So please be aware of this feature. So this chart, this theoretical chart in practice in real life. This is the indicative basic data rate. We need to consider the protocol overhead. So the practical data rate drops more down to, I don't know, 150 bits per second. Because the overhead is 30-40%. Depends on the forward error correction ratio. And again basics for better understanding. The chip rate it is multiplication by 2 in power of spreading factor multiplied by bit rate. Band width in practice we have 125-250 and 500 kHz. In Europe we have 125. Narrowing the band will increase the sensitivity of the receiver because we are integrating less noise from the band. Time on air. This is important. The higher spreading factor the longer time on air and the bigger energy consumption. Bit rate it is the number of the bits per second during TX phase. Forward error correction so the protocol overhead to correct the errors. Transmission errors. Coding rate 4x5 means 25% of additional information to correct the message. The higher percentage of forward error correction in payload the longer time on air. Range of the communication it is link budget. We are not giving the range of communication in meters or kilometers. Receiver sensitivity the wider band width the lower receiver sensitivity because we are integrating more noise. Narrowing the band we are integrating less noise. Very important feature of the Lora Protocol Stack. Adaptive data rate. So the protocol stack can adapt automatically following the over the air conditions tune automatically the data rate. So it means it tunes the spreading factor. So if the quality of the received signal is quite nice we can decrease the spreading factor. We can start from the biggest spreading factor to have a really robust communication. I if the quality of the received signal is good we can decrease the spreading factor lowering time on air. And that's why this is good for the device. We can decrease the energy consumption then not we. The protocol stack can decrease can reduce the energy consumption by tuning the data rate in adaptive way. And it is also good for the network because we are reducing the traffic over the air traffic. And this way we are optimizing the network capacity. We are increasing the network capacity. The classes, the modes of operation. Class A, this is very basic and most common class for flow meters, water meters, gas meters, heat meters. It is the basic class. Node transmits uplink. Uplink means from the node to the network in up direction. Node transmits data. Node can transmit data synchronously so every period. And or can transmit as synchronously because of some event. I don't know tamper detection let's say of the water meter. So the network must wait for the activity of the node. There is no way for the network to send downlink at any time. Network must wait for the node activity. Node transmission. After the transmission node opens to receive windows. Up to, up to to receive windows. So after transmission node waits for the receive delay one. It is in practice one second. Then opens rx slot. And if there is no over-the-air activity it goes sleep. That's why we have hardware feature to detect the radio activity, the channel activity. Because we can go sleep quicker and save energy. If there is no activity during first rx slot it goes sleep. And then after receive delay two which is in practice two seconds it opens the second slot. And then go sleep. And the procedure is repeating. The class B. For example the area of implementation it is prepayment water meter. Customer can buy some amount of water and then needs to activate the credit. So it would be nice to send this credit to the water meter in not so long time. And the class B lets to send downloading message. So from the network to the node within scheduled windows, time slots. And how does it works? Always the basic mode it is the class A. It is on the responsibility of the node application to decide when it wants to switch to class B. From class A. So in class A node sends to the network request to switch to class B. And then opens the receiving window. And within this window the network sends first so-called beacon. So the synchronization information. And this information synchronize the local node RTC tunes the local node RTC to follow the RTC the time base of the network which is GPS based for example. This is the first function we are tuning the local RTC the local time. And then the second information is the pink period. Because in class B the node opens periodically the receiving window accepts those windows. So this is the additional functionality. For example every 16 seconds we have additional receiving window synchronized to the network. So the network every 16 seconds can send the downing to the node. So this is the 16 seconds it is a pink period. And we need to synchronize periodically. So we have the second period, the beacon period. Because of the floating of the time base for example RTC crystal on the node. So after beacon period within pink slot network sends again the synchronization. So this pink period it is for example 16 seconds the beacon period can be I don't know few minutes for example depends on the particular conditions depends on designer in fact. So in our example designer buys some amount of water he needs to wait up to I don't know 32 seconds to update the credit in water meter. If the mode B is activated. Of course the cost the background of class B it is the again the higher energy comparing to class A. And the third mode of operation class C. So class C is a classic way of operation. So we are transmitting data and then immediately we are switching to the receiver on. Because this is HALT duplex. Of course it is for grid operated devices. We need a lot of energy because of continuous operation of the transceiver crypto coverage and crypto in general for Laura. The level comes from AS 128. So quite basic. All the messages all the data is scripted by AS 128. And you need to be aware that we have two types of packets the MAC packet or the network packet for the management of the network and the user packet the data the payload packet. So we call it MAC messages and application messages. And we have different key security key for MAC messages and different security key for application messages. For network it is network session key for application it is application session key. This is the coverage of the network session key. So because this is this is MAC message network management message it stops in the network server for the application it stops in the application server. Message integrated check So the message integrated check it is the field of the packet which is related to the security communication. So protects us against the tampering of the communication some false attacks and it also increase the robustness of the communication because it is like very advanced CRC. So the message integrated check is just a number which is computed for each packet and network session key. And it is added for the as a last field of the packet. So this is the range of the MAC computation and this way the network server and application server can verify the transmitter. So additional mechanism to increase the security. It is hidden so in everyday practice of Laura engineer you don't care about MIG it is a feature of the of the security. But you need to take care about the activation methods. When the note is a virgin it is not connected to the network it needs to connect to the network in defined way. So we have two activations methods. Over the air activation and activation by personalization. Over the air activation it is the most common activation. Do you know what we need to connect to the Wi-Fi network? We need the MAC number of our module. We need to know the name of the Wi-Fi network and we need to know the password. This is the equivalent. And device has a sign device unique ID. Def EUI. This is the MAC number. The name of the Wi-Fi network in this case it is the application unique ID. The number of the application. This is the name of the network and this is the application key so this is the password. So to join to the Laura network activation we need to send to the network to the application server our MAC number which means device unique ID we need to send to which network, to which application we want to join so the application unique ID and we need to send the password. Application key. Then def EUI allows to the network to identify the device in the database. Application EUI identify to which application server we want to connect or we want to talk to. Application key crypt this message send to the application server. After receiving the join request from the node the application server sends to the network server and then to the node the join accept message. And this message consists of IP number assigned IP number of the node and in Laura it is so called device address def ADDR and two security keys and we know those security keys so we got device address and we got network session key and application session key. Now we can communicate to the network. And the second way of the activation we can just hard code we can just flash all those values during production stage. This is a little bit more easy than the over the activation we don't need the activation stage we can save the energy but we need to manage all the security during the production. We need to manage how to store the keys, how to distribute the keys in safe way etc. So the cost of the activation by personalization is the little bit more complex production process. So when activated by personalization the node is ready to communicate to the network immediately after power on without joining stage. Physical layer the key message compatible with 802.15.4 so Zigbee, Bluetooth etc. We have preamble to synchronize with the receiver and the preamble detection is the really important part of the packet because it lets to save the energy thanks to the channel activity feature of the receiver so if the preamble is broken we can go sleep immediately and save the energy then we have hider of the physical layer packet and CRC of the hider and then payload and the CRC of the payload and all the packet except the preamble is covered by the forward error correction code so there is overheat because of the coding crate. Medium access. The key message is that the Laura protocol is encapsulated. So this is I would say standard way protocols. We have physical layer payload and within this physical layer payload we have MAC message. M-HDR means MAC medium access layer hider we have MAC payload and our security value the message integrity check and then within MAC payload we have frame hider we have port number because for Laura MAC layer we have ports like for our IP communication and then payload the key message encapsulation in fact the layers of the protocol stack are isolated and now we are more and more close to the software engineer's practice because we are starting to discuss how to implement the real application so the protocol stack layers are isolated and how to interact between those layers let's consider the MAC layer and the MAC layer user MAC layer user means in fact application layer in our case i will highlight that the Laura protocol stack is compatible to 802.15.4 and in this standard there is a particular mechanism of the implemented of the interaction between the isolated protocol stack layers when we want to ask MAC layer we the user layer wants to ask MAC layer for something the MAC user layer sends request to the lower MAC layer for example we can request for transmission of the data and this request is propagated to the lower layers down to physical layer the transmitter physical transmitter transmits data and then after transmission as you remember there is a interrupt and this interrupt is propagated over the lower layers and through MAC layer and appears to MAC user layer as confirmation message so request for example for transmit data for transmission MAC user gets confirmation request confirm so this is let's say synchronous event because we as a MAC user layer can control when we are sending request to the MAC layer and after request we know that we need to wait for confirmation what about for example receive event this is the asynchronous event so when the receiver receive the data physical receiver receive the data this interrupt is propagated through the layers and MAC layer sends to the MAC user the indication message and MAC user some processing of the user payload of receive data can response to the MAC layer can acknowledge to the MAC layer by response message so to conclude the cooperation the interaction between isolated layers for this IEE standard is implemented as a couples of request confirm when we want to ask for something and indication response when some asynchronous event takes place so request confirm is triggered by MAC user indication response is triggered by MAC so this is the theory this is the practice how to implement it for example you remember the callbacks from yesterday from HAL library the callback it is the application part only application part of the interrupt service so within HAL library you don't care about flags etc you need to care about the application only and this is the callback and the same idea co-operation between isolated layers so for example when the transceiver receive the data the indication message is sent from the MAC layer this indication can call the callback RX data this is the implementation of the mechanism so the callback can be called after the indication and for the first mechanism request confirm for example when we request to transmit data the MAC layer can call the callback TX done so the implementation of the mechanism this is the practical implementation of the mechanism which is expected by this standard so we need to implement the request confirm mechanism so for example when we are requesting for transmit data so the arrow in this direction when TX is done the MAC layer is calling TX done callback and we can put our implementation of the body of this function this is the example of the of this interaction we are waiting for the for the transmission and callback is Laura RX data so MAC layer is calling callback Laura RX data and we need to response to the MAC layer but in our case our response is only void because we have nothing to inform the MAC layer I took the transmit data and receive data as the most basic ones but of course there are a lot of MAC commands for example we can ask, we can request for the link check for the quality of the link we can ask the MAC layer to activate link ADR request we can request MAC layer to activate automatic data request etc etc and how it is implemented the data rate adaptation we can send data in two modes in app link direction without confirmation and with confirmation when the confirmed mode is active the receiver, the node expects acknowledge to receive an acknowledge after the app link transmission so app link transmission and then download so if there is no acknowledge there is some very simple algorithm to tune the data rate so we are starting first transmission with current data rate if no acknowledge then we are trying again with the same data rate let's say high data rate if no acknowledge then we need to lower the data rate in first step by one if no acknowledge then again we can try data rate minus one if no acknowledge, data rate minus two etc etc down to data rate minus three because the higher spreading factor or the lower data rate the higher sensitivity of the receiver and the more robust transmission we already discussed the cycle limitation so again to clarify for there are two mechanism following this european norm to limit the over the air traffic the first mechanism is listen before talk this is a little bit more advanced but unfortunately for Lora regional definition for Europe and some other regions there is no listen before talk feature there is second mechanism defined by this norm duty cycle limitation and following this norm in a period of one hour the duty cycle shall not exceed the spectrum access for one percent so we have one hour integration period it means 2600 s and considering one percent of duty cycle limitation we can transmit data continuously during 36 seconds but how it is implemented in Lora protocol stack for Europe we have three channels within the band within the allowed frequency band we have three channels so when we exceed the duty cycle limitation on channel number one we can switch immediately to channel number two so in fact we can continuously transmit data during free multiply by 36 seconds and it is controlled automatically by protocol stack again just to better memorize the hint please switch off the duty cycle control when the staff is under development just to avoid annoying blocking of the transmission the last part of this presentation certification so in fact to certify the device you need to ask for the membership in the Lora Alliance organization i na tej web page jest procedura certyfikacji oczywiście musimy otworzyć dokumentację produkcji hardware, firmy i software typiczne certyfikacje i pójść mamy kilka autoryzacji test w domu i test są związane z physical i mac layer ponieważ mac layer ma jakiś czas jak pamiętasz rx klucz na przykład więc czas jest zapewne ale certyfikacja Lora nie koło CE certyfikację dla CE certyfikacji trzeba być w porządku z tą normą i na szczęście certyfikacja zawsze koło CE certyfikację ale to znaczy wyższa na przykład autoryzacji test w domu więc dość objęte