Omega2+ serial not working as expected
-
@JP-Norair said in Omega2+ serial not working as expected:
So i'm not the only one, and i'm not crazy.. that's good at least.
Looking at all the diagnostics you've run I'm guessing the python library must be making some calls that run afoul of the bug in the UART driver. in my case I can use a USB to serial adapter with my device, but broken serial drivers seriously impairs what I had planned to use these for. That's frustrating.
-
@James-Penick Do you mind if I contact you outside the Onion forums? You can send me a Linked-In page and we can work it out from there, if it makes sense. I want to ask you a few things that are outside the scope of this forum.
-
msg sent
continuing the saga for the edification of anyone else interested. I tried a USB to serial adaptor with the FTDI FT232RL chipset. It's a sabrent so I guess it's not a counterfeit?
The cable worked fine from my laptop to the device I was querying. Attaching it to my onion showed things working better than the onboard UART, but I still saw corrupted data.
I realized that omega had python2 installed, so I installed python3, and then things worked fine. No idea why, as that doesn't make sense. But whatever, it works so i'll call it good enough.
I'm pretty frustrated that the omega2+ onboard UART doesn't work right, but I don't know how to debug that any further
-
@James-Penick I built my own board to plug in my Omega2, it has some other stuff on it I needed as well but it allowed me the change the USB-Serial chip. Maybe this will work for you.
-
That's a good idea, I might play with doing that.. Or i can look into doing one that ties into some GPIO pins.
Of course, it'd be nice if we could all just use one of the two rs232 interfaces already on the darn device.
-
@James-Penick Please let us know what is your "wireless water tank measurement system" device.
-
@György-Farkas sure, it's this: https://www.rainharvest.com/aquatel-d110-s-wireless-tank-level-monitor-with-rs-232-interface.asp
receivers are placed on each tank to measure the water level with ultrasonic pulses. The level data is sent back to a little receiver station that has an RS232 port on it. My goal is to take that data and ship it off to something like amazon IOT so I can check the water level from my phone without having to go look at the display on the device.
-
@James-Penick Thank you.
What type of USB to serial adapter are you using to connect the receiver to your laptop?
-
@György-Farkas I bought the Sabrent CB-FTDI, and use it to connect both the laptop to the receiver and to connect the omega2+ to the receiver in lieu of the onboard serial.
-
@James-Penick The receiver has a real RS232 port and you are using a USB to RS232 adapter/cable.
USB 2.0 to Serial (9-Pin) DB-9 RS-232 Adapter Cable 6ft Cable
You connected that cable to the USB Host port of your Omega2+ - so you are using the ttyUSB0 serial "port" instead of the ttyS1 port.
Please try to correct the Python code.
Sorry, I didn't read one of your previous posts.If you want to use Omega2's ttyS1 serial port then connect it to the receiver via an RS232 to 3.3V TTL converter.
For example:
MAX3232 RS232 Serial Port to TTL Converter Module DB9 Connector with Cables
-
Oh, cool! I'll give that a shot and report back. Thank you!
-
@György-Farkas that did the trick, it works via the rs232 TTL converter. I never even considered the voltage before. Thank you!
-
@James-Penick So "Omega2+ serial working as expected"
Well done. Congrats!