Seeeduino Lorawan

Arduino, Seeeduino Serials and mutants. Share your problems and experence on arduino compatible board such as seeeduino/stalker, etc.

Moderators: lily.li, violet, salmanfarisvp

Anonymous
Kindergarten
Kindergarten
Posts: 92
Joined: Mon Jun 03, 2019 10:58 am

Seeeduino Lorawan

Post by Anonymous » Fri Mar 29, 2019 1:34 pm

> Hello guys,
>
>
> I am having great difficulty connecting this Seeeduino to a Windows 10 PC.
>
> I have tried various instructions from the Seeed Wiki. I have manually
> added the driver and nothing is working.
>
> I am hoping you may be able to engage somebody to help me? I am reading
> forums and it doesn’t look particularly good, there are a number of people
> experiencing the same issue. thanks.
>
>
>
>
>

Seeed Tech Support
Pre-kindergarten
Pre-kindergarten
Posts: 0
Joined: Mon Jun 03, 2019 10:51 am

Post by Seeed Tech Support » Fri Mar 29, 2019 5:56 pm

Hi there,

What is detail issue? Please provide the device manager picture to us. 

If your COM port does not display on device manager, Please double press the rst button.


Thanks

best rgds
Bill


Anonymous
Kindergarten
Kindergarten
Posts: 92
Joined: Mon Jun 03, 2019 10:58 am

Post by Anonymous » Fri Apr 05, 2019 9:45 am

Hello Seeed support team,

I am really hoping you may be able to assist me. I am very excited about what we may be able to achieve with this device however I’m having problems with OTAA.

The device works fine in ABP mode. I am trying to connect it to TTN and for obvious reasons I need it to work in OTAA mode.

The below sketch will generate a Join request on my TTN application and TTN is sending a Join Accept back which the Seeeduino does not receive.

We are using AS923 Frequency plan. I have tried adjusting different parameters i.e. ABP etc. Is there any advice you can give me here?

There is the potential for us to use thousands of these devices in the residential and mining communities we currently supply internet services to. My boss wants to go with an out of the box solution, help me get this working so that I can prove to him this will be the better way to go.


[cid:image001.png@01D4EBA4.D0C28580]


Seeeduino Lorawan Sketch


#include


unsigned char data[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0xA,};
char buffer[256];

void setup(void)
{
SerialUSB.begin(115200);
while(!SerialUSB);

lora.init();

memset(buffer, 0, 256);
lora.getVersion(buffer, 256, 1);
SerialUSB.print(buffer);

memset(buffer, 0, 256);
lora.getId(buffer, 256, 1);
SerialUSB.print(buffer);



// void setId(DevAddr, DevEUI, AppEUI);
lora.setId(NULL, "47DB558000300027", "70B3D57ED001A447");
// setKey(NwkSKey, AppSKey, AppKey);
lora.setKey(NULL, NULL, "047839001E5D3E0B63188CB063B93383");

lora.setDeciveMode(LWOTAA);
lora.setDataRate(DR2, AS923);

lora.setChannel(0, 916.8);
lora.setChannel(1, 917.0);
lora.setChannel(2, 917.2);
lora.setChannel(3, 917.4);

lora.setReceiceWindowFirst(0, 923.3);
lora.setReceiceWindowSecond(923.9, DR0);

// lora.setDutyCycle(true);
// lora.setJoinDutyCycle(true);
// lora.setAdaptiveDataRate(true);

lora.setPower(10);

while(!lora.setOTAAJoin(JOIN));

}

void loop(void)
{
bool result = false;

result = lora.transferPacket("Hello World!", 10);
//result = lora.transferPacket(data, 10, 10);

if(result)
{
short length;
short rssi;

memset(buffer, 0, 256);
length = lora.receivePacket(buffer, 256, &rssi);
if(length)
{
SerialUSB.print("Length is: ");
SerialUSB.println(length);
SerialUSB.print("RSSI is: ");
SerialUSB.println(rssi);
SerialUSB.print("Data is: ");
for(unsigned char i = 0; i

Seeed Tech Support
Pre-kindergarten
Pre-kindergarten
Posts: 0
Joined: Mon Jun 03, 2019 10:51 am

Post by Seeed Tech Support » Mon Apr 08, 2019 2:19 pm

Hi Robert, 

Please try below example and configure to your

AS923. Please let us know if you do not get it work. 



Thanks

best rgds
Bill


Anonymous
Kindergarten
Kindergarten
Posts: 92
Joined: Mon Jun 03, 2019 10:58 am

Post by Anonymous » Tue Apr 09, 2019 7:27 am

Hi Bill,

I really appreciate your help. I had it wrong AS923 was the wrong frequency plan.

I have it working perfectly using AU915.

Anonymous
Kindergarten
Kindergarten
Posts: 92
Joined: Mon Jun 03, 2019 10:58 am

Post by Anonymous » Thu Apr 11, 2019 11:20 am

Hi Bill,

I am wondering if you are aware of any way to monitor battery voltage on the Seeeduino Lorawan without having to connect an extra jumper from positive on battery to the A4 and A5 pins?

I found a library which would appear to run on the Arduino Uno but is evidently not compatible with the Seeeduino.

https://github.com/Yveaux/Arduino_Vcc

I have my project almost fully operational the only hurdle now is finding a cost-effective battery monitoring solution. The voltage measurement does not have to be exact, I want to send a lora payload when the battery is nearly flat.

Seeed Tech Support
Pre-kindergarten
Pre-kindergarten
Posts: 0
Joined: Mon Jun 03, 2019 10:51 am

Post by Seeed Tech Support » Thu Apr 11, 2019 3:35 pm

Hi 

Robert 


You do not need to plug any wires to A4/A5. It is connected by default.




Charge status pin and positive pin of the battery had been connect to A4 and A5, which allow you to detect the charge status and measure voltage of the battery via coding.


Copy and upload the below code to detect the battery status.





 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// battey of Seeeduino LoRaWAN

const int pin_battery_status = A5
const int pin_battery_voltage = A4

void setup() {
SerialUSB.begin(115200);
pinMode(pin_battery_status, INPUT);
}

void loop() {

int a = analogRead(pin_battery_voltage);
float v = a/1023.0*3.3*11.0 // there's an 1M and 100k resistor divider
SerialUSB.print(v, 2);
SerialUSB.print(' ');
SerialUSB.println(digitalRead(pin_battery_status));

delay(1000);
}


Thanks

best rgds
Bill


Anonymous
Kindergarten
Kindergarten
Posts: 92
Joined: Mon Jun 03, 2019 10:58 am

Post by Anonymous » Fri Jun 28, 2019 11:48 am

Hi,

I am running the below code to check battery status and am getting unexpected.
I have purchased 2 more Seeeduino Lorawan boards and they are giving the same results.

I am using a data only usb cable. I have tried 14505 and 17505 batteries connected using the JST2 connector supplied with the Seeeduino. The voltage is calculated at ~0.28V
When I connect to the device using a data+power usb cable as well as the battery, I am getting results, the voltage is 4.3V

This is the output on my serial monitor with battery connected and USB data only

Can you please assist me here? This is the last part of my project I need to get functional before I can demo it to my boss and we can talk about pushing these devices out (potentially hundreds of them).

[cid:image003.png@01D52DB8.1A8FC600]Hi,




// battey of Seeeduino LoRaWAN

const int pin_battery_status = A5;
const int pin_battery_voltage = A4;


void setup() {
SerialUSB.begin(115200);
pinMode(pin_battery_status, INPUT);
}

void loop() {
delay(1000);
int a = analogRead(pin_battery_voltage);
float v = a/1023.0*3.3*11.0; // there's an 1M and 100k resistor divider
SerialUSB.print(v, 2);
SerialUSB.print(' ');
SerialUSB.println(digitalRead(pin_battery_status));

delay(1000);
}

Seeed Tech Support
Pre-kindergarten
Pre-kindergarten
Posts: 0
Joined: Mon Jun 03, 2019 10:51 am

Post by Seeed Tech Support » Fri Jun 28, 2019 12:49 pm


Hi Robert

I just use the 3.7v lipo battery and test with code. It works and here is the reading.  Please ask customer to take picture about his battery connection with seeeduino lorawan board. thanks. 


Thanks

best rgds
Bill

Anonymous
Kindergarten
Kindergarten
Posts: 92
Joined: Mon Jun 03, 2019 10:58 am

Post by Anonymous » Fri Jun 28, 2019 1:33 pm

I can get that same result IF I connect a USB cable that that is data + power (VCC wire).

If I connect a USB cable that is Data ONLY (no VCC wire) so the battery is the only thing powering the seeeduino via the JST port , I get the 0.28V reading.

I want to program the seeeduino to send lorawan payload if the battery voltage drops which means there will be no USB connected.

Post Reply