Month: February 2021

Configuring the NuttX MCP2515 CAN driver to 250Kbps

I got MCP2515 working on 250Kbps on NuttX using this configuration setting:

[*] Microchip MCP2515 CAN Bus Controller over SPI
(250000) MCP2515 bitrate
(6) MCP2515 Propagation Segment TQ
(5) MCP2515 Phase Segment 1
(4) MCP2515 Phase Segment 2
(3) MCP2515 Synchronization Jump Width
(8000000) MCP2515 on-board clock frequency
(1000000) MCP2515 SPI SCK Frequency

This timing was based on Timing Suggestions from this guy:

SPOT GEN3 Firmware update on Linux

I just got a SPOT GEN3 satellite tracker and subscribed to the Basic plan. My device was outdated and then I needed to do a firmware update. Globalstar (owner of SPOT company) is too lazy to create an installer for Linux (their Updater uses Java, so it was just matter of creating a package).

Fortunately I was enable to use Wine to install the package and used Java “jar” command to run the application. These were the steps:

Download and Install the firmware updater Windows application:

$ wine spot-device-updater-win.exe

It will be installed at ~/.wine/drive_c/Program Files (x86)/Spot Device Updater/ then move to there:

$ cd ~/.wine/drive_c/Program Files (x86)/Spot Device Updater

Run the jar application:

$ sudo java -jar spot-device-updater.jar

The application will ask you to turn off your device and put it on USB, if you open a new Linux terminal and type “dmesg” you should see the device detected as:

[12341.300721] usb 1-3: new full-speed USB device number 7 using xhci_hcd
[12341.452921] usb 1-3: New USB device found, idVendor=04d8, idProduct=00de, bcdDevice= 0.02
[12341.452927] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[12341.452930] usb 1-3: Product: MCP2210 USB to SPI Master
[12341.452933] usb 1-3: Manufacturer: Microchip Technology Inc.
[12341.452936] usb 1-3: SerialNumber: 0000166139
[12341.456968] hid-generic 0003:04D8:00DE.0006: hiddev0,hidraw5: USB HID v1.11 Device [Microchip Technology Inc. MCP2210 USB to SPI Master] on usb-0000:00:14.0-3/input0
[12628.372842] usb 1-3: USB disconnect, device number 7

Next it will ask your device Auth code, you can find it in the tag bellow the battery.

Then just click on “Update Device” and the magic will happen!

Note: I’m using Ubuntu 20.04 and this java version:

$ java --version
openjdk 14.0.2 2020-07-14
OpenJDK Runtime Environment (build 14.0.2+12-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 14.0.2+12-Ubuntu-120.04, mixed mode, sharing)