[nRF5x] How to connect using WebBluetooth REPL?
[nRF5x] How to connect using WebBluetooth REPL?
I built the Bluetooth REPL for nRF52832, and uploaded it to my nRF52832-DK. Attached is the firmware.
Then, as described here: https://github.com/micropython/micropyt ... /ports/nrf
I tried connecting to it with nRF UART. However, the Bluetooth REPL doesn't seem to be broadcasting anything that I can connect with.
What to do?
Then, as described here: https://github.com/micropython/micropyt ... /ports/nrf
I tried connecting to it with nRF UART. However, the Bluetooth REPL doesn't seem to be broadcasting anything that I can connect with.
What to do?
- Attachments
-
- firmware.zip
- (157.86 KiB) Downloaded 355 times
Last edited by WhiteHare on Tue Oct 16, 2018 2:33 pm, edited 1 time in total.
Re: How to connect with Bluetooth REPL using nRF UART app?
As near as I can tell, the Bluetooth REPL is not discoverable, and so there is no way to connect to it.
How is it done?
How is it done?
Re: How to connect with Bluetooth REPL using nRF UART app?
OK, attached is corrected Bluetooth REPL firmware, but it's still not discoverable.
- Attachments
-
- firmware.zip
- (158.25 KiB) Downloaded 326 times
Re: How to connect with Bluetooth REPL using nRF UART app?
Attached are the bluetooth configuration settings that I used as part of the firmware compile.
- Attachments
-
- bluetooth_conf.zip
- (425 Bytes) Downloaded 356 times
Re: How to connect with Bluetooth REPL using nRF UART app?
I cannot see any error in your bluetooth_conf.h.
The device name advertised should be "mpus". Can you see this when scanning for BLE device using a PC or other scanner app?
Also, make sure that you also flash the SoftDevice before "make flash", by issuing "make sd", else the app will not run at all. After first flash of SD, there is only needed to update the micropython firmware using "flash".
Also, to add in, there is several other ways to also connect to the BLE REPL using a PC,
1. chromium with "Experimental Web Platform features" enabled (chrome://flags). Then using this webbluetooth page to get the BLE connection and REPL in the browser: https://aykevl.nl/apps/nus/
2. https://github.com/aykevl/pynus
3. https://github.com/tralamazza/nus_console
The device name advertised should be "mpus". Can you see this when scanning for BLE device using a PC or other scanner app?
Also, make sure that you also flash the SoftDevice before "make flash", by issuing "make sd", else the app will not run at all. After first flash of SD, there is only needed to update the micropython firmware using "flash".
Also, to add in, there is several other ways to also connect to the BLE REPL using a PC,
1. chromium with "Experimental Web Platform features" enabled (chrome://flags). Then using this webbluetooth page to get the BLE connection and REPL in the browser: https://aykevl.nl/apps/nus/
2. https://github.com/aykevl/pynus
3. https://github.com/tralamazza/nus_console
Re: How to connect with Bluetooth REPL using nRF UART app?
Here's what I did to get Bluetooth REPL running on a pca10059 dongle (beginning with a fresh git clone):
git clone https://github.com/micropython/micropython.git
cd micropython
git submodule update --init
make -C mpy-cross
cd boards/nrf
./drivers/bluetooth/download_ble_stack.sh
modify bluetooth_conf.h
make BOARD=pca10056 SD=s140
Open nRF Connect, connect to the dongle running in DFU mode, add both
micropython/ports/nrf/build-pca10056-s140/firmware.hex and
micropython/ports/nrf/drivers/bluetooth/s140_nrf52_6.0.0/s140_nrf52_6.0.0_softdevice.hex
and flash the to the dongle.
The dongle now comes up and advertises as "mpus".
I connected to it using Google Chrome running on an Android phone, via the website https://aykevl.nl/apps/nus/.
Thanks again for your help, c45713
git clone https://github.com/micropython/micropython.git
cd micropython
git submodule update --init
make -C mpy-cross
cd boards/nrf
./drivers/bluetooth/download_ble_stack.sh
modify bluetooth_conf.h
Code: Select all
#elif (BLUETOOTH_SD == 140)
#define MICROPY_PY_BLE (1)
#define MICROPY_PY_BLE_NUS (1)
Open nRF Connect, connect to the dongle running in DFU mode, add both
micropython/ports/nrf/build-pca10056-s140/firmware.hex and
micropython/ports/nrf/drivers/bluetooth/s140_nrf52_6.0.0/s140_nrf52_6.0.0_softdevice.hex
and flash the to the dongle.
The dongle now comes up and advertises as "mpus".
I connected to it using Google Chrome running on an Android phone, via the website https://aykevl.nl/apps/nus/.
Thanks again for your help, c45713
Re: How to connect with Bluetooth REPL using nRF UART app?
Thank you Kak and c45713 for both your posts. The extra details are very welcome.
I suspect my error may have been using Nordic's drag-and-drop approach to .hex flashing, which may not be sufficient in this case. I'm short on time over the next few days, but I will try again, but this time using Kak's step-by-step instructions on a fresh non-vm x86 Debian system (with Bluetooth!) next week. I'll report back afterward.
I suspect my error may have been using Nordic's drag-and-drop approach to .hex flashing, which may not be sufficient in this case. I'm short on time over the next few days, but I will try again, but this time using Kak's step-by-step instructions on a fresh non-vm x86 Debian system (with Bluetooth!) next week. I'll report back afterward.
Re: How to connect with Bluetooth REPL using nRF UART app?
I'm stuck on
It fails, saying it can't find jlinkarm.dll, but I've been unsuccessful on finding it either.
Code: Select all
make flash
Re: How to connect with Bluetooth REPL using nRF UART app?
Did you install the JLINK software for Linux from Segger?
https://www.segger.com/downloads/jlink/ ... tationPack
If not, use nRF Connect to flash.
https://www.segger.com/downloads/jlink/ ... tationPack
If not, use nRF Connect to flash.
Re: How to connect with Bluetooth REPL using nRF UART app?
Thanks! I used J-Link Software and Documentation pack for Linux, DEB installer, 64-bit, and it worked.kak wrote: ↑Sat Oct 13, 2018 12:43 pmDid you install the JLINK software for Linux from Segger?
https://www.segger.com/downloads/jlink/ ... tationPack
If not, use nRF Connect to flash.
I made it through the entire bluetooth build. Unlike before, I can now find mpus and connect with it over bluetooth using nRF UART 2.0 on my Galaxy 8 phone. However, whatever I send it is not replied to, and after awhile it just disconnects on me.
Same result using both the nRF52-DK and the nRF52840-DK.
Am I supposed to flash something onto it *after* doing the bluetooth flash? I tried doing that too, but it seemed to erase the bluetooth flash, rendering bluetooth no longer operative again.
Well, definitely getting closer at least.