The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
Just to close the loop, using a few RS232 Shifters (SparkFun PRT-00449) and the Netduino Plus 1, I was able to communicate at 19200 7E2. Unfortunately, after all of this, the barcode scanner doesn't support the UCCEAN128 barcode format required for the DHL label we needed to use. After all of that, the project was scrapped.
The good news is that we have identified a few other places on our manufacturing floor where the Netduino platform can be used,
Having trouble reading 19200, 7E2 data from COM2 and COM3 with Netduino Plus 2.
<details>
After playing with Netduinos at home, I finally brought one in to work for a relatively simple project. The board is the Netduino Plus 2 RevA with stock firmware. The Netduino should sit in the middle of an RS232 connection, reading values from one SerialPort, converting the data, then sending it out the other SerialPort. The problem seems to be the port configuration that I have to use. It's 19200, 7E2. I read in another forum topic here that COM1 may have problems with anything other than 8N1, so I'm using COM2 and COM3. Everything initializes correctly, no exceptions creating or opening the ports. The data that is read looks like regular garbage data that you'd see with a config mismatch. Connecting the input to a Windows XP Hyperterminal session with 19200 7E2 gives me good valid reads. It sure looks like the Netduino is having trouble with this configuration.
The setup is pretty straight forward, an overhead barcode scanner sends data through RS232, RS232 connected to Netduino COM2 pins, DataReceived handler writes to SerialLCD on COM1 and log file on SD card. Once receive is OK from COM2, send the modified data out COM3 at the same config.
I don't have a lot of experience with anything beyond 8N1, but I am curious if the newer firmware for the Netduino Plus 2 should would help alleviate any issues. You can download the latest firmware from here: Netduino Plus 2 Firmware v4.2.2
Also what are the voltage levels of your RS232 device and how exactly do you have it wired to the Netduino? Keep in mind that the Digital inputs are only 5V tolerant and the output can only go up to a maximum of 3.3V.
Specs for the barcode scanner said 5V, but meter says 12V a few minutes ago. Hmph. I only need to validate the receive bit tomorrow, I'll whip up a voltage divider until I can get a proper level converter. If it was a simple voltage problem, this should take care of it.
I'll hold off on updating the firmware, last time I did that it didn't work out quite so well.
Having trouble reading 19200, 7E2 data from COM2 and COM3 with Netduino Plus 2.
The STM32 chips can support 8-bit or 9-bit words and 1 or 2 stop bits. But they have a maximum length that they can support of 9 bits...so 7 data bits + even parity bit + 2 stop bits might be pushing you one bit beyond the boundary.
It's also possible that we can tweak the firmware a little bit to enable less common UART settings like 7E2.
Does your barcode scanner enable alternative UART settings? If not, Netduino Plus 1 might be the best fit for your specific application.
Chris
The scanner is an old AccuSort Mini-X, I'm pretty sure I can change the data line to 8N1. If I can't, I have a few Netduino 1s on my desk at home, I'll grab one of those.
I really can't thank y'all enough. Evey time I've had a problem and posted a question, I've had a helpful response far quicker than I expect.
Just to close the loop, using a few RS232 Shifters (SparkFun PRT-00449) and the Netduino Plus 1, I was able to communicate at 19200 7E2. Unfortunately, after all of this, the barcode scanner doesn't support the UCCEAN128 barcode format required for the DHL label we needed to use. After all of that, the project was scrapped.
The good news is that we have identified a few other places on our manufacturing floor where the Netduino platform can be used,
Hi couchounou,
The STM32 UARTs are really designed for 8 data bits. There are ways to make them do other things, but they're a bit outside the normal box.
1200,E,7,1 might be possible. What shield are you using?
Chris
I use a realy simple homemade one to connect to french electrical meter.
The shield is only doing a AM demodulation of the meter signal through an optocoupler.Com1 input D0 is connected to 5V through a 4,7K resistor and bits are generate by the optocoupler by pulling down D0 to ground.