Seeed Wio LTE

Seeed Wio LTE

The Seeed Wio LTE board is an open source gateway which enable faster IoT GPS solutions.

NOTE: Espruino for Wio LTE is no longer officially supported. The last available build is 2v08

It contains:

  • Worldwide LTE and UMTS/HSPA+
  • GPS/BeiDou/GLONASS/Galileo and QZSS
  • 6 Grove Connectors
  • Nano SIM and TF card 2 in 1 socket

NOTE: THE Wio LTE Cat M1 / NB-IoT tracker IS NOT CURRENTLY DIRECTLY SUPPORTED BY ESPRUINO. The firmware for the Cat 1 board on this page may run on it, but you'll have to interface to the CAT M1/NB-IoT modem directly with AT commands. Please contact Seeedstudio directly with any queries.

Full details on flashing can be found on Seeed's website

Binaries can be found in:

Contents

Pinout

Hover the mouse over a pin function for more information. Clicking in a function will tell you how to use it in Espruino.

  • Purple boxes show pins that are used for other functionality on the board. You should avoid using these unless you know that the marked device is not used.
  • ! boxes contain extra information about the pin. Hover your mouse over them to see it.
  • 3.3v boxes mark pins that are not 5v tolerant (they only take inputs from 0 - 3.3v, not 0 - 5v).
  • GND is ground (0v).
  • ADC is an Analog to Digital Converter (for reading analog voltages)
  • DAC is a Digital to Analog Converter (for creating analog voltages). This is not available on all boards.
  • PWM is for Pulse Width Modulation. This creates analog voltages from a digital output by sending a series of pulses.
  • SPI is the 3 wire Serial Peripheral Interface.
  • USART is a 2 wire peripheral for Serial Data.
  • I2C is the 2 wire Inter-Integrated Circuit bus.
GND
3V3
ADC DAC SPI1 SCK 3.3v A5
ADC DAC USART2 CK 3.3v A4
GND
3V3
I2C1 SCL PWM USART1 TX B6
I2C1 SDA PWM USART1 RX B7
GND
3V3
I2C1 SDA PWM B9
I2C1 SCL PWM B8

Pins not on connectors

A0 ADC PWM UART4 TX
A1 ADC PWR PWM UART4 RX
A2 ADC PWM USART2 TX
A3 ADC PWM USART2 RX
A8 PWR I2C3 SCL PWM USART1 CK
A9 USB PWM USART1 TX
A10 USB PWM USART1 RX
A11 USB PWM
A12 USB
A13 JTAG
A14 JTAG
A15 PWR
B0 ADC PWR PWM
B1 ADC PWM
B2 BOOT1
B5 PWR PWM SPI1 MOSI SPI3 MOSI
B10 PWR I2C2 SCL PWM SPI2 SCK USART3 TX
B11 I2C2 SDA PWM USART3 RX
B12 PWR USART3 CK
B13 PWM SPI2 SCK
B14 PWM SPI2 MISO
B15 PWR PWM SPI2 MOSI
C0 ADC PWR
C1 ADC PWR
C2 ADC PWR SPI2 MISO
C3 ADC PWR SPI2 MOSI
C4 ADC PWR
C5 ADC PWR
C8 PWM USART6 CK
C9 I2C3 SDA PWM
C10 SPI3 SCK UART4 TX USART3 TX
C11 SPI3 MISO UART4 RX USART3 RX
C12 SPI3 MOSI UART5 TX USART3 CK
C13
C14 OSC RTC
C15 OSC RTC
D2 UART5 RX
H0 OSC
H1 OSC

Using

Seeed has a complete Getting Started Guide here which is the best source of information

Seeed Wio LTE can be used much like any other Espruino USB device, with the exception of the on-board LED which needs to be accessed with the WioLTE.LED(r,g,b) function.

The built-in object WioLTE provides useful functionality:

WioLTE.setLEDPower(true);
WioLTE.LED(r,g,b); // Output a color on the LED (values range 0..255)

There are also built-in variables for each of the Grove connectors marked on the board. These are two-element arrays of Pins:

WioLTE.D38
WioLTE.D20
WioLTE.A6
WioLTE.A4
WioLTE.I2C
WioLTE.UART

They can be used with Espruino's Grove modules, however remember to turn power on with WioLTE.setGrovePower(true); first!

You can also access them directly:

WioLTE.D38[0].write(1);
digitalWrite(WioLTE.D38[0]);

var pin = WioLTE.D38[0];
digitalWrite(pin, 0);

Using SD Card

The SD card can be accessed with Espruino's normal File IO.

However you must be careful not to use it less than 4 seconds before power-on, as the SD card will not have initialised by that point.

var fs = require('fs');

// Init SDCard
WioLTE.init;

var test = function() {
  // List files
  console.log('List files on root path:\r\n', fs.readdirSync());
  // Write file  
  fs.writeFileSync("hello.txt", "Hello World");
  // read file
  console.log(fs.readFileSync("hello.txt"));
  // append file
  fs.appendFileSync("hello.txt", "!!!");
  // read again
  console.log(fs.readFileSync("hello.txt"));
};

setTimeout(test, 4000);

Using LTE and GPS

To use this functionality, you need to require the wiolte module with require('wiolte').

An example showing how to connect, use the Internet connection, GPS, and SMS is below:

var board;
var APN = "UNINET";
var USERNAME = "";
var PASSWORD = "";

function wiolteStart(debug_quectel, debug_at) {
  debug_quectel = debug_quectel || false;
  debug_at = debug_at || false;

  board = require('wiolte').connect(function(err) {
    console.log("connectCB entered...");
    if (err) throw err;
    setTimeout(doConnect,3000);
  });

  board.debug(debug_quectel, debug_at);

}

function doConnect() {
  board.connect(APN, USERNAME, PASSWORD, function(err) {
    console.log("connectCB entered...");
    if (err) throw err;
    board.getIP(print);

    // work after connected
    setTimeout(onConnected, 5000);

  });
}

function onConnected(){
  // Handle call coming
  board.on('RING', function(){
  });

  // Handle SMS coming
  board.on('message', function(id){
    board.SMS.read(id, function(d, sms){
      if(d !== "OK") throw new Error(d);
      console.log('SMS from:', sms.oaddr);
      console.log(':', sms.text);
    });
  });

  // fetch longitude, latitude every 10 s
  board.geoLocStart(10000);

  GetHtmlPage("http://www.pur3.co.uk/hello.txt");
}

function GetHtmlPage(html_page){
  require("http").get(html_page, function(res) {
    var contents = "";

    console.log("Response: ",res);

    res.on('data', function(d) {
      contents += d;
    });

    res.on('close', function(d) {
        console.log("Connection closed");
        console.log("full page content ---> \r\n"+contents);
    });
  });
}

function GeoLoc() {
  var coord="";
  board.geoLocGet(function(err, coord) {
    if(err) throw err;
    console.log("longitude latitude = " + coord.lat,coord.lng);
  });
}

wiolteStart();

Once initialised with:

board = require('wiolte').connect(function(err) {
  if (err) throw err;
  console.log("Successfully connected!);
});

Functionality provided is:

  • debug(boolean, boolean) - choose debug level
  • reset(callback) - Reset LTE
  • init(callback) - Initialise LTE
  • getVersion(callback) - returns LTE firmware version
  • connect(apn, username, password, callback) - Connect to mobile network
  • getVersion(callback) - returns current version
  • getIP(callback) - Get current IP address
  • geoLocStart(period_in_milliseconds) - Start getting geolocation data
  • geoLocStop() - Stop getting geolocation data
  • geoLocGet(callback) - Get last location
  • geoLocConvert(callback(err,latlong)) - Get last location as latitude/longitude
  • board.SMS - SMS functionality with init/read/send/list/delete functions based on the ATSMS module
  • board.Call, with:
    • call(number, callback)
    • answer(callback)
    • hangup(callback)
    • handleRing(boolean) - if trie, will call any function added with board.on('RING', ...)
  • sleep(callback) - LTE modem get into sleep mode, it can save about 100mA
  • wake(callback) - LTE modem wake up from sleep mode

Buying

You can buy the Wio LTE Tracker direct from Seeed

This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.