Author Topic: (solved) Why doesn't my oscilloscope decode the same serial as my FTDI chip?  (Read 1461 times)

0 Members and 1 Guest are viewing this topic.

Offline ImABeginnerTopic starter

  • Contributor
  • Posts: 21
  • Country: us
Hello, I'm working on cracking the ICOM 2730A's communication protocol between the radio and the LCD control panel.
It seems that It sends 1.8V UART over the RJ-12 Jack at a baud rate of 9600, 8-data bits, no parity, 1 stop bit.

Luckily I have an oscilloscope with Serial decoding on it, and so here's an example of what I'm getting over the wire:





That's FE0D0F00004031343736354F4F2020201FFD, which seems correct, as ''4031343736354F4F202020" turns to ASCII As "@14765OO  ", and 147.650 MHz is the currently dialed frequency.

I wanted to do some more analysis, and so I ordered a pair of these: https://www.amazon.com/gp/product/B07WX2DSVB

And I opened this up using putty.  Putty would report this, for example:

Code: [Select]
00807970FF7F9D879193956161BFBFBF8105 (putty), instead of 
FE0D0F00004031343736354F4F2020201FFD (oscilloscope)
FE8D7670FF3FACB3A6A5A02E2E9F9F9F9EF8 (XOR)

I've XORed these together in hopes it would give me more insight about my error, but nothing. The scope signal seems clean enough, and the FTDI chip shares the same data lines, so I'm not really sure what I could be doing wrong.

I've even turned the breakout into a twisted pair in case it may have been a probing issue (an issue at 9600 baud tho? Really?)




I feel like there's something glaringly wrong with my setup.


Does anyone notice anything that sticks out?


« Last Edit: April 17, 2023, 11:37:29 pm by ImABeginner »
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1354
  • Country: si
  • I like to measure things.
Re: Why doesn't my oscilloscope decode the same serial as my FTDI chip?
« Reply #1 on: April 16, 2023, 11:01:49 am »
UART usually idles on logic high. Have you tried inverting the signal?

Also, please upload your images to the forum. Imgur will remove them after some time and then your post won't be helpful to someone that finds your post through a google search, some years from now.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 
The following users thanked this post: mwb1100

Offline pdenisowski

  • Frequent Contributor
  • **
  • Posts: 911
  • Country: us
  • Product Management Engineer, Rohde & Schwarz
    • Test and Measurement Fundamentals Playlist on the R&S YouTube channel
Re: Why doesn't my oscilloscope decode the same serial as my FTDI chip?
« Reply #2 on: April 16, 2023, 04:34:01 pm »
I wanted to do some more analysis

Is there a reason you wouldn't simply keep using the scope?  Depending on the scope, you might be able to trigger on and save each UART frame individually and then analyze them on the scope and/or export them as ASCII.  Don't know about the Keysight scope, but our 3000 series scope (the RTM) can easily do this.

https://youtu.be/f13LbYHCOss?t=203

You might also want to look at one of the cheap (~$15) logic analyzers like this one:  https://www.amazon.com/gp/product/B077LSG5P2 

With the Sigrok / PulseView software you can log and export the decodes as well.

« Last Edit: April 16, 2023, 04:36:07 pm by pdenisowski »
Test and Measurement Fundamentals video series on the Rohde & Schwarz YouTube channel:  https://www.youtube.com/playlist?list=PLKxVoO5jUTlvsVtDcqrVn0ybqBVlLj2z8
 

Offline ImABeginnerTopic starter

  • Contributor
  • Posts: 21
  • Country: us
Re: Why doesn't my oscilloscope decode the same serial as my FTDI chip?
« Reply #3 on: April 16, 2023, 07:47:26 pm »
 Heya. Didn't know I could upload to the forum.. I'll edit my post..

As for the inverter, I have not tried this. I'd rather change the settings of the FTDI chip if I can, but that doesn't appear to be an option. I'll rig up something and report back. Thanks for the advice!
 

Offline ImABeginnerTopic starter

  • Contributor
  • Posts: 21
  • Country: us
Re: Why doesn't my oscilloscope decode the same serial as my FTDI chip?
« Reply #4 on: April 16, 2023, 07:50:07 pm »
Is there a reason you wouldn't simply keep using the scope?  Depending on the scope, you might be able to trigger on and save each UART frame individually and then analyze them on the scope and/or export them as ASCII.  Don't know about the Keysight scope, but our 3000 series scope (the RTM) can easily do this.

You might also want to look at one of the cheap (~$15) logic analyzers like this one:  https://www.amazon.com/gp/product/B077LSG5P2 

With the Sigrok / PulseView software you can log and export the decodes as well.

