Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino MKR Wifi 1010 support #169

Open
joonazan opened this issue Feb 6, 2020 · 6 comments
Open

Arduino MKR Wifi 1010 support #169

joonazan opened this issue Feb 6, 2020 · 6 comments
Labels
board support Related to support for a particular board

Comments

@joonazan
Copy link

joonazan commented Feb 6, 2020

If I've understood correctly, the 1010 would work with the mkrzero code. But I need to use bluetooth, which works differently than on any other board on the 1010. How would I port that to Rust?

@keithduncan
Copy link
Member

keithduncan commented Feb 6, 2020

The Arduino WiFi 1010 board has a u-blox NINA-W10 chip connected over SPI and UART and can be used for 2.4GHz Bluetooth LE and WiFi.

The Arduino library for WiFi is https://github.com/arduino-libraries/WiFiNINA and for BluetoothLE is https://github.com/arduino-libraries/ArduinoBLE. I’m not aware of any Rust drivers for it yet, though it is something on my backlog 😅.

The firmware running on the NINA-W10 (ESP32) also open source and available at https://github.com/arduino/nina-fw. That’s the firmware it comes with out the box that you’d need to write a driver for. You could also fork that firmware or use a different ESP32 firmware and write a driver for that instead if you wanted.

When I last looked at this I was able to flash the NINA-W102 (ESP32) with the esp-at firmware so that I could send AT commands over UART instead of binary commands over SPI. I haven’t picked this up in a while as I’ve been working with the u-blox SARA R410M LTE modem instead. Good luck!

@joonazan
Copy link
Author

joonazan commented Feb 6, 2020 via email

@joonazan
Copy link
Author

joonazan commented Feb 6, 2020

https://github.com/arduino/nina-fw/blob/3ba538f27ed56f4802911bb2b7d32e4f6b492e81/main/sketch.ino.cpp#L115

The firmware just makes bluetooth controllable via UART and then sleeps forever. Pretty wasteful.

I'll write my own firmware with the esp-idf NimBLE.

I doubt it is going to be generic enough to be worth including here, though. It will support writing to characteristics supporting read and notify and receiving updates on one writable characteristic.

@joonazan
Copy link
Author

@keithduncan I now have a working Arduino library. https://github.com/joonazan/nina-fast-bluetooth

A Rust version of the SAMD side would be pretty straightforward to make.

I also noticed that the MKR WiFi is a very awkward board. NINA is harder to flash but because of its specs it should be the main computer. It has 520kB of RAM and a dual core processor that is at least ten times faster than the SAMD. It has stack traces and FreeRTOS if using esp-idf.

I think it would be ideal to make a build script that makes it easy to flash Rust onto the NINA and SAMD in one go.

@keithduncan
Copy link
Member

a dual core processor that is at least ten times faster than the SAMD

It’s funny isn’t it 😄

The NINA W10 has an Xtensa core which has preliminary rust support.

Nice work getting an esp32 app running 👍

@jessebraham jessebraham added the board support Related to support for a particular board label Aug 9, 2020
@sajattack sajattack linked a pull request Nov 16, 2020 that will close this issue
@sunsided
Copy link

sunsided commented Jan 1, 2025

See also #606

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board support Related to support for a particular board
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants