Is there a way to change ConnectPort X4 to send 7e1 format?

Is there a way to change ConnectPort X4 to send 7e1 format?

*Admin note: question branched to its own topic.

Message was edited by: admin

Change what on the ConnectPort X4? The built-on DB9 serial port or the serial interface to the embedded rf module?

The problem is when I want to send a string in python:
sd.sendto(“abc”, 0, dest)
I will receive on the XBee module output string “abc” in 8E0. But I want to have 7E1. To have 7E1 I have to manually add parity bit to each char in python before sending.

Could you post your python code here for our experts to take a look at?

Also, have you seen the following page on our Python mediawiki?:

That page talks about opening the built-on comm port of a ConnectPort X, but some of the information on that page will be relevant to you as well.

Well, origin of that topic is why XBee ZB module firmware doesn’t support setting 7 bit data word. Format 8N1 means, that it is transparent, so to have 7E1 I have to write my own function in Python and add parity bit in replace of MSB of each char. There would be no problem if Xbee firmware supports AT command like ‘NB’ or ‘DB’ to change to 7 bit data.

As you say the Xbee do not support the 7 data bits, and many other people desire.

If you buy directly from Digi or a large reseller, you should try and push that requirement back into the “money pipe” - where people who make business decisions can see it.


I am not sure that even makes sense?

XBee by its nature would send data 8bit clean across the XBee network…

When it gets across the network to the device, which is presumably a XBee serial adapter, then the adapter would split up/strip the data to be 7E1 before sending it out the serial port…
(Same thing on the way in)

Perhaps I am just not grokking what you are trying to accomplish here?

Of course it makes sense - you are missing that there is no transparent mode here.

My python script creates as example an Modbus/ASCII request such as ":010300000004F8
". I push this into a ZB Socket and it needs to pop out the other end as 7,E,2 (for example).

This is impossible today. My python script (as kafka suggest) must manually mangle the ASCII string to set the 8th bit as parity.

I am correct - this needs to change, and Digi is losing sales due to this limitation.

I guess I am still missing it…

How would you do this on a standard socket, in Python or otherwise?

Why would you need to mangle it on the XBee sending side?

Would you not want to mangle it on the device side that eventually needs it to be a certain bit size?

ie, you get your same data stream on the device side received but as standard 8bit clean, and then allow the standard serial XBee firmware to translate the 8bit data into the correct data/stop/parity bits you need, before sending into whatever device you are connecting?

BTW, I am not trying to decide who is correct/not correct.
I am trying to “get” what I am apparently missing. =)

Scott, the serial device “over there” demands to see 7-data bits, even parity.

Thus the mesh should move as 8-bit binary, but the Xbee needs to “add” the 7,E,1 or 7,E,2 on the serial RS-232 link.