Adding WiFi support to Marlin with RAMP1.4 April 03, 2013 10:33AM |
Registered: 11 years ago Posts: 42 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 03, 2013 11:16AM |
Registered: 11 years ago Posts: 544 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 03, 2013 12:05PM |
Registered: 11 years ago Posts: 203 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 03, 2013 12:27PM |
Registered: 11 years ago Posts: 42 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 03, 2013 12:36PM |
Registered: 12 years ago Posts: 939 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 03, 2013 01:08PM |
Registered: 11 years ago Posts: 42 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 03, 2013 01:50PM |
Registered: 12 years ago Posts: 939 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 03, 2013 04:07PM |
Registered: 12 years ago Posts: 1,236 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 03, 2013 05:11PM |
Registered: 11 years ago Posts: 42 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 03, 2013 05:14PM |
Registered: 12 years ago Posts: 1,236 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 03, 2013 11:17PM |
Registered: 11 years ago Posts: 42 |
wifiSerial.begin(9600); if (!wifly.begin(&wifiSerial, &Serial)) { Serial.println("Failed to start wifly"); terminal(); } /* Join wifi network if not already associated */ if (!wifly.isAssociated()) { /* Setup the WiFly to connect to a wifi network */ Serial.println("Joining network"); wifly.setSSID(mySSID); wifly.setPassphrase(myPassword); wifly.enableDHCP(); if (wifly.join()) { Serial.println("Joined wifi network"); } else { Serial.println("Failed to join wifi network"); terminal(); }
void get_command() { while( MYSERIAL.available() > 0 && buflen < BUFSIZE) { serial_char = MYSERIAL.read(); if(serial_char == '\n' || serial_char == '\r' || (serial_char == ':' && comment_mode == false) || serial_count >= (MAX_CMD_SIZE - 1) ) {
Re: Adding WiFi support to Marlin with RAMP1.4 April 08, 2013 10:38PM |
Registered: 11 years ago Posts: 42 |
FORCE_INLINE void write(uint8_t c) { while (!((UCSR2A) & (1 << UDRE2))) // Changed ; UDR2 = c; }
Re: Adding WiFi support to Marlin with RAMP1.4 April 09, 2013 09:16AM |
Registered: 11 years ago Posts: 42 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 10, 2013 01:26PM |
Registered: 12 years ago Posts: 972 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 10, 2013 09:58PM |
Registered: 11 years ago Posts: 544 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 11, 2013 08:56AM |
Registered: 11 years ago Posts: 42 |
def connect(self, port = None, baud = None): # This opens a connection from printrun/pronterface to the serial port self.printer = Serial(port = self.port, baudrate = self.baud, timeout = 0.25) def _readline(self): try: #This reads a line from the serial port line = self.printer.readline() def _send(self, command, lineno = 0, calcchecksum = False): try: #This writes a line to the serial port self.printer.write(str(command+"\n"))
# Echo client program import socket HOST = '192.168.1.100' # The remote host PORT = 23 # The same port as used by the server s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) s.sendall('Hello, world') data = s.recv(1024) s.close() print 'Received', repr(data)
def connect(self, port = None, baud = None): #self.printer = Serial(port = self.port, baudrate = self.baud, timeout = 0.25) self.printer = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.printer.connect(('192.68.1.100', '23')) # this is the address my wifi module is tuned to def _readline(self): try: #line = self.printer.readline() line = self.printer.recv(1024) def _send(self, command, lineno = 0, calcchecksum = False): try: #self.printer.write(str(command+"\n")) self.printer.sendall(str(command+"\n"))
Re: Adding WiFi support to Marlin with RAMP1.4 April 11, 2013 09:21AM |
Registered: 12 years ago Posts: 972 |
Quote
The one problem I see is that Tcp/ip connections are typically short lived, they open send, recieve and close. I not sure if I need to add some overhead of opening the socket each call or just try to leave it open.
Re: Adding WiFi support to Marlin with RAMP1.4 April 11, 2013 12:13PM |
Registered: 13 years ago Posts: 1,780 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 11, 2013 01:30PM |
Registered: 11 years ago Posts: 42 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 11, 2013 03:26PM |
Registered: 12 years ago Posts: 809 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 14, 2013 06:03AM |
Registered: 11 years ago Posts: 1 |
Re: Adding WiFi support to Marlin with RAMP1.4 April 14, 2013 07:25AM |
Registered: 12 years ago Posts: 1,236 |
SoftwareSerial.h with Marlin August 01, 2013 10:56AM |
Registered: 10 years ago Posts: 46 |
Re: SoftwareSerial.h with Marlin August 01, 2013 11:03AM |
Registered: 12 years ago Posts: 972 |
Re: Adding WiFi support to Marlin with RAMP1.4 August 01, 2013 11:11AM |
Registered: 10 years ago Posts: 46 |
Re: Adding WiFi support to Marlin with RAMP1.4 August 01, 2013 11:14AM |
Registered: 12 years ago Posts: 972 |
Re: Adding WiFi support to Marlin with RAMP1.4 August 01, 2013 11:58AM |
Registered: 10 years ago Posts: 46 |
Re: Adding WiFi support to Marlin with RAMP1.4 August 01, 2013 12:15PM |
Registered: 13 years ago Posts: 1,797 |
Re: Adding WiFi support to Marlin with RAMP1.4 August 01, 2013 12:23PM |
Registered: 12 years ago Posts: 972 |
Re: Adding WiFi support to Marlin with RAMP1.4 August 01, 2013 01:22PM |
Registered: 10 years ago Posts: 46 |