How-to: CC1310 Sub-1 GHz communication with SIGFOX network

I have moved this post to hackster.io for LYD sunset

How to connect a CC1310 LaunchPad to the SIGFOX network

SIGFOX is a commercial network that uses the unlicensed sub-1 GHz frequency bands.
The CC1310 is able to connect to that network.
This blog documents the steps I've taken to make this work.
There's more to this than the official instructions.

 


 

What do you need?

  • CC1310 LaunchPad
  • CCS
  • TI-RTOS for CC1310
  • SmartRF Flash Programmer 2
  • A header file from Texas Instruments with an encrypted key/id
  • Firmware project from SIGFOX
  • account on SIGFOX backend

What do you get?

You'll get a design that can send information to the SIGFOX network. Secure! Encrypted! Available from wherever there's SIGFOX coverage.
I've deliberately used the word send. The CC1310 at this moment supports posting data. Retrieving messages from the network is in development.
To understand the SIGFOX network, that doesn't matter. And only sending is a valid use case for a 'sensor + radio' project.


Out of the box you'll be able to send information you type in a terminal. You can consult the data on the SIGFOX web backend.
That's a good end-to-end example. Your data (in reality this could be sensor data you collect on the CC1310) has made it safely to the internet, using just a sub-1 GHz radio.

Steps to Get Everything Working

Starting point: CC1310 and tool chain

I'm using a CC1310 LaunchPad and Code Composer Studio 7
I've installed TI-RTOS for the CC1310 SimpleLink family via the CCS Resource Explorer.
These tools are the basis for your CC1310 projects. I'm assuming you have these set up and know how to compile an run existing project.

The SmartRF Flash Programmer V2 is also needed, available for download from TI.

With all of this set up, you can collect the info needed to contact TI and SIGFOX for the pieces of the puzzle.

Getting the MAC address of the CC1310

