Well, i figured since TOON can be updated from the mothership (like activate subscription) i want to run tcpdump on the TAP0 interface for a while to see whats coming in and out.
Interestingly my first findings confirm that communication is done by using the /bxtproxy. I even wrote a quick/dirty script to test if I could have it accept data. And it seems to work. Now trying to figure out if it can be used to update other stuff as well.
- Code: Select all
#!/bin/bash
#
/usr/bin/curl -v -H "X-BoxTalk-Class: JS-Pavel" -H "X-BoxTalk-UUID: BoxtalkGatewayServlet" -H "Cache-Control: no-cache" -H "Pragma: no-cache" -H "Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2" -H "Connection: keep-alive" -H "Content-type: application/x-www-form-urlencoded" -A "User-Agent: Java/1.8.0_131" -X POST -d '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<action class="invoke" uuid="a0b6a2690-f343-11e1-a21f-0800200c9a66" destuuid="eneco-001-XXXXXX:happ_thermstat" serviceid="urn:hcb-hae-com:serviceId:specific1" commonname="eneco-001-XXXXXX" xmlns:ns5="urn:hcb-hae-com:service:ConfigProvider:1" xmlns:u="urn:hcb-hae-com:service:specific1:1" xmlns:ns4="urn:hcb-hae-com:service:SwitchPower:1" xmlns:ns3="urn:hcb-hae-com:service:Benchmark:1">
<u:UpdateDataSetSubscription>
<updateAction>extend</updateAction>
<dataSet>thermostatInfo thermostatStates</dataSet>
</u:UpdateDataSetSubscription>
</action>' http://192.168.2.180/bxtproxy
echo -e "\n"
The result:
- Code: Select all
* Trying 192.168.2.180...
* Connected to 192.168.2.180 (192.168.2.180) port 80 (#0)
> POST /bxtproxy HTTP/1.1
> Host: 192.168.2.180
> User-Agent: Java/1.8.0_131
> X-BoxTalk-Class: JS-Pavel
> X-BoxTalk-UUID: BoxtalkGatewayServlet
> Cache-Control: no-cache
> Pragma: no-cache
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> Connection: keep-alive
> Content-type: application/x-www-form-urlencoded
> Content-Length: 624
>
* upload completely sent off: 624 out of 624 bytes
< HTTP/1.1 200 OK
< Content-Length: 12
< Date: Tue, 08 Aug 2017 12:28:22 GMT
< Server: lighttpd/1.4.33-devel-17
<
* Connection #0 to host 192.168.2.180 left intact
message sent
The
/HCVv2/sbin/hcb_bxtproxy -v process responds with the following message:
- Code: Select all
[hbxt]\--------------------------------/
[hcb_bxtproxy:../src/hcb_bxtproxy.c@http_post():444]ERROR: Not a valid BoxTalk message, not sent to hcb_comm!
[hcb_bxtproxy:../src/hcb_bxtproxy.c@updateMsgStatuses():908]Messages SENT Ok:23 Retries:0 Error:0 RECV Ok:1 Err:22 QUEUE:0 env:PRD
[hcom]Received HBXT_ACTION_RESPONSE from eneco-001-xxxxxx:happ_thermstat to a0b6a2690-f343-11e1-a21f-0800200c9a66/specific1: n=UpdateDataSetSubscriptionResponse result=ok
[hcb_bxtproxy:../src/hcb_bxtproxy.c@handler():1051]ERROR: Retry this msg 3 times | send anonymous: 0
[hcb_bxtproxy:../src/hcb_bxtproxy.c@enqueuePacket_l():112]enqueing for uuid: eneco-001-XXXXXX:happ_thermstat to url: http://feed.hae.int:31080/toonMobileBackendWeb/display/receiveXml data: <action class="response" uuid="eneco-001-xxxxxx:happ_thermstat" destuuid="a0b6a2690-f343-11e1-a21f-0800200c9a66" serviceid="urn:hcb-hae-com:serviceId:specific1" commonname="eneco-001-XXXXXX">
<u:UpdateDataSetSubscriptionResponse xmlns:u="urn:hcb-hae-com:service:specific1:1"><result>ok</result>
</u:UpdateDataSetSubscriptionResponse>
</action> retries: 3
[hcb_bxtproxy:../src/hcb_bxtproxy.c@transmitMsgQueueHead_l():926]Sending to url: http://feed.hae.int:31080/toonMobileBackendWeb/display/receiveXml
[hcb_bxtproxy:../src/hcb_bxtproxy.c@http_post():304]ERROR: overrideUrl: http://172.18.96.1:31080/toonMobileBackendWeb/display/receiveXml
[hbxt]/--------------------------------\
Think we can safely ignore the first line since it seems to appear frequently without me interfering:
- Code: Select all
"[hcb_bxtproxy:../src/hcb_bxtproxy.c@http_post():444]ERROR: Not a valid BoxTalk message, not sent to hcb_comm!"
Now onto constructing an update message and see what happens.