Sunday, January 31, 2021

EC25 Quectel drivers | QUECOPEN

After doing different projects on different micro controller i started working with Quectel EC25 driver( 4g LTE) and mc60 and m66.

 EC25 Quectel Drivers Description:

Quectel EC25 is a series of LTE Cat 4 module optimized specially for M2M and IoT applications. Adopting the 3GPP Rel. 11 LTE technology, it delivers 150Mbps downlink and 50Mbps uplink data rates. Designed in the compact and unified form factor,EC25 is compatible with Quectel UMTS/HSPA+ UC20/UC200T modules and multi-mode LTE EC2x/EG25-G modules, whichallows for flexible migration among them in design and manufacturing.EC25 contains 12 variants: EC25-E, EC25-EU, EC25-EC, EC25-EUX, EC25-A, EC25-V, EC25-AF, EC25-MX, EC25-AU, EC25-AUT,EC25-AUTL and EC25-J.

This makes it backward-compatible with existing EDGE and GSM/GPRS networks, ensuring that it can be connected even in remote areas devoid of 4G or 3G coverage.
EC25 supports Qualcomm® IZat™ location technology Gen8C Lite (GPS, GLONASS, BeiDou, Galileo and QZSS). The integrated GNSS greatly simplifies product design, and provides quicker, more accurate and more dependable positioning.

A rich set of Internet protocols, industry-standard interfaces and abundant functionalities (USB serial drivers for Windows 7/8/8.1/10, Linux, Android/eCall*) extend the applicability of the module to a wide range of M2M and IoT applications such as industrial router, industrial PDA, rugged tablet PC, video surveillance, and digital signage.

EC25 ubuntu os link for virtual machine

download the above link 


EC25 Quectel driver


python day 29 tkinter class1

 # -*- coding: utf-8 -*-

"""

Created on Mon Feb  1 07:09:50 2021


@author: anil



import tkinter


window=tkinter.Tk()

window.geometry("1024x768")

window.mainloop()




import tkinter


window=tkinter.Tk()

window.geometry("1920x1080")

window.mainloop()


import tkinter

#from tkinter import *


window=tkinter.Tk()

window.geometry("1920x1080")

Button(window,text='Quit', command=master.quit)

window.mainloop()

"""



from tkinter import *

import pymysql



def create_table():

    conn=pymysql.connect(host="localhost",user="root",password="",db="sslabs")

    mycursor=conn.cursor()

    #mycursor.execute("CREATE TABLE student2 (id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255),standard VARCHAR(255), sub VARCHAR(255) )")

    sql = "INSERT INTO student2 (name, standard,sub) VALUES (%s, %s,%s)"

 

    #print("First Name: %s\nstandard:%s\nsubject:%s" % (e1.get(),e2.get(),e3.get()))

    name=e1.get()

    standard=e2.get()

    sub=e3.get()

    val = (name, standard, sub)

    mycursor.execute(sql, val)

    conn.commit()

    print(mycursor.rowcount, "record inserted.")


def show_entry_fields():

    #print("First Name: %s\nstandard:%s\nsubject:%s" % (e1.get(),e2.get(),e3.get()))

    query = "SELECT * FROM student2"

    ## getting records from the table

    mycursor.execute(query)

    ## fetching all records from the 'cursor' object

    records = mycursor.fetchall()

    ## Showing the data

    for record in records:

        print(record)


master=Tk()

master.geometry("500x300")

master.title("Hotel management")



Label(master , text="dosa").grid(row=0)

Label(master , text="idle").grid(row=1)

Label(master , text="puri").grid(row=2)

Label(master , text="wada").grid(row=3)

Label(master , text="Bonda").grid(row=4)

Label(master , text="Upma").grid(row=5)


e1=Entry(master)

name=e1.grid(row=0,column=1)

e2=Entry(master)

standard = e2.grid(row=1,column=1)

e3=Entry(master)

sub = e3.grid(row=2,column=1)


Button(master,text='Quit', command=master.quit).grid(row=6,column=0,sticky=W,pady=4)

Button(master,text='Show', command=show_entry_fields).grid(row=7,column=1,sticky=W,pady=4)

Button(master,text='Insert', command=create_table).grid(row=8,column=2,sticky=W,pady=4)



mainloop()






python day 28 mysql with python crud operations

 # -*- coding: utf-8 -*-

"""

Created on Sun Jan 31 13:29:32 2021


@author:anil




#try fail condition

try:

   print("i am in try")

   

#error handling

except:

    print("i am in expect block")

   

    


#try fail condition

try:

   print(1/0)

   #failing condition

   

#error handling

except:

    print("i am in except block")



   

#try fail condition

try:

   #print("db conneted")

   print(1/0)

   #db connections

   #failing condition

   

#error handling

except ZeroDivisionError:

    print("this is name ZeroDivisionError: block")


try:

   #print("db conneted")

   print(1/1)

   #db connections

   #failing condition

   

#error handling

except ZeroDivisionError:

    print("this is name ZeroDivisionError: block")

else:

    print("nothing is wrong")

 

  

try:

   #print("db conneted")

    while(1):

        print(1/1)

   #db connections

   #failing condition

   

#error handling

except ZeroDivisionError:

    print("this is name ZeroDivisionError: block")

finally:

    print("finally class")


try:

   #print("db conneted")

   for i in range(10):

       print(1/1)

    

   print(1/0)

   #db connections

   #failing condition

   

#error handling

except ZeroDivisionError:

    print("this is name ZeroDivisionError: block")

finally:

    print("finally class")


    

    

try:

   f = open("mytesfd.txt",'r+b')

   f.write("this is testing")

except:

    raise Exception("sorry file is missing")

finally:

    f.close()

   


try:

   print("this is connected")


finally:

    print("file closed")


    

    

import pymysql


conn=pymysql.connect(host="localhost",user="root",password="",db="praveen_test")

mycursor=conn.cursor()

ycursor.execute(CREATE TABLE fifth_class_a (id int primary key, name varchar(20),last_name varchar(20)))

mycursor.execute(CREATE TABLE fifth_class_b (id int primary key, name varchar(20)))

mycursor.execute(CREATE TABLE fifth_class_b (id int primary key, name varchar(20)))

conn.commit()

conn.close()


import pymysql


conn=pymysql.connect(host="localhost",user="root",password="",db="praveen_test")

mycursor=conn.cursor()


mycursor.execute(CREATE TABLE fifth_class_d (id int primary key, name varchar(20),lastname varchar(20),student_id varchar(20)))

conn.commit()

conn.close()



import pymysql


conn=pymysql.connect(host="localhost",user="root",password="",db="praveen_test")

mycursor=conn.cursor()

#mycursor.execute("INSERT INTO names(id,name) VALUES(1,'praveen');")

#a=mycursor.execute("INSERT INTO names(id,name) VALUES(4,'lavanya');")


#print("->data inserted")


 

mycursor.execute("UPDATE `names` SET `name` = 'lavanya2' WHERE `names`.`id` = 4;")


mycursor.execute("SELECT * FROM names")

row = mycursor.fetchone()

while row is not None:

    print(row)

    row = mycursor.fetchone()


conn.commit()

conn.close()


#CRUD

#C-create

#R-read

#U-update

#D-delete



#update the tables

import pymysql


conn=pymysql.connect(host="localhost",user="root",password="",db="praveen_test")

mycursor=conn.cursor() 

mycursor.execute("UPDATE `names` SET `name` = 'laxmi' WHERE `names`.`id` = 4;")


conn.commit()

conn.close()




#delete operation

import pymysql


conn=pymysql.connect(host="localhost",user="root",password="",db="praveen_test")

mycursor=conn.cursor() 

mycursor.execute("DELETE FROM `names`  WHERE `id` = 4;")


conn.commit()

conn.close()




import pymysql


conn=pymysql.connect(host="localhost",user="root",password="",db="praveen_test")

mycursor=conn.cursor() 

#mycursor.execute("DELETE FROM `names`  WHERE `id` = 4;")

sql_select_Query = "select * from names"

mycursor.execute(sql_select_Query)

records = mycursor.fetchall()


for row in records:

        print("Id = ", row[0], )

        print("Name = ", row[1])

        

        

        

conn.commit()

conn.close()


"""


import pymysql


conn=pymysql.connect(host="localhost",user="root",password="",db="praveen_test")

mycursor=conn.cursor() 

#mycursor.execute("DELETE FROM `names`  WHERE `id` = 4;")

sql_select_Query = "select * from names"

mycursor.execute(sql_select_Query)

records = mycursor.fetchall()


for row in records:

        print("Name = ", row[1])


conn.commit()

conn.close()





    

    


Thursday, January 28, 2021

python day26

 # -*- coding: utf-8 -*-

"""

Created on Thu Jan 28 21:45:09 2021

day 26

iterators 


@author: anil


flowers=("jasmin","marigold","lilli")

#print(type(flowers))


#iterators

#__iter__()

#iter()

#

'''

print(iter(flowers))

print(flowers[0])

print(flowers[1])

print(flowers[2])

'''


myiter=iter(flowers)

print(myiter)

"""


#flowers=("jasmin","marigold","lilli","malle","rose")

#print(type(flowers))


#iterators

#__iter__()

#iter()

#

'''

print(iter(flowers))

print(flowers[0])

print(flowers[1])

print(flowers[2])



myiter=iter(flowers)

#print(myiter)


print(next(myiter))

print(next(myiter))

print(next(myiter))

print(next(myiter))

print(next(myiter))





flowers=["jasmin","marigold","lilli","malle","rose"]

myiter=iter(flowers)

#print(myiter)


for i in range(5):

    print(next(myiter))



class numbers:

    def __iter__(self):

        self.a=1

        return self

    

    def __next__(self):

        x=self.a

        self.a=self.a+1

        return x

    


my_class=numbers()

myiter=iter(my_class)


print(next(myiter))

print(next(myiter))

print(next(myiter))

print(next(myiter))


#StopIteration(args)

'''



class numbers:

    def __iter__(self):

        self.a=1

        return self

    

    def __next__(self):

        if self.a<=30:

            x=self.a

            self.a=self.a+1

            return x

        else:

            raise StopIteration

    


my_class=numbers()

myiter=iter(my_class)



for i in range(30):

    print(next(myiter))



#StopIteration(args)

Friday, January 22, 2021

python day 25 docstring and variable, scope

 # -*- coding: utf-8 -*-

"""

Created on Sat Jan 23 06:45:14 2021

topic: classes doc string and variables



@author: anil



class father():

    '''This is the father class developed by praveen

    inside addition method is there

    inside sub method is there

    inside mul method is there

    inside div method is there

    '''

    def __init__(self):

        print("this is father class default constructor")

        help(type(self))

  

    

    

father()

print(father.__doc__)

help(father)


b=10


class father():

    '''This is the father class developed by praveen

    inside addition method is there

    inside sub method is there

    inside mul method is there

    inside div method is there

    '''

    global b

    

    def __init__(self):

        a = 10

        

        

        self.name="praveen"

        print(self.name)

        print(a)

        print(b)

    def display():

        

        print(b)

        


#father()

father.display()

#print(a)

"""

b=30

c=10


class father():

    

    global b

    

    def __init__(self):

        a = 10

        self.name="praveen"

        #print(self.name)

        #print(a)

        #print(b)

        b =20

        print(b)

        b=50


    def display():

       

        print(b,c)


father()

print("this is display method inside values")

father.display()

print("a",a)

#print(a)




python day 24 class super function 2

 # -*- coding: utf-8 -*-

"""

Created on Fri Jan 22 21:48:01 2021

day 24:classes


@author: anil durgam



class engine():

    def piston():

        print("piston")


class carbody(engine):

    engine.piston()

    def seats():

        print("seats")

        

       

carbody()





class engine():

    def __init__(self,name,lastname):

        self.name=name

        self.lastname=lastname

        #print(self.name)

        

    def piston(self):

        print(self.name,self.lastname)


class carbody(engine):

    def __init__(self):

        pass

    

    def seats(self):

        print("seats")

        

    

         

#carbody()

s=engine("raju","kumar")

s.piston()



class engine():

    def __init__(self,name,lastname):

        self.name=name

        self.lastname=lastname

        #print(self.name)

        

    def piston(self):

        print(self.name,self.lastname)


class carbody(engine):

    def __init__(self,name,lastname):

        engine.__init__(self,name,lastname)

       

    #def seats(self):

        #print(self.name,self.lastname)

        

    def seatbelt():

        print("This is seatbelt method")

               

class backseat():

    def backseats(self):

        print("back seat method is working")

        

    

         

x=carbody("honda","spender")

x.piston()

"""



class engine():

    def __init__(self,name,lastname):

        self.name=name

        self.lastname=lastname

        #print(self.name)

        

    def piston(self):

        print(self.name,self.lastname)


class carbody(engine):

    def __init__(self,name,lastname):

        super().__init__(name,lastname)

       

    #def seats(self):

        #print(self.name,self.lastname)

        

    def seatbelt():

        print("This is seatbelt method")

               

class backseat():

    def backseats(self):

        print("back seat method is working")

        

    

         

x=carbody("honda","spender")

x.piston()

Thursday, January 21, 2021

python day 23 topic classes with super function

 # -*- coding: utf-8 -*-

"""


 day 23:

topic : classes

@author: 



class employee():

    pass



employee()



class employee():

    #print("this is employee class")

    

    def __init__(self,s_no,name,sal):

        self.s_no = s_no

        self.name = name

        self.sal  = sal

        #print("inside constructor",a,b)

        

    def display(self):

        print("employee info ",self.s_no,self.name, self.sal )

        



s=employee(1,"venky",2000)

s.display()



class person():

    def __init__(self,name,):

        self.name=name

        

    def display(self):

        print("employee info ",self.name )

    

class employee(person):   

    

    def __init__(self,name):

        person.__init__(self,name)

        

    


a=employee("ram")

a.display()


"""


