Serial Console giving scrambled output like "IKL\0xe9\0xd4!/%\0xa39!%" - SOLVED

Support forum for the mightyohm.com Geiger Counter.
http://mightyohm.com/geiger
Post Reply
geigerNoob
Posts: 3
Joined: Sun May 12, 2019 11:04 am

Serial Console giving scrambled output like "IKL\0xe9\0xd4!/%\0xa39!%" - SOLVED

Post by geigerNoob » Sun May 12, 2019 11:17 am

Hey Folks,

I think I need a little push into the right direction. I am missing something.

I have tried with

Code: Select all

screen /dev/ttyUSB0 9600
as well as with cutecom and minicom on linux, but everytime I just get this somewhat scrambled output. (Data bits: 8, Stop bits: 1, HW/SW handshake: off, Parity: None)

Example:

Code: Select all

IKL\0xe9\0xd4!/%\0xa39!%\0xbfq5-15\0x1b\0xbfy!\0x15#\0x175\0x1b\0xbf\0x9d\0xa3\0x9f\0x9f\0xe5\0xeb/\0x17\0x17\0x1f\0x8b\0xa1\0xa1%-1/\0x17
!/%\0xa39!%\0xa115-15\0x1b\0xe5\0xeb\0x00^\0x95u\0xfb\0xfb\0xa7\0xbfy_e\0xa7\0xbf\0x9f\0xa7\0xbf\0x15Y\0x13\0xa1/\0x1b\0xa7\0xbf\0x9f\0xa3\0x9f\0x9f\0xa7\0xbfYgaQ\0xe5\0xeb\0x00^\0x95u\0xfb\0xfb\0xa7\0xbfy_e\0xa7\0xbf\0x9f\0xa7\0xbf\0x15Y\0x13\0xa1/\0x1b\0xa7\0xbf\0x9f\0xa3\0x9f\0x9f\0xa7\0xbfYgaQ\0xe5\0xeb\0x00^\0x95u\0xfb\0xfb\0xa7\0xbfy_e\0xa7\0xbf\0x9f\0xa7\0xbf\0x15Y\0x13\0xa1/\0x1b\0xa7\0xbf\0x9f\0xa3\0x9f\0x9f\0xa7\0xbfYgaQ\0xe5\0xeb\0x00^\0x95u\0xfb\0xeb\0xa7\0xbfy_e\0xa7\0xbf\0x9d\0xa7\0xbf\0x15Y\0x13\0xa1/\0x1b\0xa7\0xbf\0x9f\0xa3\0x9f\0x9f\0xa7\0xbfYgaQ\0xe5\0xeb\0x00
The above output appears when the Geiger-Board is switched on.

It looks to me like there is something wrong with the encoding/decoding, but at the moment I just have this one computer (Ubuntu) available for testing. But since I get regular (around every sec) another "line" of this I guess the connection is setup correctly.

Can anyone give me a hint what I am doing wrong?
Last edited by geigerNoob on Tue May 14, 2019 1:12 am, edited 3 times in total.

geigerNoob
Posts: 3
Joined: Sun May 12, 2019 11:04 am

Re: Serial Console giving scrambled output like "IKL\0xe9\0xd4!/%\0xa39!%"

Post by geigerNoob » Mon May 13, 2019 9:16 am

Soo,... just in case someone else happens to see something similar.

Somehow it seems to be related to the two (!!) different TTL serial2USB adapters I was using. (For one I am quite sure it is a 3.3V adapter, the other I have no documentation [China cheapo crap].)
Anyway, today I tried the same two adapters with macOS (also using screen) and windows (using putty), but again just some weird output.

So, in desperation I took an Arduino Uno R3 and used that as a serial adapter (on macOS and Linux, both with screen using the command from above [portname in /dev/ differs obviously])... and tadda!

Example output received via screen:

Code: Select all

CPS, 1, CPM, 20, uSv/hr, 0.11, SLOW
CPS, 0, CPM, 20, uSv/hr, 0.11, SLOW
CPS, 0, CPM, 20, uSv/hr, 0.11, SLOW
CPS, 1, CPM, 21, uSv/hr, 0.11, SLOW
CPS, 0, CPM, 20, uSv/hr, 0.11, SLOW
CPS, 1, CPM, 21, uSv/hr, 0.11, SLOW
CPS, 0, CPM, 21, uSv/hr, 0.11, SLOW
CPS, 0, CPM, 20, uSv/hr, 0.11, SLOW
Maybe that is helpful to someone else too...

PS: if you want to know how an Arduino can be used as serial adapter...you basically just pull Reset to GND to bypass the muC and then connect to the RX/TX pins. In fact it is actually sufficient to connect TXD (Pin5) on the GeigerBoard the TX (Pin1) on the Arduino. (Seems strange, I was expecting the RX (Pin0) on the Arduino to be the receiver, but in my case I had to use Pin1.

PPS: One more hint... I also tried it with an RaspberryPi B+ using the RX on GPIO15 on the GPIO header. That does also work.

Pinouts can be found here:
https://www.teachmemicro.com/arduino-us ... converter/
https://myscope.net/geigerzaehler/
Last edited by geigerNoob on Mon May 13, 2019 12:57 pm, edited 2 times in total.

User avatar
mightyohm
Site Admin
Posts: 1004
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Serial Console giving scrambled output like "IKL\0xe9\0xd4!/%\0xa39!%"

Post by mightyohm » Mon May 13, 2019 10:57 am

Sorry I couldn’t reply sooner. Glad you got it working. Any idea why your other usb serial adapters aren’t working?

geigerNoob
Posts: 3
Joined: Sun May 12, 2019 11:04 am

Re: Serial Console giving scrambled output like "IKL\0xe9\0xd4!/%\0xa39!%"

Post by geigerNoob » Mon May 13, 2019 12:50 pm

Hi Jeff,

nope, no idea yet. It was in fact pure desperation that I tried it with the Arduino. (These little things saved my ass a few times already.)
Perhaps the driver of the serial2USB adapter I used isn't performing as expected... I don't know.

However, since I am currently working on a Qt software which should run on the RaspberryPi to fetch, log and plot the data I can live with this now. (As mentioned the GPIO serial interface on the Pi seemed to work too...)

Anyway, thanks for your reply anyway. - If I figure out more details I will share them here.

Post Reply