I probably should have started with a logic analyzer TBH. I've been reading the manual on the scope, and maybe it's an option I don't own... If I can continuously save serial frames, I cannot figure out how...
« Last Edit: April 16, 2023, 08:09:53 pm by ImABeginner »
 

Offline pdenisowski

  • Frequent Contributor
  • **
  • Posts: 911
  • Country: us
  • Product Management Engineer, Rohde & Schwarz
    • Test and Measurement Fundamentals Playlist on the R&S YouTube channel
Re: Why doesn't my oscilloscope decode the same serial as my FTDI chip?
« Reply #5 on: April 17, 2023, 01:52:00 am »
I probably should have started with a logic analyzer TBH.

The worst scope usually does protocol decodes better than the best USB analyzer, at least in my experience (and I've used a lot of both kinds).  That said, for your application you could probably get acceptable results with one of the cheaper (< $20) USB ones. 

I've been reading the manual on the scope, and maybe it's an option I don't own... If I can continuously save serial frames, I cannot figure out how...

Well, I can't really help you with a competitor's product, but at R&S we call that function "segmented memory"  It's an option on our 2000 and 3000 series scopes, and standard on higher series models.

https://www.rohde-schwarz.com/us/products/test-and-measurement/general-analysis/history-segmented-memory-software_63493-504580.html

It's probably one of the most useful but least known options on our scopes :)  I made a video about that function too


« Last Edit: April 17, 2023, 01:54:17 am by pdenisowski »
Test and Measurement Fundamentals video series on the Rohde & Schwarz YouTube channel:  https://www.youtube.com/playlist?list=PLKxVoO5jUTlvsVtDcqrVn0ybqBVlLj2z8
 
The following users thanked this post: ImABeginner

Online Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1699
  • Country: ca
Re: Why doesn't my oscilloscope decode the same serial as my FTDI chip?
« Reply #6 on: April 17, 2023, 03:32:55 am »
Dave is right. Your Amazon adapter is for TTL level serial which is inverted from normal RS232.
 

Offline ImABeginnerTopic starter

  • Contributor
  • Posts: 21
  • Country: us
Re: Why doesn't my oscilloscope decode the same serial as my FTDI chip?
« Reply #7 on: April 17, 2023, 04:17:33 am »
Dave is right. Your Amazon adapter is for TTL level serial which is inverted from normal RS232.

If that was True, wouldn't we expect to see the XOR result be FFFFFF.... and so on?
 

Online Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1699
  • Country: ca
Re: Why doesn't my oscilloscope decode the same serial as my FTDI chip?
« Reply #8 on: April 17, 2023, 04:31:42 am »
No, because you'd have framing errors due to the chip getting confused about the start and stop bits.
 
The following users thanked this post: mwb1100

Offline ImABeginnerTopic starter

  • Contributor
  • Posts: 21
  • Country: us
Re: Why doesn't my oscilloscope decode the same serial as my FTDI chip?
« Reply #9 on: April 17, 2023, 11:37:15 pm »

The worst scope usually does protocol decodes better than the best USB analyzer, at least in my experience (and I've used a lot of both kinds).  That said, for your application you could probably get acceptable results with one of the cheaper (< $20) USB ones. 


This is really good advice. I'm using this right now to decode the signals. The logic analyzer that was linked actually won't do 1.8V logic, which is what was outputted by the radio. That's no issue though, a couple of transistors I had lying around amplified the signals to 5V. NBD there. After all was said and done, I've got some beautiful serial decodes @500KHz sampling. I could probably get away with as low as 100K, so that's something I have to try later.

Now I have some automation to do; I need to take this serial output and catalogue it..  I was hoping to simply be able to read directly off the pulseview drivers, but they're written by a bunch of wizards who are hopelessly beyond my power level.  ^-^
Thus it looks like I'll simply have to post-process the files, which is OK.. I've already got a few lines written for this.
 
The following users thanked this post: pdenisowski

Offline pdenisowski

  • Frequent Contributor
  • **
  • Posts: 911
  • Country: us
  • Product Management Engineer, Rohde & Schwarz
    • Test and Measurement Fundamentals Playlist on the R&S YouTube channel
Re: Why doesn't my oscilloscope decode the same serial as my FTDI chip?
« Reply #10 on: April 18, 2023, 10:04:57 am »
Now I have some automation to do; I need to take this serial output and catalogue it.

Thus it looks like I'll simply have to post-process the files, which is OK.. I've already got a few lines written for this.

If you're not already using it, you might want to look at the Sigrok CLI interface for collecting and processing the UART frames

https://sigrok.org/wiki/Sigrok-cli


Test and Measurement Fundamentals video series on the Rohde & Schwarz YouTube channel:  https://www.youtube.com/playlist?list=PLKxVoO5jUTlvsVtDcqrVn0ybqBVlLj2z8
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf