Hex Stings -How are they handled on analog joins?

532 views
Skip to first unread message

Nahshon Williams

unread,
Apr 28, 2010, 9:34:31 AM4/28/10
to CommandFusion
I have been creating an onkyo remote.
The onkyo loves sending Hex strings.
Was not sure why the regex worked for a short instant and then went crazy.
Created a serial join with the same regex and it all became clear; my
volume slider works when the numbers appear to be decimal then jumps to
Zero when the hex notattion ABCD appear.
I have ticked and unticked every hex and none hex option in GD. Any
pointers anyone? Where did Fiasco go?
Nahshon

--
You received this message because you are subscribed to the Google Groups "CommandFusion" group.
To post to this group, send email to comman...@googlegroups.com.
To unsubscribe from this group, send email to commandfusio...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/commandfusion?hl=en.

Jarrod Bell

unread,
Apr 28, 2010, 5:56:25 PM4/28/10
to CommandFusion
Can you please post some examples of the messages that are coming in
and the regex pattern you are using?

You might have to setup a regex that captures the ascii hex value, and
ensure you set hex mode to true on the capture group.
Make sure you are capturing with the 'catch all' character, such as
VOL(.{1,2}) rather than as digits VOL(\d{1,2})

Jarrod

Nahshon Williams

unread,
Apr 28, 2010, 9:44:27 PM4/28/10
to comman...@googlegroups.com
Onkyo Volume Range in Hex is 0 - 64
Volume Down Command: ISCP\x00\x00\x00\x10\x00\x00\x00\x08\x01\x00\x00\x00!1MVLDOWN\x0D
Slider Volume Command: ISCP\x00\x00\x00\x10\x00\x00\x00\x08\x01\x00\x00\x00!1MVL[sliderval]\x0D

Slider Properties
Analog Join: 33
Min 0 Max 64
Decimals (0)
On Press None (when would I need this?)
On Drag: Slider command as above.
On release: (why?)
Slider Value: Hex String


Slider Regex: .*!1MVL(.*).*
Analog Join: 33
Slider Join:33
 
Volume Value Display Regex: .*!1MVL(.*).*     //This is identical
Serial Join: 55
Text Box Join: 55

Returned by the Onkyo when volume decreased:
Raw Capture:
ISCP
!1MVL3D
ISCP
!1MVL3D
ISCP
!1MVL3C
ISCP
!1MVL3C
ISCP
!1MVL3B
ISCP
!1MVL3B
ISCP
!1MVL3A
ISCP
!1MVL3A
ISCP
!1MVL39
ISCP
!1MVL39
ISCP
!1MVL38
ISCP
!1MVL38
ISCP
!1MVL37
ISCP
!1MVL37
ISCP
!1MVL36
ISCP
!1MVL36
ISCP
!1MVL35
ISCP
!1MVL34
ISCP
!1MVL33
ISCP
!1MVL32
ISCP
!1MVL32



As you can see there are alpha numeric hex values in the range.
The slider gets confused and jumps to zero when it encounters this. Then it continues when a "decimal type"  number appears.


Nahshon





On 28/04/2010 22:56, Jarrod Bell wrote:
Can you please post some examples of the messages that are coming in and the regex pattern you are using? You might have to setup a regex that captures the ascii hex value, and ensure you set hex mode to true on the capture group. Make sure you are capturing with the 'catch all' character, such as VOL(.{1,2}) rather than as digits VOL(\d{1,2}) Jarrod On Apr 28, 11:34 pm, Nahshon Williams <spc...@gmail.com> wrote:   
I have been creating an onkyo remote. The onkyo loves sending Hex strings. Was not sure why the regex worked for a short instant and then went crazy. Created a serial join with the same regex and it all became clear; my volume slider works when the numbers appear to be decimal then jumps to Zero when the hex notattion ABCD appear. I have ticked and unticked every hex and none hex option in GD. Any pointers anyone? Where did Fiasco go? Nahshon You received this message because you are subscribed to the Google Groups "CommandFusion" group. To post to this group, send email to comman...@googlegroups.com. To unsubscribe from this group, send email to commandfusio...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/commandfusion?hl=en.     
   

Jarrod Bell

unread,
Apr 28, 2010, 10:08:27 PM4/28/10
to CommandFusion
Wow, Google really screwed up the display of your email in the online
listing. So for anyone attempting to read this online, good luck!!

Anyway, I see you didn't mention in the feedback group if you had it
set to hex mode. You must ensure each capture group is set to hex mode
for it to parse the value correctly.
Also, your regex is wrong. The way you have it setup it will capture
anything after MVL, whilst you only want it to capture 2 values max.
Try this regex: .*!1MVL(\w{1,2})
\w means any word character (letters, digits, underscore)

