Post a new topicPost a reply Page 1 of 1   [ 4 posts ]
Author Message
 Post subject: Raspberry Pi Sigfox -> Downlink
PostPosted: Sun Dec 20, 2015 4:23 pm 

Joined: Fri Dec 18, 2015 9:57 pm
Posts: 2
Hi.

I can not find a way to get (and display) the returned data of a bi-directionnal call to Sigfox.

Everything works fine regarding Sigfox part (message revceived, callback is ok and downlink is good)

The ArduPi Sigfox 05 example show how to get the status, but not the content of the data field.
Code:
//3. Sending packet:
    error = Sigfox.sendACK(data,size);
 
    // Check sending status
    if( error == 0 )
    {
      printf("Sigfox packet sent OK\n");
      printf("Back-End response: 0x%X\n", Sigfox._buffer);
    }


Can anyone help with reading this field ? Thanks.


Top
 Profile  
 
 Post subject: Re: Raspberry Pi Sigfox -> Downlink
PostPosted: Mon Dec 21, 2015 9:48 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11350
Hi pabs_agro:
Our function only checks that Sigfox Backend transmission has been allowed, waiting for "+RX END" response.

Quote:
// create "AT$SF=<data>" command
GEN_ATCOMMAND_SET("SF", data, "2","1");

// enter command mode
if( sendCommand(_command, AT_OK, AT_ERROR, 10000) != 1)
{
return SIGFOX_ANSWER_ERROR;
}

status = waitFor("+RX BEGIN", AT_ERROR, 20000);

if (status == 2)
{
return SIGFOX_ANSWER_ERROR;
}
else if (status == 0)
{
return SIGFOX_NO_ANSWER;
}

status = waitFor("+RX END", AT_ERROR, 25000);

if (status == 1)
{
return SIGFOX_ANSWER_OK;
}
else if (status == 2)
{
return SIGFOX_ANSWER_ERROR;
}
else
{
return SIGFOX_NO_ANSWER;
}


You can improve this function for your purposes. Give a view to "Section 2.23" in TD1207 datasheet:

https://github.com/Telecom-Design/Docum ... Manual.pdf

Regards


Top
 Profile  
 
 Post subject: Re: Raspberry Pi Sigfox -> Downlink
PostPosted: Tue Dec 22, 2015 4:19 pm 

Joined: Fri Dec 18, 2015 9:57 pm
Posts: 2
Hi.

Thanks for the doc, it helped.

I have a functionnal code now. Is there a way to contribute back the patch.

cookingSigfox.cpp
Code:
uint8_t cookingSigfox::sendACK(char* data)
{
...
status = waitFor((char*)"+RX=", AT_ERROR, 20000);
// Patch begin
if(status == 1)
{
  status = waitFor((char*)"\r\n", AT_ERROR, 20000);
  memcpy(_ackData, _buffer, 24);
}
// Patch end 
status = waitFor((char*)"+RX END", AT_ERROR, 25000);


Top
 Profile  
 
 Post subject: Re: Raspberry Pi Sigfox -> Downlink
PostPosted: Wed Dec 23, 2015 10:14 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11350
Great!!, thanks by your contribution.
Regards.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 4 posts ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use.