0 Replies Latest reply on May 23, 2014 4:09 PM by userc_6124

    WiConnect Stream Mode

      Here’s another useful teach-in that will help you get to market faster …

       

      WiConnect is a simple to use front end to WICED and by using WiConnect many of the simple tasks you are looking to achieve come about much quicker allowing you to focus on your application rather than the network or wireless portion. This teach in shows the basis of a simple streaming serial interface.

       

      Stream Mode

      As depicted in the following diagram, stream mode provides a transparent connection between a serial port and a network stream. It is perfect for implementing applications such as a wireless serial port.

       

      stream_mode.png

      Stream mode is used primarily by host applications that can handle asynchronous data (with the optional use of hardware flow control). It is perfectly suited to applications that only need to use a single network stream at any one time.

       

      Configuration

      The simplest way to setup an ACKme module to use Stream mode is to do all the WiConnect configuration first using command mode, then reboot into stream mode.

      Configuration involves just a few simple steps:

      • Setup a wireless and network interface to use with stream mode e.g. wlan interface and TCP client. This typically requires setting up the wireless interface and network stream to auto-connect, or enable connection using a GPIO control pin.

      • Set the serial bus.mode to stream.

      • Then save and reboot the module.

      Both the wlan and softap interfaces have an auto-start on bootup capability using the wlan.auto_join.enabled and softap.auto_start variables. The TCP server has auto-start capability using the tcp_server.auto_start variable. Network clients can be started using a GPIO or manually by breaking out of stream mode as described below.

       

      Breaking out of Stream Mode

      When the serial bus is in Stream mode, commands are disabled and every character sent to the serial port is automatically forwarded to a network stream. There are two ways to break out of stream mode and enable command mode entry temporarily. The first method uses a character sequence configurable with the bus.stream.cmd_seq. By default, the stream break out sequence is $$$. The other option available to break out of stream mode is to use a GPIO configurable with the bus.stream.cmd_gpio variable. When you're done entering commands, return to stream mode by simply issuing the exit command.

       

      WICED Studio Wi-Fi/Combo ForumsZentri