You only need to define a single feedback item when using the latest
guiDesigner beta, then you can use a capture group more than once.
Eg. Add a group for your slider analog, slider serial, volume level
analog, volume level serial. (not sure why you need two different sets
anyway). Just make sure you set the 'capture index' value to match
which capture group (there is only 1 in your regex in this case, so
all groups would be set to capture index 1).

As for slider commands, you can assign different commands based on
when you press the slider, drag the slider and release the slider. Not
necessary, but there if you need it.

Jarrod

On Apr 29, 11:44 am, Nahshon Williams <spc...@gmail.com> wrote:
> *Onkyo Volume Range in Hex is 0 - 64* Volume Down Command:  ISCP\x00\x00\x00\x10\x00\x00\x00\x08\x01\x00\x00\x00!1MVLDOWN\x0D Slider Volume Command:  ISCP\x00\x00\x00\x10\x00\x00\x00\x08\x01\x00\x00\x00!1MVL[sliderval]\x0D *Slider Properties* Analog Join: 33 Min 0 Max 64 Decimals (0) On Press None (when would I need this?) On Drag: Slider command as above. On release: (why?) Slider Value: Hex String *Slider Regex: .*!1MVL(.*).* * Analog Join: 33 Slider Join:33 *Volume Value Display Regex: .*!1MVL(.*).*     //This is identical* Serial Join: 55 Text Box Join: 55 *Returned by the Onkyo when volume decreased:* Raw Capture: ISCP !1MVL3D ISCP !1MVL3D ISCP !1MVL3C ISCP !1MVL3C ISCP !1MVL3B ISCP !1MVL3B ISCP !1MVL3A ISCP !1MVL3A ISCP !1MVL39 ISCP !1MVL39 ISCP !1MVL38 ISCP !1MVL38 ISCP !1MVL37 ISCP !1MVL37 ISCP !1MVL36 ISCP !1MVL36 ISCP !1MVL35 ISCP !1MVL34 ISCP !1MVL33 ISCP !1MVL32 ISCP !1MVL32 As you can see there are alpha numeric hex values in the range. The slider gets confused and jumps to zero when it encounters this. Then  it continues when a "decimal type"  number appears. Nahshon On 28/04/2010 22:56, Jarrod Bell wrote: > Can you please post some examples of the messages that are coming in > and the regex pattern you are using? > You might have to setup a regex that captures the ascii hex value, and > ensure you set hex mode to true on the capture group. > Make sure you are capturing with the 'catch all' character, such as > VOL(.{1,2}) rather than as digits VOL(\d{1,2}) > Jarrod > On Apr 28, 11:34 pm, Nahshon Williams<spc...@gmail.com>  wrote: >     >> I have been creating an onkyo remote. >> The onkyo loves sending Hex strings. >> Was not sure why the regex worked for a short instant and then went crazy. >> Created a serial join with the same regex and it all became clear; my >> volume slider works when the numbers appear to be decimal then jumps to >> Zero when the hex notattion ABCD appear. >> I have ticked and unticked every hex and none hex option in GD. Any >> pointers anyone? Where did Fiasco go? >> Nahshon >> -- >> You received this message because you are subscribed to the Google Groups "CommandFusion" group. >> To post to this group, send email to comman...@googlegroups.com. >> To unsubscribe from this group, send email to commandfusio...@googlegroups.com. >> For more options, visit this group athttp://groups.google.com/group/commandfusion?hl=en. >>       >    

James S Davis

unread,
May 27, 2010, 9:50:02 AM5/27/10
to CommandFusion

I am struggling to understand RegEx. I have read through the website
and through the posts on here and still I can see what is happening
but i cant seem to be able to transfer it in to my own situations.

\xF0\x00\x00\x70\x00\x00\x7F
\x00\x00\x04\x02\x00\x00\x01\x00\x00\x01\x00\x01\x00\x32\x2F\xF7
\xF0\x00\x00\x70\x00\x00\x7F
\x00\x00\x04\x02\x00\x00\x01\x00\x00\x01\x00\x01\x00\x00\x7D\xF7

This is the response that is generated by Russound to indicate the
maximum and minimum volume levels \x00 - \x32 (0-50).
the second to last byte is the checksum and the \xF7 is the EOM

If I want to enter the third from last byte to an analogue join I was
expecting I would need something along the lines of

^\xF0\x00\x00\x70\x00\x00\x7F
\x00\x00\x04\x02\x00\x00\x01\x00\x00\x01\x00\x01\x00(\x2)?.\\xF7

Where am I going wrong?

Jarrod Bell

unread,
May 27, 2010, 11:37:28 AM5/27/10
to CommandFusion
Assuming all those bytes come in one line (Google Group just split
it?) the following regex will work:

\xF0\x00\x00\x70\x00\x00\x7F

\x00\x00\x04\x02\x00\x00\x01\x00\x00\x01\x00\x01\x00(.).\xF7