class person():

    def __init__(self,name,):

        self.name=name

        

    def display(self):

        print("employee info ",self.name )

    

class employee(person):   

    

    def __init__(self,name):

       super().__init__(name)

        

a=employee("ram")

a.display()


python day 22 topic classes

 # -*- coding: utf-8 -*-

"""

day 22: 

Topic : classes


@author: anil



class addition():

   def __init__(self,a,b):

       self.a=a

       self.b=b

       #print("self",self.a,self.b)

       

   def add(self):

       c= self.a + self.b

       print("self",self.a,self.b)

       return c

       

if __name__ == "__main__":

    

    a=addition(10,20)

    a.add()


class addition():

   def __init__(self,a,b):

       self.a=a

       self.b=b

       #print("self",self.a,self.b)

       

   def add(self):

       c= self.a + self.b

       print("self",self.a,self.b,c)

       return c

       

if __name__ == "__main__":

    

    a=addition(10,20)

    a.add()

    #print(addition(300,40))



class addition():

   def __init__(self,a,b):

       self.a=a

       self.b=b

       #print("self",self.a,self.b)

       

   def add(self):

       c= self.a + self.b

       print("self",self.a,self.b,c)

       return c

   

    

   def sub(self):

       c= self.a - self.b

       print("self",self.a,self.b,c)

       return c

       

if __name__ == "__main__":

    

    a=addition(10,20)

    a.sub()

    #print(addition(300,40))

  

class addition():

         

   def add(self):

      print("this is add method")

   

    

 

       

if __name__ == "__main__":

    

    a=addition()

    a.add()

    #print(addition(300,40))

   

class engine():

    #print("this is engine")

    def piston():

        print("piston")


class carbody():

    #print("this is carbody")

    def seats():

        print("seats")

         

      

    

engine.piston()

carbody.seats()

 

class engine():

    #print("this is engine")

    def piston():

        print("piston")


class carbody():

    #print("this is carbody")

    def seats():

        print("seats")

        

    engine.piston()

         

carbody.seats()

""" 

class engine():

    def __init__(self):

        print("this is engine")

    def piston():

        print("piston")


class carbody(engine):

    print("this is carbody")

    def seats():

        print("seats")

        

    

         

carbody()


Wednesday, January 20, 2021

python class 21 ...topic classes

 # -*- coding: utf-8 -*-

"""

python topic classes

@author: anil



from substraction import sub


def addition(a,b):

    return a+b


a=sub(10,5)

print(a)



class addition():

   def __init__(self):

       print("praveen is thopu")

    


addition()




class addition():

   def __init__(self):

       print("praveen is thopu")

       print("praveen is thopu")

       print("praveen is thopu")

       print("praveen is thopu")

       print("praveen is thopu")

       print("praveen is thopu")

       print("praveen is thopu")

    


addition()



class addition():

   def __init__(raju):

       print("praveen is thopu")

       print("praveen is thopu")

       print("praveen is thopu")

       print("praveen is thopu")

       print("praveen is thopu")

       print("praveen is thopu")

       print("praveen is thopu")

    


addition()


class addition():

   def __init__(self):

       a=10

       b=20

       c= a+b

       print(c)

    


addition(10,20)


class addition():

   def __init__(self):

       print("this is default constructor")

      

   def addition():

       #c= a+b

       #print(c)

       print("this is addition method")

       

   def sub():

       #c= a+b

       #print(c)

       print("this is sub method")

    


addition()

addition.addition()

addition.sub()

"""

class addition():

   def __init__(self):

       print("this is default constructor")

      

   def add(a,b):

       c= a+b

       print(c)

       #print("this is addition method")

       

   def sub(a,b):

       c= a-b

       print(c)

       #print("this is sub method")

    



addition.add(10,20)

#add(10,20)

python day 20 revision on all topics

 # -*- coding: utf-8 -*-

"""


 python day 20

@author: anil


for i in range(1,100,1):

     print(i)

     


fruits=["dragon","mango","apple"]

print(type(fruits))

print(fruits[0])

print(fruits[1])

print(fruits[2])




pra1={'key1':10,

      'key2':{'key3':23},

      

      }

print(type(pra1))

print(pra1['key2']['key3'])



def basha(a,b):

    #print("rajini is the boss",a+b)

    return a+b



if __name__ == "__main__":

    s=basha(3,4)

    print(s)


    s=basha(300,400)

    print(s)

    

"""

def basha(a,b,*s,**kw):

    return s


s=basha(4,5,7)

print(s)

    





     



python class topic video