Skip navigation
Home > All Places > WICED Studio Wi-Fi/Combo > WICED Studio Wi-Fi/Combo Forums > Blog > 2017 > September
2017
VikramR_26

OpenOCD -WICED

Posted by VikramR_26 Sep 30, 2017

Different Interfaces supported in WICED

  1. Olimex connector

https://www.olimex.com/Products/ARM/JTAG/_resources/OpenOCD/

 

Driver installation for your pc or laptop is required in order to use the Olimex connector.

 

     2. J-Link SEGGER debugger

https://www.segger.com/downloads/jlink/

 

3. CMSIS-DAP

          Used on PSoC+434W kit

 

Pin out for Olimex and JLink

1) Olimex Pin out

 

 

 

2) J-Link SEGGER debugger pinout

 

Different configuration files for OpenOCD in the SDK  :\Wiced-SDK\tools\OpenOCD

 

Olimex connector on WICED EVAL hardware

 

Sample connection to hardware on CYW943907AEVAL1F hardware.

 

 

Connection between CYW43907AEVAL1F and On-board Programmer/Debugger

                  sl.no

CYW43907 Based SIP Pin Name

On-board Programmer/Debugger Connection

1

GPIO_2_JTAG_TCK

FTDI_JTAG_TCK

2

GPIO_3_JTAG_TMS

FTDI_JTAG_TMS

3

GPIO_4_JTAG_TDI

FTDI_JTAG_TDI

4

GPIO_5_JTAG_TDO

FTDI_JTAG_TDO

5

GPIO_6_JTAG_TRST_L

FTDI_JTAG_TRST

(Note: the reset line on this hardware needs to be pulled from J9.3)

 

 

 

Compile and download using WICED SDK

Create the following make target if using Olimex ARM-USB-TINY-H

 

The command for downloading the scan example app in ...\apps\snip\scan

For Olimex ARM-USB-TINY-H

     snip.scan-CYW943907AEVAL1F JTAG=Olimex_ARM-USB-TINY-H download run

 

For Segger J-Link

     snip.scan- CYW943907AEVAL1F JTAG=jlink download run

 

 

If you need to debug add the debug flag