Then assign a single capture group, setting it to:
capture index = 1
datatype = analog
target = analog
join = join of your gauge or slider
min = 0
max = 50
hex mode = true

Jarrod

On May 27, 11:50 pm, James S Davis <jamessda...@dystopiandream.co.uk>
wrote:

James S Davis

unread,
May 27, 2010, 2:40:59 PM5/27/10
to CommandFusion
Thank you that make it a lot easier to understand I notice in that
example you replace the checksum with a "." or is it anything after
the required byte.

The \xF7 is just to tell the RegEx that anything after that is
something else, you would then specify that in the EOM section of the
system properties?

If I was expecting a response that contained several different pieces
of information each stored in a different byte would I just make
several different RegEx one set to capture each byte ( as Below)

\xF0\x00\x00\x70\x00\x00\x7F

\x00\x00\x04\x02\x00\x05\x07\x00\x00\x01\x00\x0C\x00\x00\x00\x00\x0A
\x0A\x00\x0A\x00\x00\x00\x00\x00\x3C\xF7


\xF0\x00\x00\x70\x00\x00\x7F

\x00\x00\x04\x02\x00\x05\x07\x00\x00\x01\x00\x0C\x00\x(Zone State)
\x(Source)\x(Volume)\x(Bass)\x(Treble)\x(Loudness)\x(Balance)\x(System
State)\x(Shared Source)\x(Party Mode)\x(Do Not Disturb)\x00\x3C\xF7

Zone State


\xF0\x00\x00\x70\x00\x00\x7F
\x00\x00\x04\x02\x00\x00\x01\x00\x00\x01\x00\x01\x00(.).\xF7

capture index = 1
datatype = Digital
target = Digital
join = join of on off button
off valu = 00
on value = 01

Source


\xF0\x00\x00\x70\x00\x00\x7F

\x00\x00\x04\x02\x00\x05\x07\x00\x00\x01\x00\x0C\x00\x00(\x00)?(\x01)?
(\x02)?(\x03)?(\x04)?(\x05)?.\xF7

capture index = 1
datatype = Digital
target = Digital
join = join of source 1 button
off valu =
on value = \x00

capture index = 2
datatype = Digital
target = Digital
join = join of source 2 button
off valu =
on value = \x01

capture index = 3
datatype = Digital
target = Digital
join = join of source 3 button
off valu =
on value = \x02

capture index = 4
datatype = Digital
target = Digital
join = join of source 4 button
off valu =
on value = \x03

capture index = 5
datatype = Digital
target = Digital
join = join of source 5 button
off valu =
on value = \x04

capture index = 6
datatype = Digital
target = Digital
join = join of source 6 button
off valu =
on value = \x05

Volume


\xF0\x00\x00\x70\x00\x00\x7F

\x00\x00\x04\x02\x00\x05\x07\x00\x00\x01\x00\x0C\x00\x00\x00(.).\xF7

capture index = 1
datatype = analog
target = analog
join = join of your gauge or slider
min = 0
max = 50
hex mode = true

I see no need for any of the other information for what ? have in mind

Thank you

Jarrod Bell

unread,
May 28, 2010, 6:19:01 AM5/28/10
to CommandFusion
The dot just means "match any character". We replaced the checksum to
say basically that we dont care what the checksum is, just match the
other data.

When you set the EOM string for a system, all incoming messages are
split by that EOM string, and then each message is parsed into the
feedback engine where its matched against the regex's.

What you have looks OK at a quick glance, is it working?

Jarrod

On May 28, 4:40 am, James S Davis <jamessda...@dystopiandream.co.uk>
wrote:

James S Davis

unread,
May 28, 2010, 6:38:55 AM5/28/10
to CommandFusion
Nope

I tried the one you gave me as an example and the ones I worked out
for myself but no joy on any of them.

I am basing this on what I am expecting to see. Can you suggest a
simple way to display what is being received, so I can check to see if
it matches what I'm expecting?

Jarrod Bell

unread,
May 28, 2010, 11:35:28 AM5/28/10
to CommandFusion
Use wireshark to sniff the packets. Thats the best way to ensure you
are receiving what you expect.
It's simply impossible for us to know protocols of all devices, so
support from us is limited to the data format you tell us you are
receiving. And the regex I gave you will work as far as you have
described.

Jarrod

On May 28, 8:38 pm, James S Davis <jamessda...@dystopiandream.co.uk>
wrote:

Fiasco

unread,
May 28, 2010, 11:43:28 AM5/28/10
to CommandFusion
Jarod

Would it be possible to have GUI Designer make connections to the
various systems so commands and feedback can be tested without
uploading to iViewer?

> Where did Fiasco go?

Sorry Nahshon, I have been putting in many many hours with the
business. I think over the last two weeks I averaged 4 hours of
sleep per day.

James S Davis

