P&S not transmitting when programmed

How to configure Meshlium or use the Manager System
martajg19
Posts: 89
Joined: Fri May 17, 2019 10:00 am
Company: JG Ingenieros

P&S not transmitting when programmed

Post by martajg19 » Wed Jun 26, 2019 10:00 am

Hi, we have a Agriculture PRO installed on the rooftop of the building (floor 9th). Firts we had the meshliun in the second floor (and two P&S in second 2 and 4 each) The Agriculture PRO was programmed to send data every 15 min but instead it sent the data randomly and very very often, way less than supposed and than the other P&S that are programmed equally. So we thought it could be because there were many floors in between and there could be interferences so we moved the meshlium to the 4th floor but the communication hasnt got better, could it be due to anything else?

Also, the battery hasnt discharge that much and if it is trying to send data every 15 min (we configured it to try sending it for 2 times) would it be discharged more than 8%?

Thankyou very much

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: P&S not transmitting when programmed

Post by libelium-dev » Thu Jun 27, 2019 7:37 am

Hi,

What code did you upload to the nodes? Could you please share the output through the serial monitor with us? So we will be able to debug the issue more in deep.

In addition, please copy here the sensorsParser.log file of Meshlium.

The current consumption of the XBee868LP module in the transmission is 48mA. It is a low current consumption so it seems that the consumption of your P&S is correct.

Regards

martajg19
Posts: 89
Joined: Fri May 17, 2019 10:00 am
Company: JG Ingenieros

Re: P&S not transmitting when programmed

Post by martajg19 » Thu Jun 27, 2019 9:22 am

Hi, here is the code I uploaded:

https://drive.google.com/open?id=1875gw ... IoSRmyixvV

I'll send you the outputs in a moment :)

Thankyou

martajg19
Posts: 89
Joined: Fri May 17, 2019 10:00 am
Company: JG Ingenieros

Re: P&S not transmitting when programmed

Post by martajg19 » Thu Jun 27, 2019 10:56 am

Ok, here are the sensor parse logs:

https://drive.google.com/open?id=1VjllK ... Or3dKUgL34

The captured data local data base:

https://drive.google.com/open?id=1zcleO ... hzWyYQf0bs

The captured data advanced (just in case it helps):

https://drive.google.com/open?id=1CKRwT ... Yxcy6i3NKx

Hope we solve the issue :) Thankyou

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: P&S not transmitting when programmed

Post by libelium-dev » Fri Jun 28, 2019 8:30 am

Hi,

Could you please share the output through the serial monitor with us? So we will be able to debug the issue more in deep. Connect the nodes to a computer and using a serial software you can visualize data through the serial port. Copy here the output.

Did you configure to the node the same parameters than Meshlium? Please share a screenshot of the RF modules tab?

Regards

martajg19
Posts: 89
Joined: Fri May 17, 2019 10:00 am
Company: JG Ingenieros

Re: P&S not transmitting when programmed

Post by martajg19 » Mon Jul 08, 2019 10:26 am

Hi, Im figuring how to get the serial output. The sensor was programmed through the SmartDeviceApp, is it possible to upload the program (configured in the PCS) to the Waspmote PRO IDE so we could see the serial output? Or do I have to write the code from the beginning?

Thankyou

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: P&S not transmitting when programmed

Post by libelium-dev » Mon Jul 08, 2019 2:17 pm

Hi,

You can use a serial software like Putty, Cutecom, Realtem, etc to get the serial data from the node. Or you can use the WaspmoteIDE which includes a serial terminal. Just opening the serial port with baudrate configured to 115200 baud the data is shown through the serial monitor.

Regards

martajg19
Posts: 89
Joined: Fri May 17, 2019 10:00 am
Company: JG Ingenieros

Re: P&S not transmitting when programmed

Post by martajg19 » Tue Jul 09, 2019 8:50 am

Thankyou very much for the help. I'll do that and send you the output.

martajg19
Posts: 89
Joined: Fri May 17, 2019 10:00 am
Company: JG Ingenieros

Re: P&S not transmitting when programmed

Post by martajg19 » Tue Jul 09, 2019 2:05 pm

