LoRaWAN OTAA protocol specification - c

I'm trying to implement communication between LoRaWAN and module using RFM95W with STM32L476. The problem I'm facing is that there is no library for dealing with OTAA and I wasn't able to find any relevant source how it looks like or how it works. Now I'm just able to send raw packets. It would be better if I coded the communication myself but I'm ok with working library, thanks
This protocol uses DevEUI AppEUI and AppKey

There are many libraries for stm32 for LoRa. For myself I go with the official LoRaMac-node from semtech. If your starting the journey into C and STM32, you can just start with the mbed-os.

To start to play with LoRaWAN protocol and demo board, there are two mains ways:
Use the LoRaWAN stack from ST and ST projects : use ST-cube: https://www.st.com/en/embedded-software/i-cube-lrwan.html
Use the LoRaWAN stack provides by Semtech (for information Semtech is the provider of the IP of the radio LORA and radio chip(as SX1276)) and pre-configured projects : https://github.com/Lora-net/LoRaMac-node
For the demo, you can use the ST demo board B-L072Z-LRWAN1 :https://www.st.com/en/evaluation-tools/b-l072z-lrwan1.html .
Don't forget, to use the LoRaWAN protocol, you must be compliante with ETSI(for europe) or FCC(for USA) regulation(frequency plan to use, duty cycle to respect, radio power to respect..)
And To use a LoRaWAN device, the message sent by the device is received by a LoRaWAN gateway (provided by apublic operator (like Orange or Objenious in France, Senet in USA) or by a private network( your gateway with your server), or a by community gateway like TTN)
TTN(The Thing Network) is also a good provider of demo board and server + gateway to start to play with LoRaWAN : https://www.thethingsnetwork.org/docs/
All LoRaWAN specifications are hosted by the LoRa Alliance: https://lora-alliance.org/
Have a good LoRaWAN XP!

Really? No libraries? Check it out https://www.st.com/en/embedded-software/i-cube-lrwan.html

Related

Building an own socket API to send UDP packets over LoRaWAN

I'm building a LoRa network where the server and the end-device need to communicate using a protocol which normally transmits data via UDP. Due to the fact that these two protocols act totally different I need to find a way to combine those two.
One solution I found is to create my own socket API which provides send, receive, bind, ... functions. But here I'm actually struggling.
In which scope do I need to write my socket? Is it enough to just edit the functions and rely on the other given parameters such as the address families? Or must I define my own AF and if so where/how is this achieved.
I'm looking forward to your answers / ideas.
According to the LoRaWAN specification and my limited experience, LoRaWAN is not suitable for such situation. If you still wanna use UDP packets over LoRaWAN, here are some tips for your question.
In which scope do I need to write my socket?
You may use sendUnconfirm function since this function does not need ACK from gateway. And port in LoRaWAN could play the role of bind in UDP socket.
Is it enough to just edit the functions and rely on the other given
parameters such as the address families?
LoRaWAN server has its own features and structure. Usually, a LoRaWAN server is consist of packet_forwarder, LoRaWAN server and LoRaWAN application server. You may use these features to build you own application on LoRaWAN applicaiton server. It could save your a lot of time.
It is highly recommended to read LoRaWAN specification (Get it here) and TTN LoRaWAN wiki to help you get a better understanding in LoRaWAN.

Connect via bluetooth to an android device without a custom application

I would like to use an arduino with a bluetooth module to modify the volume and skip songs on my phone.
All the information I found was about how to code an application that would communicate with a device via bluetooth, which isn't what I am looking for. I want to know what protocol I should follow to connect to an android device via bluetooth like a car radio would do.
My goal is to be able to use my device as a remote to control the built-in music application.
I think you are looking for the AVRCP protocol. Please send more info about your hardware so I can digg a better answer (if you need more, anyways...).

ZigBee Gateway Clarification?

I am working on setting up a project where I should be able to control my ZigBee End Device (ZDO or ZED) from an IP gateway. On having a detailed study, I understood on having a setup established.
However, I need to confirm if ZigBee devices from different vendors will be able communicate with each other?
If they can communicate, can a common (generic) Gateway be used for accessing or controlling the end devices (from different vendors) from a IP network?
Kindly lend me your suggestions. Also, your advice on the devices already available or how to progress?
Yes, the concept of a ZigBee Gateway is to provide an IP interface to a ZigBee network. All certified ZigBee devices of a given profile (Smart Energy, Home Automation, etc.) should be able to join a network that you can then access with a Gateway.
Just make sure you're using a certified ZigBee Gateway.
Other companies, like Digi International make devices with IP and ZigBee interfaces that you may be able to use, if you're not interested in using the Gateway Standard.

Communicating using Dragon12 board with xbee chip

So basically, me and a friend are using the Dragon12-Plus2 board for our class in school, and we are trying to get them to talk via Xbee chips. We have hooked one of them up, and simply need a bit of code to get the Xbee to talk with the board so we can make sure it's in correctly. We are writing in C using Freescale Codewarrior, and as much help as possible is appreciated, especially next steps such as when we hook up the other one, how to get the two to talk and test, etc. They should in theory already be set up as a point-to-point system, but we don't have much experience at this time. Any help would be greatly appreciated
If you configure the XBee modules with "AT mode" firmware, you should be able to use the serial port on the Dragon12-Plus2 board to communicate just as you would with a wired connection.
You'll need to configure both radios with the same PAN ID. Make one a coordinator and the other a router. On the coordinator, configure the DH and DL settings to match the SH and SL settings of the router. You can keep the router's default configuration of using 0 for DH and DL, which tells it to send data to the coordinator.
Do your testing on a PC with a two terminal emulators so you can verify that data sent in on one comes out on the other and vice versa.
Here's an excellent guide from the Digi website on Basic XBee ZB ZigBee (Series 2) Chat which provides more detail and a step-by-step guide for configuring the radios.

How to send UDP multicast packets through Silverlight?

I'm trying to find a way to send a udp broadcast packets through a silverlight application. Most of the research i've done lists that this is not possible through silverlight due to the support for sockets being limited to tcp only. But is there some other way to send a broadcast packet for example through javascript or something that the silverlight application can call?
Silverlight 4 supports UDP for multicast.
Articles / Examples
example of using UDP multicast support in Silverlight 4
blog entry from the System.Net Team
Classes
UdpAnySourceMulticastClient
UdpSingleSourceMulticastClient
The only plugins that support UDP client sending is Unity3D or Java. The problem mainly is when you use UDP you also need NAT punchthrough usually. So it is more complex (need a third party facilitator) since typically it is also peer to peer not just client-server.
You might be able to rig something with a proxy with Unity3D or Java but that would be a serious slowdown passing it into silverlight.
Silverlight and Flash only support TCP sockets currently.. Flash 10 does have some support for RTMFP which is UDP based but that is primarily for flash media server integration.
A response on the support of UDP in Silverlight: http://silverlight.net/forums/t/20249.aspx
You'll probably need to create your own custom browser plugin to do that for you.
As far as I know it isn't possible to use UDP with the major browser plugins, Flash, Silverlight etc. TCP is the lowest you get.
Browser based JS does not give programmatic access to UDP or even TCP. That is why you have AJAX, HTTP binding, Comet, XMPP Bosh etc. They try to emulate TCP's features with HTTP...
It appears Flash supports UDP as of Flash 10. I haven't tried it out but it sounds like it is not a low level API, only through RTMFP.
http://www.flashcomguru.com/index.cfm/2008/5/15/player-10-beta-speex-p2p-rtmfp
http://justin.everett-church.com/index.php/2008/05/23/astrop2p/
Flash Player 10.1 supports P2P with Adobe RTMFP and Stratus service. Stratus service is a Beta hosted rendezvous service that aids establishing communications between Flash Player endpoints. Unlike Flash Media Server, Stratus service mainly focuses on network address lookup and NAT traversal services for Flash Player endpoints, instead of supporting media relay, shared objects. This kind of service will also be integrated into next version of FMS.
No there isn't. Most browsers limit you to HTTP or FTP so calling out to Javascript isn't going to help either.

Resources