I need help in my project

Hi,
i’m a bigenner and i was asked to creat a project using the gateway dragino dlos8 and dragino lorawan I/O controller LT-22222-L . i already connected the both of them in ttn but i dont know how i can programme the lt -22222-l and wich programating langage am i supposed to use ? can i write a c code programme on ttn? and how can i connect the controller to send (or receive) data to the gateway so he can send to ttn? and any information or advice in general would be appreciated.

Have you looked at the excellent manual that comes with the device - it shows how you configure it - you don’t need to program anything.

Nope - you use an Integration to get the data out, then you can process it anyway you like.

You don’t as the device doesn’t “connect” to a gateway. The gateway converts valid LoRa radio signals and passed them to TTN. You actually connect to TTN. So if the gateway is showing activity in its console log, then that’s working. If you see activity in the device console log, then it’s connected to TTN.

So if that’s working, the next step is to configure the device and then get the data out of TTN.

There is the Learn link at the top of this page (you have to scroll to the top) and there is a link on every console page to the documentation.

thanks for responding, i didnt get any excellent manual but theres some of them in the internet i followed the steps. if you mean by configurating the device joining the eui and appkey i did it but its not receiving data, all im receiving is MIC mismatch i think its because my device is class A and the only options that i have in ttn are class b and c. i tried to change the devices class by using serial communication and at commands but it gives an error.
and if i dont need to progrm the LT device then how can i command it to do certain tasks automatiqually cause i want to built a wireless automatic irrigation system (where i can use if and while loop).
im sorry i dont get what you mean by “you use an Integration to get the data out, then you can process it anyway you like.” if you can explain how can i do that or if you have any link or artical about this can you please montion it.
and i wanna ask also if thins device(dragino LT-22222-L controller) has a microcontroller inside that i can program.

Visit their website.

  1. MIC mismatch means your AppKey does not match. Device and TTN have different values.
  2. TTN uses class A. All LoRaWAN devices do. You can add class B or class C by selecting the appropriate checkbox, if you do not select one TTN uses class A.
  3. Your devices (with the newest firmware) is class C by default. Not class A. However keep in mind your are only allowed to send 10 packets to the device on a day,

You can’t. The device sends data to the LoRaWAN network and changes state based on commands it receives.

There is a controller inside that drives the LoRaWAN stack. If you know what you are doing and are able to create software for a LoRaWAN node from scratch based on the on-line available circuit diagrams you can create your own firmware. Very much unsupported and it requires a good knowledge of LoRaWAN which given your questions you do not have yet. I would suggest you start with LoRaWAN 101 (also known as the basics) before attempting to create your own firmware for a node.

You said you had it connected to TTN.

This usually comes from a key error - please can you check that the AppKey that the the device reports on the serial console is the same one that is on TTN.

Everyone has Class A, you just don’t select B or C.

There are no programming constructs like that - it’s setup in the configuration - the manual(s) detail all the settings.

Yes, there is a microcontroller inside, an STM32L072CZT6, and the source code is on GitHub, the link to it is on the Dragino website next to the manuals.

i thought it was connected then i started to get MIC mismatch. i cheked the appkey and all the other keys they do match and i even deleted the end device and added a new one and copied the keys and eui right from the serial port. do i have to put the appskey in the appkey place? the prob that i get trying to find the manual is that i dont know wich version is this controller i opened it and all i found writed is lora st v1.1 wich i think is the lorawan version. all i know is accorded to the information offered from the serial port and the sticker shipped with it, i dont even know the regional parameters version.
and when it comes to programing so u sade there is no way to program it from ttn all i can do is create a firmware (wich is as you said requires good knowleadge) so its gonna be hard for me.
and as i understood the javascript option on playload formatter is only for decoding i cant programme my device from it.
please correct me if i’m wrong.

No. If you watch Everything you need to know about LoRaWAN in 60 minutes - Johan Stokking (The Things Industries) - YouTube you should get a better understanding of LoRaWAN and the parts involved.

Programming a device is something the device vendor facilitates, not the network provider.

It sounds like you want to use LoRaWAN for something it is not suitable for (real time control) and due to fair access policy TTN is even less suited for.

That’s the microcontroller board version.

You don’t need to.

Dragino has already done all the hard setup work for you if you use the device repository when you set it up - all you need to choose is where in the world you are (as the device can’t do that for you) and put the EUIs/key in to the entry box.

But you still can’t get the device to automagically do anything for you, it’s a sensor that sends back data. You can send it commands (occasionally), but you’ll need to script that.

Why is it sad that it doesn’t do something it was never designed to do and never advertised to do?

If you want to create an automated irrigation system, why not start out simple with an Arduino based sensor & pump, get that working, and then add some radio to get status reports once that bit is done.

i found that the problem what from the lorawan version it was wrong. now i get "Forward join-accept message* link " and “Accept join-request” is it connected now or i have to receive data?
and as you said “But you still can’t get the device to automagically do anything for you, it’s a sensor that sends back data. You can send it commands (occasionally), but you’ll need to script that.” where can i script that?

Yes, but you really need to learn LoRaWAN basics otherwise we, the volunteers on here, there is no paid support on TTN, will lose the will to live.

Learn about downlinks.