Bluno General Arduino

Raspberry Pi 3 + Bluno nano sensor network

userHead Account cancelled 2020-04-20 17:23:24 4719 Views1 Replies
Hello!
I've done some research on the forum and on other websites and tried to find a solution before I landed here.
I'm going to first write down my goal then my problem and lastly my tried method. Hopefully someone can guide me in the right direction to solve my problem.

Goal
My goal is to have a Raspberry Pi 3b+ as a gateway that fetches data and sends it over Internet to a database. I will use several Blueno nano's as sensor nodes that measure different environmental measurements such as temperature, humidity etc. The Raspberry Pi will in intervals ask the different Blueno's for measurements that packs it and sends it to its destination.

This sensor network will be on a remote location that makes it costly to upgrade the code on the nanos physically and one of my objectives is to use the Raspberry Pi to upgrade the code via Bluetooth via command line (make command with arduino-mk).

Problems
My main issue right now is that I'm not able to upload the code to the Blueno over Bluetooth.

Approach
This is my idea to solve this based on stuff I've found over Internet and what I'm familiar to:
  1. 1. Upgrade the Blueno firmware
    2. Scan for the Blueno (Bluetoothctl)
    Code: Select all
    scan on
    3. Trust the Blueno (Bluetoothctl)
    Code: Select all
    trust [MAC-address]
    4. Pair the Blueno (Bluetoothctl)
    Code: Select all
    pair [MAC-address]
    5. Create a new rfcomm devices associated to the Blueno MAC-address(rfcomm)
    Code: Select all
    sudo rfcomm -i hci0 bind /dev/rfcomm0 [MAC-address]
    6. Set the Blueno in programming mode
    Code: Select all
    echo "+++" > /dev/rfcomm0
    echo "AT+SETTING=DEFPERIPHERAL<CR+LF>" > /dev/rfcomm0
    7. Upload new code to the Blueno (arduino-mk)
    Code: Select all
    make upload clean (makefile has /dev/rfcomm0 as Aurdino Port)
    8. Set the Bluno in operational mode
I think I'm missing some part in order for it to work. Two things I've noticed is the following:
Step 4. fails and I cannot pair the Raspberry Pi and the Bluethooth with Failed to pair: org.bluez.Error.AuthenticationFailed error.
Step 6. does not work I've tried to attach a screen to the /dev/rfcomm0 but it does not work. Bluetoothctl can connect to the Bluno but rfcomm cannot.

Have anyone tried something similar and got it to work?

Best regards
Rasmossen