edenleft.blogg.se

Cant connect to pi unless l boot and run startx on pi
Cant connect to pi unless l boot and run startx on pi











I tried other things, but can't remmeber now.

cant connect to pi unless l boot and run startx on pi

Sudo python /home/pi/masterBaseInterface.py The bashrc too, but this ones only works when I login via ssh with putty sudo nano /home/pi/.bashrc Sudo python /home/pi/masterBaseInterface.py & This crontab sudo python /home/pi/masterBaseInterface.pyĪlso the rc.local thing sudo nano /etc/rc.local Posting the script source because I don't know if it contains something illegal. #that's how you pass arguments to functions when creating new threads using thread module. #Note it's (addr,) not (addr) because second parameter is a tuple Thread.start_new_thread(on_new_client,(c,addr)) S.listen(5) # Now wait for client connection.Ĭ, addr = s.accept() # Establish connection with client. Print 'Server started with local IP '+ get_ip_address() Port = 1000 # Reserve a port for your service. Host = get_ip_address() # Get local machine name S = socket.socket() # Create a socket object Print "Master base not responding, sending error message to client" Print "Message sent to client, connection closed" Print "Master base replies with "+output.encode('hex')Ĭnd('OK,'+output.encode('hex')) Print "Message sent, waiting for response" Print "Dispatching message to master base" Print "Received message from client: "+msg S = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) #sudo python /home/pi/masterBaseInterface.py I have tried like 5 methods to get this script loaded after raspi3 load.













Cant connect to pi unless l boot and run startx on pi