This is the first piece of information you need to contact TI and SIGFOX.
Use SmartRF Programmer to retrieve it from the controller.

  • plug the LaunchPad into your computer
  • start SmartRF Programmer
  • select CC1310 in the tree view on the left (it's your LaunchPad)
  • select the MAC Address tab
  • press the top Read button
  • copy the MAC address

Ask Header File and CCS Project

Follow these instructions to get the header file with encrypted key from TI and the CC1310 CCS project from SIGFOX.

I've sent this mail to TI:
To: sigfox@list.ti.com
Subject: request for sigfox_data.h file 
Message:

Dear TI team,

Can you please send me the “sigfox_data.h” file for my CC1310 LaunchPad?

Full legal company name: XXXXXXXX

First and last name of employee being granted access XX XXX 
MAC: XX XX XX XX XX XX XX XX
Thank you,

XXX XXXX

And this one to SIGFOX:

To: tech-p1-team@sigfox.com
Subject: request for a CC1310 launch-pad solution

Message:

Dear sigfox team,

Can I please get a the example project for sigfox connectivity with Texas Instruments CC1310.
I’m following TI’s procedure here to get in touch with you:
http://processors.wiki.ti.com/index.php/Sigfox_CC1310_SDK_Demo_Users_Guide#Obtaining_the_Project_from_Sigfox


The purpose of my request is to XXXXXXXXX

Full legal company name: XXXXXXXX

First and last name of employee being granted access to the SIGFOX network: XX XXX

Country and state, or region where development work will occur: XXXXX

Country or countries of target product deployment: XXX

Thank you,
XXX XXXX

Build and Run the Project for the First Time

Save the project archive you received from SIGFOX.
Start CCS and import the archive into your workspace via Project -> Import CCS Project -> Select Archive file
Check the Copy projects into workspace option.

Then copy the header file you received from TI in the project's apps folder. Overwrite the existing file.

A few fixes that make the project buildable

in apps/sigfox_data.c
move #include <sigfox_data.h>
after #include "sigfox_types.h"

in CC1310DK_7XD.c
replace UARTCC26XX_HWAttrsV1
with UARTCC26XX_HWAttrsV2

For Europeans and other regions that don't use 923 MHz

You need to select the 868 MHz profile.

in apps/sigfox_demo.c
replace
sfx_rcz_t rcz= RCZ3;
with:
sfx_rcz_t rcz= RCZ1;

Check the file sigfox_library_api/sigfox_api.h for details.

Correction - thank you  

in apps/sigfox_demo.h
replace
#define MODE_ARIB
with
#define MODE_ETSI

Now build the project, load and execute it (can be done in one step by pressing the Debug button).

In the debugger, start the program.

Get Device ID and PAC

The next step is to retrieve two codes that you need to get a SIGFOX backend access approved and for device registration.
Your LaunchPad must be running the SIGFOX project at this time.

Check the COM port of your LaunchPad (on Windows you do this with the Device Monitor)

Start your Terminal program of choise. I use PuTTY. For other terminals, check TI's instructions.

COM port is the one from the Device Monitor. 
115200, 8, 1, N
For your own comfort (and to see what you're typing) enable these settings:


 

Connect PuTTY and retrieve both codes:

AT$ID?<ENTER>

AT$PAC?<ENTER>

Send a Second Mail to SIGFOX to White List your LaunchPad

Send a mail to the SIGFOX contact with the device ID you've just retrieved. 
They will white list your LaunchPad, a step that's necessary to get a SIGFOX backend account.
(note: I didn't mail for this step but used a direct contact)
Wait with the next step until you have confirmation from SIGFOX.

Create backend Account and Register the LaunchPad

 This is the final step before the whole thing works. You don't need to mail or contact anyone from now on.
Your faith is in your own hands.

Surf to the backend registry page for TI.
Pick your country.


Enter the Device ID and PAC you retrieved via PuTTY.
Enter the requested personal and company info until registration is completed
You get an email to set your password. Follow the instructions.

Your device is now registered.

Setting up a Connection and Send Data

Connect to SIGFOX backend, log in and select your device.
At this point (I don't know if it's a mandatory step or because I did something wrong) I asked the backend to forget the unique ID that was assigned to my communication.

 

I then pressed the reset button of my LaunchPad.

In the Terminal, I checked the frequency:

AT$IF?
868130000

I then sent a single byte to SIGFOX:

AT$SB=1
OK

And a string of data

AT$SF=313233343536373839404142
OK

Checking the Communication

In the backend, the status of my board changed (via the Device menu):

And I could find evidence of traffic in the Statistics:

The messages are a little more difficult to find back.
Click on your device's ID

Then select the Messages option:

Success!

 Spend the rest of the day navigating the backend :).

Thank you:

Jose Marcelino
Anthony C.
Ralf Ackermann

Related CC1310 blog series on element14: SimpleLink™ Sub-1 GHz Wireless Microcontroller blog series: from Unbox to Building a Transmitter

  • On newest project version given by Sigfox, I had to change the "mode of operation" according to my zone.

    From ``#define MODE_ARIB`` to ``#define MODE_ETSI``

  • Ah, so that's what that directive does.

    I had not noticed that and made this change in the arib method:

    //    sfx_rcz_t rcz= RCZ3;

       sfx_rcz_t rcz= RCZ1;

    I'll change the instructions in the blog.

    Thanks

  • Nicely written blog, good work.

    Regards,

    /TA

  • Hello,

    Thank you for this post.

    I followed the Sigfox CC1310 SDK Demo Users Guide and your post but I am always not able to see the messages sent from my device in the Sigfox backend.

    I tried to add my device to the backend registry page for TI, but a pop up said :

    Id/PAC validation failed : Invalid PAC XXXXXXXXXXXXXXXX for device with id : XXXXXXXX

    Please can someone help me ?

    Thanks i advance !

    Best regards,

  •  , there are 3 things that must be done:

    - when asking TI for their sample code, you have to give the exact MAC address of yourCC1310 board. This is validated later during communication

    - you have to set up your board on the sigfox backend. Don't stray from the procedure. Follow it exactly.

    - sigfox has to whitelist your board. I sent a mail to them to do that.

    In the blog above I tried to list all things that should be arranged. If something is fuzzy or missing, I'll update.

    If you have followed it and are not successful, contact Sigfox irst. It seems to be related to your kit registration on their network.

    Don't give up :) - it's a great solution.

  • hi there

    how long did you have to wait for response from sigfox and TI for there project and header?

    also the"686 MHz profile" should be 868 MHz

    thanks

  • I fixed the 686 / 868 typo.

    It's been a while since I did this exercise.If I recall well, TI replied within a week. Sigfox required some complaining on twitter to get their part. I think that was 3 weeks to a month.

Related
Recommended