Skip to content

Commit 6e851b1

Browse files
author
brentru
committed
fix example, remove printin
1 parent b18901f commit 6e851b1

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

adafruit_wiznet5k/adafruit_wiznet5k.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,6 @@ def socket_connect(self, socket_num, dest, port, conn_mode=SNMR_TCP):
505505
self._read_sncr(socket_num)
506506
# wait for tcp connection establishment
507507
while self.socket_status(socket_num)[0] != SNSR_SOCK_ESTABLISHED:
508-
print(self.socket_status(socket_num)[0])
509508
if self.socket_status(socket_num)[0] == SNSR_SOCK_CLOSED:
510509
raise RuntimeError('Failed to establish connection.')
511510
time.sleep(1)

adafruit_wiznet5k/adafruit_wiznet5k_dhcp.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,6 @@ def parse_dhcp_response(self, response_timeout):
265265
self._t2 = int.from_bytes(_BUFF[263:267], 'l')
266266
# Subnet Mask
267267
self.subnet_mask = _BUFF[269:273]
268-
print(_BUFF)
269-
#time.sleep(100)
270268
# DNS Server
271269
self.dns_server_ip = _BUFF[281:285]
272270

adafruit_wiznet5k/adafruit_wiznet5k_socket.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ def connect(self, address, conntype=None):
145145

146146
if hasattr(host, 'split'):
147147
host = tuple(map(int, host.split('.')))
148-
print(self._sock_type)
149148
if not _the_interface.socket_connect(self.socknum, host, port, conn_mode=self._sock_type):
150149
raise RuntimeError("Failed to connect to host", host)
151150
self._buffer = b''
@@ -156,7 +155,6 @@ def send(self, data):
156155
:param bytearray data: Desired data to send to the socket.
157156
158157
"""
159-
print(self.socknum, data)
160158
_the_interface.socket_write(self.socknum, data)
161159
gc.collect()
162160

examples/wiznet5k_simpletest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
spi_bus = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
1111

1212
# Initialize ethernet interface with DHCP
13-
eth = WIZNET5K(spi_bus, cs, debug=True)
13+
eth = WIZNET5K(spi_bus, cs)
1414

1515
print("DHCP Assigned IP: ", eth.pretty_ip(eth.ip_address))
1616

@@ -22,6 +22,8 @@
2222
addr_info = socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM)
2323
sock = socket.socket(addr_info[0], addr_info[1], addr_info[2])
2424

25+
sock.connect(addr_info[4])
26+
2527
print("Connected to ", sock.getpeername())
2628

2729
# Make a HTTP Request

0 commit comments

Comments
 (0)