unread,
May 28, 2010, 11:45:11 AM5/28/10
to CommandFusion
I quite understand that sadly no common protocols (dreams).

Thank you anyway i have downloaded Wireshark and I shall see what it
is being sent out.

Nahshon Williams

unread,
May 28, 2010, 12:34:22 PM5/28/10
to comman...@googlegroups.com
Hello all,

Welcome back Fiasco!!

Objective:
To seamlessly change volume on onkyo with slider (similar to apple
remote app)

Resources:
Please find attached a gui file for my network controlled Onkyo TXNR5007.
Here is an example of what I mean
http://www.vandermehrn.com/lc/onkyo/volumefeedback/

This is a file with ALL the feedback from the onkyo as volume is
changed. (I use notepad++ as it can show non printing characters)
http://www.vandermehrn.com/lc/onkyo/hex/Onkyo_Volume_Full_Range

Here is the gui file just in case it does not attach on the group:
http://www.vandermehrn.com/lc/onkyo/volumefeedback/onkyo.rar


Notes:
Feedback is workin with analog and digital joins
*My problem is with getting the guage to work. I have tried every
permutation of Hex String and Non Hex.*
Please note I have also changed the regex in the image above to
.*!1MVL.* (currently on the GUI)


I have also displayed the feedback from the onkyo on the remote itself.
For now I only have an interface for FM/Tuner. The other inputs are to
highlight that each button is set to active when the onkyo changes inputs.

I wanted to post on my onkyo thread but as we are talking about hex
strings I decided to try here in case people search from the google group


Any hints appreciated

Nahshon

onkyo.rar

Jarrod Bell

unread,
May 28, 2010, 10:34:47 PM5/28/10
to CommandFusion
Change the feedback regex to:
.*!1MVL(..).*

Make sure the capture group is in hex mode.

I tested that by sending the same data as shown in your data files and
it worked perfect.

Jarrod

On May 29, 2:34 am, Nahshon Williams <spc...@gmail.com> wrote:
> Hello all,
>
> Welcome back Fiasco!!
>
> Objective:
> To seamlessly change volume on onkyo with slider (similar to apple
> remote app)
>
> Resources:
> Please find attached a gui file for my network controlled Onkyo TXNR5007.
> Here is an example of what I meanhttp://www.vandermehrn.com/lc/onkyo/volumefeedback/
>
> This is a file with ALL the feedback from the onkyo as volume is
> changed. (I use notepad++ as it can show non printing characters)http://www.vandermehrn.com/lc/onkyo/hex/Onkyo_Volume_Full_Range
>
> Here is the gui file just in case it does not attach on the group:http://www.vandermehrn.com/lc/onkyo/volumefeedback/onkyo.rar
>
> Notes:
> Feedback is workin with analog and digital joins
> *My problem is with getting the guage to work. I have tried every
> permutation of Hex String and Non Hex.*
> Please note I have also changed the regex in the image above to
> .*!1MVL.* (currently on the GUI)
>
> I have also displayed the feedback from the onkyo on the remote itself.
> For now I only have an interface for FM/Tuner. The other inputs are to
> highlight that each button is set to active when the onkyo changes inputs.
>
> I wanted to post on my onkyo thread but as we are talking about hex
> strings I decided to try here in case people search from the google group
>
> Any hints appreciated
>
> Nahshon
>
> On 28/05/2010 16:43, Fiasco wrote:
>
>
>
> > Jarod
>
> > Would it be possible to have GUI Designer make connections to the
> > various systems so commands and feedback can be tested without
> > uploading to iViewer?
>
> >> Where did Fiasco go?
>
> > Sorry Nahshon, I have been putting in many many hours with the
> > business.   I think over the last two weeks I averaged 4 hours of
> > sleep per day.
>
>
>
>  onkyo.rar
> 178KViewDownload

Nahshon Williams

unread,
May 29, 2010, 6:32:43 AM5/29/10
to comman...@googlegroups.com
Thanks for this Jarrod.
I have used the regex in your post below.
Actually I also get feedback from the onkyo using the following:

.*!1MVL(.*)\x1A
.*!1MVL(.*)\x1A.*

\x1A is the SUB character the onkyo terminates feedback with (as shown
on the screen shot in my previous post)
I am using yours all the same with HEX=True on the capture group.
There is no jumping on the guage when hex values are received now :-)

For anyone with an Onkyo that goes from 0-64 Hex please note that I was
only able to get the guage/slider to scale properly when I set the Min=0
and Max=100 in the regex.
It seems that selecting Hex means captured values will be converted to
Decimal as (64 Hex = 100 decimal)
Setting Min=0 and Max=64 in the regex meant that my slider/guage was
reaching maximum when I got to 40 Hex.

The network response from the onkyo is very fast.

Nahshon

Reply all
Reply to author
Forward
0 new messages