Home/Support/Support Forum/Send data from connectportx4 to my pc or raspberryPi
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Send data from connectportx4 to my pc or raspberryPi

0 votes
I don't know whether I am in the appropriate category or not!
I am using a connectportx4 as a coordinator to collect power consumption data of different devices using pikkerton zbs-110V2. I get the data from zbs to connectport. I want to send these data to my laptop continuously to process it. Can anyone tell me whether its possible to send data to pc from connectport (and other way around too)?
I tried usb serial communication using usb-serial adapter.
code in connectport:
(I am not quite sure what is the port no in connectport! I don't know how to get port no. I tried com/0, com/1--nothing works)
import os
serfd = os.open( '/com/1', os.O_RDWR | os.O_NONBLOCK)
print "serial opened"
print "ERROR"
erg = 'hello over serial'
count = os.write( serfd, erg)
print "data send over serial"
print "ERROR"


code in laptop:
import serial

ser = serial.Serial(port='COM1',baudrate=9600,timeout=4,parity=serial.PARITY_NONE,stopbits=serial.STOPBITS_ONE,bytesize=serial.EIGHTBITS)

s = ser.read()
print s
asked Jun 4, 2015 in USB Serial by Hasan66 New to the Community (0 points)

Please log in or register to answer this question.