Hi, I tried to get the serial output from a P&S (the one that doesnt trasnmit is in the rooftop and I cant go there today but I will tomorrow morning), so is this what you expect, right? The time is no ok, though... this one is working all right I guess.
I just copied 2 loops:

J#
-------------------------------
Serial ID:624918FDC337DE2D
-------------------------------

-------------------------------
- Smart Cities PRO -
-------------------------------
-------------------------------
- SETUP -
-------------------------------
- XBee 'Channel' mask set OK to: 0x3FFFFFFF
- XBee 'PANID' set OK to: 0x7FFF
- XBee 'Preamble ID' set OK to: 0x01
- XBee 'AES encryption' configured (1:enabled; 0:disabled):0
- XBee 'AES encryption key' set OK
- XBee configuration stored OK
- Frame maximum size: 255
- Frame buffer: 3C3D3E0615624918FDC337DE2D506C7432230041055374617274
- Frame length: 26
- XBee transmission OK

-------------------------------
- LOOP -
-------------------------------
- Battery Level:88
- RTC current time: Fri, 00/02/17, 01:45:02
- Enter deep sleep mode for 2 minutes to wait for sensor heating...
- Wake up!!

- Sensor reading:
SOCKET_A --> Sound Pressure Level with A-Weighting (SLOW): 50.33 dBA
SOCKET_B --> Temperature: 26.06 Celsius degrees
SOCKET_B --> Humidity: 40.5 %
SOCKET_B --> Atmospheric pressure: 100521.65 Pa
SOCKET_C --> CO2 concentration: 489.274 ppm
SOCKET_E --> Luminosity: 484 luxes
- Frame buffer: 3C3D3E062E624918FDC337DE2D506C74322301345815B75149424AE17AD0414C00E421424DD354C4470113A3F4434EE4010000
- Frame length: 51
- XBee transmission OK
- RTC current time: Fri, 00/02/17, 01:47:10
- RTC will trigger after (dd:hh:mm:ss): 00:00:15:00
- Go to deep sleep mode...
- Wake up!!


-------------------------------
- LOOP -
-------------------------------
- Battery Level:88
- RTC current time: Fri, 00/02/17, 02:02:10
- Enter deep sleep mode for 2 minutes to wait for sensor heating...
- Wake up!!

- Sensor reading:
SOCKET_A --> Sound Pressure Level with A-Weighting (SLOW): 57.06 dBA
SOCKET_B --> Temperature: 26.02 Celsius degrees
SOCKET_B --> Humidity: 40.6 %
SOCKET_B --> Atmospheric pressure: 100545.41 Pa
SOCKET_C --> CO2 concentration: 548.719 ppm
SOCKET_E --> Luminosity: 444 luxes
- Frame buffer: 3C3D3E062E624918FDC337DE2D506C74322302345815AC3A64424AF628D0414C009722424DB460C44701082E09444EBC010000
- Frame length: 51
- XBee transmission OK
- RTC current time: Fri, 00/02/17, 02:04:17
- RTC will trigger after (dd:hh:mm:ss): 00:00:15:00
- Go to deep sleep mode...

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: P&S not transmitting when programmed

Post by libelium-dev » Wed Jul 10, 2019 8:48 am

Hi,

It seems that the packets of the log were sent to Meshlium properly. Were the packets received in Meshlium? In your previous logs of the database, we see that there are packets from the node 624918FDC337DE2D.

Don't worry about the timestamp since it isn't configured by the PCS. It is needed to program it externally if you want to have the proper timestamp configured. Anyway, we think that it isn't necessary since the time isn't used at any point of the code, it is just printed through the serial monitor. if you want to configure the timestamp you need to use the following example code and follow the steps through the serial monitor to configure it. Then upload your original code to the node and the timestamp should be correct.

Code: Select all

/*  
 *  ------ [RTC_7] Setting and reading time example -------- 
 *  
 *  Explanation: This example permits to set Time and Date in Waspmote's 
 *  RTC very easily via USB port. There is an interface which asks the user
 *  to introduce the Date and Time as specified without any need to change 
 *  this code.
 *  
 *  Copyright (C) 2016 Libelium Comunicaciones Distribuidas S.L. 
 *  http://www.libelium.com 
 *  
 *  This program is free software: you can redistribute it and/or modify 
 *  it under the terms of the GNU General Public License as published by 
 *  the Free Software Foundation, either version 3 of the License, or 
 *  (at your option) any later version. 
 *  
 *  This program is distributed in the hope that it will be useful, 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 *  GNU General Public License for more details. 
 *  
 *  You should have received a copy of the GNU General Public License 
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>. 
 *  
 *  Version:           3.0
 *  Design:            David Gascón 
 *  Implementation:    Yuri Carmona
 */

int year;
int month;
int day;
int hour;
int minute;
int second;

// buffer to set the date and time
char buffer[100];
char input[100];


void setup()
{
  // Open the USB connection
  USB.ON();
  USB.println(F("RTC_7 example"));

  // Powers RTC up, init I2C bus and read initial values
  RTC.ON();


  USB.println(F("-------------------------------------"));
  USB.println(F("Set RTC Date and Time via USB port"));
  USB.println(F("-------------------------------------"));

  /////////////////////////////////
  //  YEAR
  /////////////////////////////////
  do
  {
    USB.print("Insert year [yy]:");    
  }
  while( getData(2) != true );
  
  year=atoi(input);
  USB.println(year);
  

  /////////////////////////////////
  //  MONTH
  /////////////////////////////////
  do
  {
    USB.print("Insert month [mm]:");    
  }
  while( getData(2) != true );
  
  month=atoi(input);
  USB.println(month);
  

  /////////////////////////////////
  //  DAY
  /////////////////////////////////
  do
  {
    USB.print("Insert day [dd]:");    
  }
  while( getData(2) != true );
  
  day=atoi(input);
  USB.println(day);
  

  /////////////////////////////////
  //  HOUR
  /////////////////////////////////
  do
  {
    USB.print("Insert Hour [HH]:");    
  }
  while( getData(2) != true );
  
  hour=atoi(input);
  USB.println(hour);

  /////////////////////////////////
  //  MINUTE
  /////////////////////////////////
  do
  {
    USB.print("Insert minute [MM]:");    
  }
  while( getData(2) != true );
  
  minute=atoi(input);
  USB.println(minute);

  /////////////////////////////////
  //  SECOND
  /////////////////////////////////
  do
  {
    USB.print("Insert second [SS]:");    
  }
  while( getData(2) != true );
  
  second=atoi(input);
  USB.println(second);
  
  
  /////////////////////////////////
  //  create buffer
  /////////////////////////////////
  sprintf(buffer, "%02u:%02u:%02u:%02u:%02u:%02u:%02u",
                                                        year, 
                                                        month, 
                                                        day, 
                                                        RTC.dow(year, month,day), 
                                                        hour, 
                                                        minute, 
                                                        second );
  USB.println(buffer);

  // Setting time [yy:mm:dd:dow:hh:mm:ss]
  RTC.setTime(buffer);
}

void loop()
{
  // Reading time
  USB.print(F("Time [Day of week, YY/MM/DD, hh:mm:ss]: "));
  USB.println(RTC.getTime());

  delay(1000); 
}



/*********************************
*
* get numBytes from USB port 
*
**********************************/
boolean getData(int numBytes)
{ 
  memset(input, 0x00, sizeof(input) );
  int i=0;
  USB.flush();
  int nRead=0;
  
  while(!USB.available());
  
  while(USB.available()>0)
  {
    input[i]=USB.read();
    
    if( (input[i]=='\r') && (input[i]=='\n') )
    {
      input[i]='\0';
    }
    else
    {
      i++;
    }
  }
  
  nRead=i;
  
  if(nRead != numBytes)
  {
    USB.print(F("must write "));
    USB.print(numBytes, DEC);
    USB.print(F(" characters. Read "));     
    USB.print(nRead, DEC);
    USB.println(F(" bytes")); 
    return false;
  }
  else
  {
    input[i]='\0';
    return true;
  }
 
}
Regards

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest