u-blox / evb-ant-1

4 stars 0 forks source link

EVB-ANT-1

EVB-ANT-1 is the application board for the Bluetooth Indoor Positioning kit from u-blox: XPLR-AOA-3. The board itself is directly connected to the antenna board ANT-B10. A detailed description of the hardware and its capabilities and components can be found here: XPLR-AOA-3-UserGuide.

The basic purpose of EVB-ANT-1 is to provide connectivity for the angle measurements data created by the antenna board.

EVB-ANT-1 Firmware

This open-source project is a basic firmware written for the MCU of EVB-ANT-1, which is an NXP RT1062. The firmware includes the main functionality and features for evaluating the antenna boards and setting up an indoor positioning system by using a position engine. The main software features are the following:

Downloading the code

Seting up the environment (MCUXpresso)

Building using MCUXpresso IDE

image

image image

image

Debugging using MCUXpresso IDE

Required Hardware: EVB-ANT-1, segger j-link, 9-Pin Cortex-M Adapter

image

image

image

Flashing through UART

The MCU has a bootloader that makes it possible to flash the firmware using its UART. The UART is driven to a usb-to-serial converter. So, it can be connected to a PC using a USB cable and it will appear as a virtual COM port. To Flash the firmware image, NXP MCUBootUtility tool is needed.

The firmware image can be found inside the project's 'Debug' folder with the name .axf. This file is generated by the IDE once you build the project with the 'Debug' configuration

image

image

image

The image should be flashed to the MCU

When flashing is complete, the user needs to bring the dip switches back to the position 0-0-1-0 and restart the MCU. This way the MCU will re-enter the normal operation mode

Configuring EVB-ANT-1

Out of the box, EVB-ANT-1 is preconfigured to use the ethernet interface with IP address 192.168.1.102 and subnet mask 255.255.255.0. The user can connect it to a router or directly to a pc afer configuring its network interface to the same subnet. Then by using a browser to view "http://192.168.1.102/", the user can configure all connectivity details for the device.

Wifi Setup

image

In the wifi setup section there are the fields:

Ethernet Setup

image

Respectively, in the ethernet setup section there are the fields:

Positioning Engine Setup

image

In the positioning engine setup section, it is possible to set the parameters for the communication betwween EVB-ANT-1 and the positioning engine, using the fields

Anchor point Setup

image

In the anchor point setup section, there are:

Applying / Viewing Configuration

NOTE: Most of the connectivity related parameters will not apply immediately after submitting, but will require restarting the device

Runtime info

image

At the end of the page, there is a realtime counter that continuously polls the MCU to get the time since last boot[1]. Also there is the "reboot" button [2] that applies a soft reset to EVB-ANT-1.

Resetting Configuration

image

If the "SW1" button of EVB-ANT-1 is pressed and held down during booting, the configuration would be reset to the initial values. That means that the configuration page will be accessible in address "192.168.1.102" of ethernet interface.

Web interface

The configuration page is written using HTML, CSS and JavaScript

The files are located in UI folder.

However, the http server that runs on the MCU needs to have them in a C array form.

For that purpose there is a script python arrayify_web_pages.py from the UI/tools which will replace the source/app/bip_httpsrv_fs_data.c with the updated UI.

Note: After updating the website files a hard refresh in the browser may be required to see latest changes.

SDK Notes

For this project we used NXP SDK EVK-MIMXRT1060, version 2.12.1 (NXP GitHub repository)

The following changes had to be made in SDK files:

lwip/port/enet_ethernetif.c:

image

Relevant discussion: https://community.nxp.com/t5/MCUXpresso-SDK/MCU-stops-if-ethernet-cable-is-not-plugged-in-on-startup/m-p/1371744

lwip/port/enet_ethernetif_kinetis.c:

image

Relevant discussion: https://community.nxp.com/t5/MCUXpresso-General/DTC-or-OC-SRAM/td-p/1302973