Difference between revisions of "FAQ"

From CityLab Testbed
Jump to navigation Jump to search
Line 36: Line 36:
  
 
== How can I flash/erase the LoRa device ? ==
 
== How can I flash/erase the LoRa device ? ==
 +
 +
The 'LoRa' device is basically a Giant Gecko [https://www.silabs.com/products/development-tools/mcu/32-bit/efm32-giant-gecko-starter-kit starter kit] equipped with an RFM95W LoRa module. (See [Node Specifications]). This module is equipped with an on-board [https://www.segger.com/products/debug-probes/j-link/ J-Link debugger], so debugging/programming/erasing this board is done in exactly the same way as it is for any other SiLabs MCU. (See [https://www.silabs.com/support/getting-started/microcontrollers/efm32-mcu here] for the offical 'Getting Started' guides.
 +
 +
To make things a bit easier, all 'CoT' disk images already contain the necessary J-Link software as well as a few helper scripts.
 +
Flashing the 'LoRa'-device can be done using the <code>flash_lora</code> script.
 +
This script is invoked as follows:
 +
 +
<code>flash_lora <device> <elf-file></code>
 +
Where:
 +
* <code><elf-file></code> is the ELF-image to flash to the device.
 +
 +
Likewise, the <code>erase_lora</code> script can be used to erase the 'LoRa-'device. This script is invoked in exactly the same way as the <code>flash_lora</code> script, except that no ELF-image file is specified.
 +
 
== I have a question and I can't find the answer on the Wiki ==
 
== I have a question and I can't find the answer on the Wiki ==
 
Please send your question to {{SafeMailTo|admin|lab.cityofthings.eu}}. We'll be happy to help you along and update the documentation where necessary.
 
Please send your question to {{SafeMailTo|admin|lab.cityofthings.eu}}. We'll be happy to help you along and update the documentation where necessary.

Revision as of 13:08, 6 March 2018

How do I get access to the testbed ?

This is explained on the Getting Started page

Why are

I can't create links to/from nodes in the City of Things testbed in JFed.

How do I know which serial interface (/dev/ttyUSBX) is connected to what device?

If you use one of the 'CoT' Disk Images, symlinks are automatically created in '/dev' that will allow you to identify each serial port:

  • OpenUSB: /dev/ttyOPENUSB
  • EZRUSB@433 MHz: /dev/ttyEZR433
  • EZRUSB@868 MHz: /dev/ttyEZR868
  • EFM32GG+LoRa: /dev/ttyLORA

By referring to these symlinks instead of the /dev/ttyUSBX-devices directly you can be sure that you are talking to the correct device.

If you are not using one of the 'CoT' images, you can add the necessary udev-rules needed to to do by copying /etc/udev/rules.d/50-persistent-usb.rules from one of the 'CoT' images to your own image.

How can I flash/erase the EZRUSB devices ?

If you use one of the 'CoT' Disk Images, the EZRUSB devices can be programmed using the flash_ezr script. This script can be invoked as follows:

flash_ezr <device> <elf-file>

Where:

  • <device> is one of 'EZR433' or 'EZR868', depending on whether you want to flash the 433MHz or 868MHz device
  • <elf-file> is the ELF-image to flash to the device.

Likewise, the erase_ezr script can be used to erase an EZRUSB device. This script is invoked in exactly the same way as the flash_ezr script, except that no ELF-image file is specified.

Even if you are not using one of the 'CoT' images, you are strongly advised to use the flash_ezr and erase_ezr scripts since these scripts contain the logic required to ensure that the 'correct' device is flashed/erased.

You can add these scripts to your own image by simply copying them from the '/usr/local/bin' directory from one of the 'CoT'-images to your own image, but to run them OpenOCD (0.9.0 or later) does need to be installed.

How can I flash/erase the LoRa device ?

The 'LoRa' device is basically a Giant Gecko starter kit equipped with an RFM95W LoRa module. (See [Node Specifications]). This module is equipped with an on-board J-Link debugger, so debugging/programming/erasing this board is done in exactly the same way as it is for any other SiLabs MCU. (See here for the offical 'Getting Started' guides.

To make things a bit easier, all 'CoT' disk images already contain the necessary J-Link software as well as a few helper scripts. Flashing the 'LoRa'-device can be done using the flash_lora script. This script is invoked as follows:

flash_lora <device> <elf-file> Where:

  • <elf-file> is the ELF-image to flash to the device.

Likewise, the erase_lora script can be used to erase the 'LoRa-'device. This script is invoked in exactly the same way as the flash_lora script, except that no ELF-image file is specified.

I have a question and I can't find the answer on the Wiki

Please send your question to . We'll be happy to help you along and update the documentation where necessary.