Forum >Sending data between bluno nano and raspberry pi 2 with serial bluetooth module
Sending data between bluno nano and raspberry pi 2 with serial bluetooth module

Im trying to send data from an arduino with integrated ble (bluno nano from DFRobot) to a raspberry pi 2 which has an hm10 ble module connected to its serial0 gpio14 and 15 pins.
Im currently using this sketch:
I have confirmed that anything I type into the arduino ide serial monitor shows up in the raspberry pi. But it appears the bluno is not receiving the data sent by the pi.
Im currently using this sketch:
Code: Select all
and Im using this python to read it:
float flow = 500.06; void setup() { Serial.begin( 9600 );} void loop() { if (Serial.available()>0) { if (Serial.read() == 'R') { Serial.print(flow) Serial.write("\n"); } } }
Code: Select all
This should make the raspberry send R to the bluno nano after 10 seconds of running the script. But I get blank lines in the raspberry terminal every ten seconds. I guess that is the print myData line, which is coming in blank. The bluno nano bluetooth led light is on, they are connected. What could be happening?#! /usr/bin/env python import serial from time import sleep ser = serial.Serial(port='/dev/serial0',parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE,bytesize=serial.EIGHTBITS,timeout=1) # Wait to read from Arduino while 1: try: time.sleep(10) ser.write("R") myData = ser.readline() print myData except KeyboardInterrupt: exit()
I have confirmed that anything I type into the arduino ide serial monitor shows up in the raspberry pi. But it appears the bluno is not receiving the data sent by the pi.

2017-06-27 02:09:55 I guess this is a trick by the AT command. Please check its wiki AT command. There are two line: AT+USBDEBUG = ON/OFF AT+BLUNODEBUG = ON/OFF. Please check what is the status of the BLUNODEBUG? Is it ON?
Grey.CC

2017-06-27 02:09:55 I guess this is a trick by the AT command. Please check its wiki AT command. There are two line: AT+USBDEBUG = ON/OFF AT+BLUNODEBUG = ON/OFF. Please check what is the status of the BLUNODEBUG? Is it ON?
Grey.CC

2017-06-27 00:07:34 How about using a logical level converter, since the working voltages of R pi and Bluno Nano are different
robert.chen

2017-06-27 00:07:34 How about using a logical level converter, since the working voltages of R pi and Bluno Nano are different
robert.chen

2017-06-25 12:27:34 Try this code
R2D2C3PO
Code: Select all
float flow = 500.06; void setup() { Serial.begin( 9600 );} void loop() { if (Serial.available()) { if (Serial.read() == 'R') { Serial.print(flow) Serial.print("\n"); } delay(20); } }

2017-06-25 12:27:34 Try this code
R2D2C3PO
Code: Select all
float flow = 500.06; void setup() { Serial.begin( 9600 );} void loop() { if (Serial.available()) { if (Serial.read() == 'R') { Serial.print(flow) Serial.print("\n"); } delay(20); } }

2017-06-25 04:53:00 Ok I have made them connect via AT commands on serial. Im not using bluetooth protocol, just serial. And I can send from bluno and raspberry receives it. I just CANNOT send from raspberry and receive in bluno. Can you help me figure out why?
info

2017-06-25 04:53:00 Ok I have made them connect via AT commands on serial. Im not using bluetooth protocol, just serial. And I can send from bluno and raspberry receives it. I just CANNOT send from raspberry and receive in bluno. Can you help me figure out why?
info

2017-06-24 20:17:54 Um,not sure HM10 is compatible with Bluno Nano. We need to make sure they can be paired at the first place.
R2D2C3PO

2017-06-24 20:17:54 Um,not sure HM10 is compatible with Bluno Nano. We need to make sure they can be paired at the first place.
R2D2C3PO

2017-06-22 09:11:34 Im trying to send data from an arduino with integrated ble (bluno nano from DFRobot) to a raspberry pi 2 which has an hm10 ble module connected to its serial0 gpio14 and 15 pins.
Im currently using this sketch:
I have confirmed that anything I type into the arduino ide serial monitor shows up in the raspberry pi. But it appears the bluno is not receiving the data sent by the pi.
info
Im currently using this sketch:
Code: Select all
and Im using this python to read it:
float flow = 500.06; void setup() { Serial.begin( 9600 );} void loop() { if (Serial.available()>0) { if (Serial.read() == 'R') { Serial.print(flow) Serial.write("\n"); } } }
Code: Select all
This should make the raspberry send R to the bluno nano after 10 seconds of running the script. But I get blank lines in the raspberry terminal every ten seconds. I guess that is the print myData line, which is coming in blank. The bluno nano bluetooth led light is on, they are connected. What could be happening?#! /usr/bin/env python import serial from time import sleep ser = serial.Serial(port='/dev/serial0',parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE,bytesize=serial.EIGHTBITS,timeout=1) # Wait to read from Arduino while 1: try: time.sleep(10) ser.write("R") myData = ser.readline() print myData except KeyboardInterrupt: exit()
I have confirmed that anything I type into the arduino ide serial monitor shows up in the raspberry pi. But it appears the bluno is not receiving the data sent by the pi.