(debug configuration is default in SDK, if not present follow the steps here:

(https://community.cypress.com/community/wiced-wifi/wiced-wifi-forums/blog/2014/05/09/creating-andor-editing-debug-configurations)

 

The command for downloading  and debugging the scan example app in ...\apps\snip\scan

For Olimex ARM-USB-TINY-H

     snip.scan- CYW943907AEVAL1F-debug JTAG=Olimex_ARM-USB-TINY-H download run

 

For Segger J-Link

     snip.scan- CYW943907AEVAL1F-debug JTAG=jlink download run

 

 

Reference:

https://community.cypress.com/community/wiced-wifi/wiced-wifi-forums/blog/2014/06/13/using-olimexsegger-with-bcm94390wcd2-evaluation-board

This post discusses how to connect CYW943907AEVAL1F EVK with the 128*64 SSD 1306 OLED Display module. Corresponding projects for the same are already there in snip folder of WICED Studio 5.2 and above.

 

1. Hello World Application

Connect the SSD 1306 display to J12 and J9 headers of CYW943907AEVAL1F as shown in figure.

 

Sr. No.

Display pinCYW943907 pin

CYW943907 pin name/

kit signal name

1GNDJ9.6 or J9.7GND
2VCCJ9.43.3V
3SDAJ12.9I2C_1_SDA
4SCLJ12.10I2C_1_SCL

Open the 43xx_Wi-Fi\apps\snip\graphics\hello\hello.mk file in WICED Studio. Add device CYW943907AEVAL1F in the VALID_PLATFORMS list.

Create make target, run & download program to device CYW943907AEVAL1F.

You should see "Hello World!" displayed on the SSD 1306 Display.

 

2. Graphics Test application

Connect the SSD 1306 Display to J12 and J9 headers of CYW943907AEVAL1F as shown in Hello World application.

Open the 43xx_Wi-Fi\apps\snip\graphics\graphicstest\graphicstest.mk file in WICED Studio 5.2. Add device CYW943907AEVAL1F in the VALID_PLATFORMS list.

In graphicstest.c file, different functions are defined to form various shapes on the display.

Create make target, run & download program to device CYW943907AEVAL1F.

You should see the visual sequences on display. Following figure shows one of the sequence.

SheetalJ_96

MQTT with IBM Bluemix

Posted by SheetalJ_96 Moderator Sep 27, 2017

IBM Watson IoT Platform provides powerful application access to IoT devices and data to help you rapidly compose analytics applications, visualization dashboards and mobile IoT apps. It is a service that is available in IBM Bluemix. Watson IoT Platform allows you to perform powerful device management operations, and store and access device data, connect a wide variety of devices and gateway devices. It provides secure communication to and from your devices by using MQTT and TLS. Instances of the Watson IoT Platform can be created in the Bluemix dashboard. The Watson IoT Platform can be integrated with other Bluemix services and accessed by using the Bluemix dashboard. MQTT.fx tool is used to monitor the messages exchanged between cloud and device.

 

This Help Article discusses how to use CYW943907AEVAL1F EVK for connecting to IBM Bluemix.

 

Create a Bluemix account in console.bluemix.net. In Bluemix Console, register a device and device type. Note down the Token number you get while registering the device.

  1. Open the pub_sub_bluemix.zip file provided along with this post in WICED Studio 5.1 or above.
  2. Open the file wifi_config_dct.h to configure the Device Configuration Table (DCT). Modify the values of the macros CLIENT_AP_SSID and CLIENT_AP_PASSPHRASE to match your Wi-Fi access point SSID and password respectively. Ensure that the AP is connected to the internet.
  3. In pub_sub_bluemix.c file, following macros have to be set with proper values to connect to the IBM Bluemix.

                #define   ORG_ID                                                             " "

                #define   DEVICE_TYPE                                                  " "

                #define   DEVICE_NAME                                                 " "

                #define   TOKEN                                                               " "

ORG_ID is unique organization ID you get after creating account. Click on the upper right corner of Bluemix console. Red box shows the organization ID. Type the device type, device name and authorization token you get while registering the device.

As we are making the unsecured connection, change the Security settings in Bluemix console. Go to Security Section. Click on the edit tab.

Select 'TLS Optional' option from the list.

After updating the above information, create make target, run & download program to device CYW943907AEVAL1F.

 

To verify the output, open the MQTT.fx tool. On the main window, click on the setting tab.

    

In the pop-up window, set the broker address in the following format:

                         "{ORG_ID}.messaging.internetofthings.ibmcloud.com"

To generate Client ID and password, open the Bluemix Console. Select APPS section from the Bluemix console window and click on Generate API key.

In the pop-up window, you will see the API key and Authentication token generated as below. Copy the credentials and click on Generate.

Now paste these credentials as User Name and Password in User Credentials tab.

  • The MQTT client ID is in the following format: a:org_Id:appId
  • The MQTT user name is the API key, for example, a-org_Id-a84ps90Ajs
  • The MQTT password is the authentication token, for example, MP$08VKz!8rXwnR-Q

For more information, you can browse the link: MQTT connectivity for applications

Click on OK.

Click on Connect to connect to the IBM Bluemix. You should see a green circle after connection.

Devices can subscribe to commands which have following format:

               iot-2/cmd/command_id/fmt/format_string

command_id is the ID of the command, for example, update. It can be any string permitted by MQTT.

format_string is the format of the event payload, for example, json, text, bin.

Type Subscribe topic and click on Subscribe as shown in below figure.

Similarly devices publish the events which have the following format:

               iot-2/type/device_type/id/device_name/cmd/command_id/fmt/format_string

device_type and device_name are the type and name of the device you have registered.

For more information, you can browse the given link.

Type some message in the box below and click on Publish. You will see that message on UART terminal.

MichaelF_56

MQTT with Microsoft Azure

Posted by MichaelF_56 Moderator Sep 26, 2017

Microsoft Azure is a cloud computing service created by Microsoft for building, testing, deploying, and managing applications and services through a global network of Microsoft-managed data centers. It provides a service called “Azure IoT Hub” for implementing Internet of Things solutions. IoT Hub enables devices to communicate with the IoT Hub device endpoints using the MQTT v3.1.1 protocol on port 8883 or MQTT v3.1.1 over WebSocket protocol on port 443. IoT Hub requires all device communication to be secured using TLS/SSL (hence, IoT Hub doesn’t support non-secure connections over port 1883). A device can use the MQTT protocol directly to connect to an IoT hub. To monitor/trigger the messages exchanged between cloud and device, Device Explorer tool can be used.

 

This Help Article discusses how to use CYW943907AEVAL1F EVK for connecting to Azure IoT Hub.

 

Create an account in portal.azure.com. Create an IoT Hub and note down the generated connection string.

  1. Open the pub_sub_azure.zip file provided along with this post in WICED Studio 5.1 or above.
  2. Open the file wifi_config_dct.h to configure the Device Configuration Table (DCT). Modify the values of the macros CLIENT_AP_SSID and CLIENT_AP_PASSPHRASE to match your Wi-Fi access point SSID and password respectively. Ensure that the AP is connected to the internet.
  3. In pub_sub_azure.c file, following macros are defined to connect to the Azure IoT Hub.

#define   IOT_HUB_NAME                              " "

Update the name of the Azure IoT Hub in above macro.

                 #define   DEVICE_NAME                                " "

                 Update the name of the device.

                 #define   PASSWORD                                     " "

Open Device Explorer tool. In Configuration tab, paste the connection string of your IoT Hub. Click onUpdate and then click on Generate SAS (Shared Access Signature).

 

 

To create a device, go to Management tab and click on Create.

 

 

In the pop-up window, type the Device ID (device name). Click on Create.

 

 

To obtain password, select your device in Management tab and click on SAS Token.

 

 

In the pop-up window, type TTL(days) (message expiration time) as 365 and click on Generate.

 

 

You will get password in the format shown above as SharedAccessSignature.

 

After updating the above macros, create make target, run & download program to WICED device.

To verify the output in Device Explorer, select the device you have created in Management tab. Go to Data. Click on the checkbox Start time & click on Monitor.

 

 

Go to Messages to Device. Type the text in box Message and click on Send. You should see that message on WICED device CYW943907AEVAL1F.

 

 

 

Created by SheetalJ_96

Filter Blog

By date:
By tag: