Help Bluetooth module with raspberry pi

Thread Starter


Joined May 22, 2023
Hi, I have stacked.. Im trying to connect my Bluetooth module ZS-040 (HC-06) to raspberry pi 3 model b+ for receiving data from mobile phone. I have tried everything but can’t connect. I need python code. I m using serial Bluetooth terminal app on my android phone.
I have this code. My code runs ok and from my phone and app I connect to module successfully but when I type something it doesn’t print to my terminal. Please any help?

import serial
ser = serial.Serial('/dev/ttyAMA0', 9600)
while True:
received_data = ser.readline().decode().strip()