Writing raw data to RS485

Discussion to talk about software related topics only.
Post Reply
mdiaz.tello
Posts: 6
Joined: Wed Jun 17, 2009 1:59 pm

Writing raw data to RS485

Post by mdiaz.tello »

Is there a way on the SB72-EX to write raw bytes directly to the RS485 port (port 0)? I have been reading through the documentation and it seems like the preferred way to use RS485 is via printf, but that expects a NULL terminated string. I am hoping that there will be a way to just write a non-NULL-terminated string of bytes to the RS485 port. Based on what I have seen in the NetBurnerRuntimeLibraries.pdf, this may be possible, but I would very much appreciate some confirmation.

Also, is there a more comprehensive function reference for the rs485/serial interface? Or are all the functions documented in the NetBurnerRuntimeLibraries.pdf?

Thanks!

--MDiaz-Tello
rnixon
Posts: 833
Joined: Thu Apr 24, 2008 3:59 pm

Re: Writing raw data to RS485

Post by rnixon »

You should be able to use file descriptor writes to a serial port, which is independent of the fact is is 485. For example, write() writeall() writestring(), etc. Make sure to check the return value if using write().
Post Reply