The app review video with Tx of the bluetooth module connected to Rx for testing

Here is the server side code test


Bluetooth & Wifi remote RC Controller.

Control any microcontroller (Arduino - Pic - Atmega - 8051/8052 -.........................................) with bluetooth module (HC-05 -- HC-06...)

Control any microcontroller or microprocessor wifi module or ethernet module (I.e: Connected to the internet) over TCP Socket communication.

(Like Raspberry Pi connected to the internet or arduino connected to internet via module)

Portrait and landscape layouts.

12 Extra control buttons used for any functions you need.

Serial reading and writing consoles.

Control with Buttons or Accelerometer.

Speed Control with 11 different speeds.

Stable communication.

Here is the python server side code:

##************Universal RC_Controller Android Application
#****************** Server code ********************
import socket
import sys
import os

HOST = '192.168.1.10'    #this is your IP
PORT = 8888             #this is your Port
Key="elshab7"           #Used for handshaking process (Must be the same as in the android app)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#socket.socket: must use to create a socket.
#socket.AF_INET: Address Format, Internet = IP Addresses.
#socket.SOCK_STREAM: two-way, connection-based byte streams.
print ('Socket created ')
 
#Bind socket to Host and Port
try:
    s.bind((HOST, PORT))
except socket.error as err:
    print ('Bind Failed, Error Code: ' + str(err[0]) + ', Message: ' + err[1])
    sys.exit()
 
print ('Socket Bind Success!')
 
 
#listen(): This method sets up and start TCP listener.
s.listen(1000)
print ('Socket is now listening '+str(HOST)+" : "+str(PORT))

conn, addr = s.accept()
buf = conn.recv(1024)

UserIp=addr[0]
while(buf.decode()!=Key):
    conn, addr = s.accept()
    buf = conn.recv(1024)
    
print('Connected with ' + addr[0])
print("HandShaking Done...")

UserIp=addr[0]

while 1:
    conn, addr = s.accept()
    if(UserIp==addr[0]):
        buf = conn.recv(1024)
        print("Received: ",buf.decode())

        if(len(buf.decode())>2):
            if(buf.decode()==Key):
                print("--------------------\nRe-HandShaking\n--------------------")
            else:
                print("--------------------\nError in received data length\n--------------------")
        #Your Control Code Here..................
        
        #if(len(buf.decode())>2 and UserIp==addr[0]):
        #    print("Error in received data")

    else:
        print("Receeived Connection From Strange IP: (",addr[0],")")
s.close()