Python temp and voltage readings from new WR44 output garbage

Hi All:

This is the output from my brand new WR44:
jserink@jserinki7 ~/qemu/vde $ ncat 192.168.119.4 51317
-66.00 1.00

It should look like this:

jserink@jserinki7 ~ $ nc 192.168.173.1 51317
nc: using stream socket
38.00 12.37

Here is the code:
#!/usr/bin/python

this script runs a socket server that will return the unit temperature

and voltage in the format"tt.tt vv.vv"

import digihw
import socket

create a socket object

serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

get local machine name

host = socket.gethostname()

port = 51317

bind to the port

serversocket.bind((host, port))

queue up to 5 requests

serversocket.listen(1)

while True:
# establish a connection
clientsocket,addr = serversocket.accept()

print("Got a connection from %s" % str(addr))
temp = digihw.temperature() 
data = "%.2f  "%temp
batt = digihw.voltage_monitor()
data = data + "%.2f

"%batt
clientsocket.send(data.encode(‘ascii’))
clientsocket.close()

In short, the temp = digihw.temperature() and batt = digihw.voltage_monitor() are outputting garbage on this new router.

Any ideas on how to fix this?

The router is remote to me so I can’t actually see the wiring in the TIO-1 module, if that’s required.

Cheers,
John

Ok, answered this one myself…

you need to set the serial 1 baud rate to 9600. I now have this output:
jserink@jserinki7 ~/qemu/vde $ nc 192.168.119.4 51317
nc: using stream socket
49.00 11.43

Perfect.

Cheers,
John