Will this make G.729 work on WM6? - General Topics

Hi i currently have the WM6.1 in built client working with my SIP server the G711u codec works fine over HSPA but im curious to know if given G.729 would calls over GPRS be possible? Which bring me onto the main point If added to the registry and the codec placed in the approperate directory would this enable G.729 as a codec for the WM6.1 VoIP client:
; Configure ACM_G729 FormatTag
; Note that G729 frame_duration = 20ms in this example [HKEY_LOCAL_MACHINE\Comm\RTC\ACM\G729]
"PayloadType" = dword:12
"FrameDuration" = dword:A
"CodecRank" = dword:1
"Driver" = "g729.acm"
[HKEY_LOCAL_MACHINE\Comm\RTC\ACM\G729\WaveFormat]
"FormatTag" = dword:44
"Channels" = dword:1
"SamplesPerSec" = dword:1F40
"AvgBytesPerSec" = dword:3E8
"BlockAlign" = dword:A
"BitsPerSample" = dword:0
"bSize" = dword:2
; Configure ACM_G729 Prefix
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\CODEC_G729]
"Prefix"="ACM"
"Dll"="g729.acm"
; Cofigure Codec Preference
and for path:
[HKEY_LOCAL_MACHINE\Comm\RTC\Codec]
"PreferredAudioCodec"=dword:12 ; 0=pcmu, 12=729
"UsePreferredCodec"=dword:1
came from: http://msdn.microsoft.com/en-us/library/aa924754.aspx
Thanks
Dphi

dphiance said:
Hi i currently have the WM6.1 in built client working with my SIP server the G711u codec works fine over HSPA but im curious to know if given G.729 would calls over GPRS be possible? Which bring me onto the main point If added to the registry and the codec placed in the approperate directory would this enable G.729 as a codec for the WM6.1 VoIP client:
; Configure ACM_G729 FormatTag
; Note that G729 frame_duration = 20ms in this example [HKEY_LOCAL_MACHINE\Comm\RTC\ACM\G729]
"PayloadType" = dword:12
"FrameDuration" = dword:A
"CodecRank" = dword:1
"Driver" = "g729.acm"
[HKEY_LOCAL_MACHINE\Comm\RTC\ACM\G729\WaveFormat]
"FormatTag" = dword:44
"Channels" = dword:1
"SamplesPerSec" = dword:1F40
"AvgBytesPerSec" = dword:3E8
"BlockAlign" = dword:A
"BitsPerSample" = dword:0
"bSize" = dword:2
; Configure ACM_G729 Prefix
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\CODEC_G729]
"Prefix"="ACM"
"Dll"="g729.acm"
; Cofigure Codec Preference
and for path:
[HKEY_LOCAL_MACHINE\Comm\RTC\Codec]
"PreferredAudioCodec"=dword:12 ; 0=pcmu, 12=729
"UsePreferredCodec"=dword:1
came from: http://msdn.microsoft.com/en-us/library/aa924754.aspx
Thanks
Dphi
Click to expand...
Click to collapse
Maybe, if you have a g729.acm build for ARM/PocketPC. Do you?

Related

HTC Serial Numbers decoded

Everybody knows those nice serials you can use to download ROMs from HTC. After some research about the serial numbers, here is how they are built :
2008 Serial Numbers :
Code:
HTUWWYYZZZZZ
HT = Vendor HTC
U = Year (8 = 2008)
WW = Week in a year
YY = Part Code
ZZZZZ : Identification Number (decimal)
2009 Serial Numbers :
Code:
HTYMDAABBBBB
HT = Vendor HTC
Y = Year (9 = 2009)
M = Month (hex 1...C = 1 - 12 months)
D = Day (hex 1...9A..Z = 1 - 31 days)
YY = Part Code
ZZZZZ : Identification Number (decimal)
Part Codes :
Code:
G3 = Sedna
G6 = Elfin
GH = Elf
K0 = Raphael
KW = Raphael C
K7 = Victor
EZ = Breeze
GN = Diamond
KT = Diamond MDA
BE = Prophet
EW = Prophet/PM300
F2 = Hermes
D6 = Blue Angel
GZ = Dream
FM = Athena
6G = Kaiser
G8 = Kaiser/Tytn II
DB = Typhoon
F2 = Melbourne/Census
BD = Charmer
N1 = Snap
L1 = Topaz
NW = Leo
LL = Rhodium
KD = Blackstone
GE = Polaris
KH = Jade
FS = Herald
FK = Trinity
EE = Wizard
GC = Nike
KN = Quartz
KF = Sapphire
HL = Supersonic
If you find further part codes not listed above, feel free to add them
Cya,
Viper BJK
My Touch Pro's part is "KW" (RAPH101)
Thanks .... is it a branded one ?
Nope, HTC Touch Pro T7274, with American 3G.
Update : Supersonic added
PL is the Code for Desire
HT041 means first april 2010?
Very interesting...
Don't mean to bring that back up but were having some trouble decoding the numbers on our Thunderbolts.. 1-9 a-z = 35 days
... were trying to make a database of the dates phones were made for bricking... if you have any insight on this please help.
Interesting
Very interesting indeed
viperbjk said:
Everybody knows those nice serials you can use to download ROMs from HTC. After some research about the serial numbers, here is how they are built :
2008 Serial Numbers :
Code:
HTUWWYYZZZZZ
HT = Vendor HTC
U = Year (8 = 2008)
WW = Week in a year
YY = Part Code
ZZZZZ : Identification Number (decimal)
2009 Serial Numbers :
Code:
HTYMDAABBBBB
HT = Vendor HTC
Y = Year (9 = 2009)
M = Month (hex 1...C = 1 - 12 months)
D = Day (hex 1...9A..Z = 1 - 31 days)
YY = Part Code
ZZZZZ : Identification Number (decimal)
Part Codes :
Code:
G3 = Sedna
G6 = Elfin
GH = Elf
K0 = Raphael
KW = Raphael C
K7 = Victor
EZ = Breeze
GN = Diamond
KT = Diamond MDA
BE = Prophet
EW = Prophet/PM300
F2 = Hermes
D6 = Blue Angel
GZ = Dream
FM = Athena
6G = Kaiser
G8 = Kaiser/Tytn II
DB = Typhoon
F2 = Melbourne/Census
BD = Charmer
N1 = Snap
L1 = Topaz
NW = Leo
LL = Rhodium
KD = Blackstone
GE = Polaris
KH = Jade
FS = Herald
FK = Trinity
EE = Wizard
GC = Nike
KN = Quartz
KF = Sapphire
HL = Supersonic
If you find further part codes not listed above, feel free to add them
Cya,
Viper BJK
Click to expand...
Click to collapse
for ZZZZZ
it it was found that actually it is "CC-ZZZ"
CC is for country code
i only know that
46 = Germany
37 = Dubai
Please add more country codes...
The first two characters actually mean the place of manufacture.
SZ = Shenzhen, China
SH = Shanghai, China
HT = Hsinchu, Taiwan
CH = Wuhan, China
A pic of a HTC Desire made in Shanghai can be found here:
http://www.rei3.com/archives/8416.html
The Shooter's (CDMA Evo 3D's) part code is HX
That's cool info. Thanks for the insight guys.
Sent from my Transformer TF101 using Tapatalk
good info))) would have to look over and add it)))
MB139PK41124???
my Serial starts with FA does anyone know where this might be? while one i bought for my partner is HT

WindowsLiveMessenger.apk - MSN

Hi all.
I search for an MSN Messenger full HTTP (for WAP connexion) on my smartphone.
No thanks for HiMSN or other, I don't and never enter my account on his website.
I find an WindowsLiveMessenger.apk, and when I docompact it I found, it's probably work only on Bytel network.
I'm on SFR.
See the file : /WindowsLiveMessenger.apk/res/raw/app_param.txt
Code:
#Application Parameter URL
#---URL---
GATE DEMO http://85.31.202.156:80/appparam/sanity_all
#protocol = http
#URL = 85.31.202.156
#port = 80
#path = /appparam/sanity_all
#Emulo /wifi
#protocol = http
#URL = 10.20.20.7
#port = 31000
#path = /pub/nocir
#Tel
#protocol = http
#URL = 85.31.202.155
#port = 80
#path = /pub
#PPE bytel
#protocol = http
#URL = sb01.qnitabxn.mpit.ppe.miyowa.net
#port = 80
#path = /
#Special QA
#protocol = http
#URL = 85.31.202.155
#port = 80
#path = /qandroid
#Prod Bytel
protocol = http
URL = sb01.qnitabxn.mpit.prd.miyowa.net
port = 80
path = /
# 3UK chez eux phase 2
#protocol = http
#URL = mobile.three.co.uk
#port = 80
#path = /966_accs/android/cir/
#Prod 3 phase 1
#protocol = http
#URL = sb01.iwgttjcx.mpit.prd.miyowa.net
#port = 80
#path = /
#PPE 3 phase 1
#protocol = http
#URL = sb01.iwgttjcx.mpit.ppe.miyowa.net
#port = 80
#path = /
#PPE NRJ
#protocol = http
#URL = msnnrjppe.miyowa.net
#port = 80
#path = /it5/pub
#Prod NRJ
#protocol = http
#URL = msnnrjpr.miyowa.net
#port = 80
#path = /pub/
#TEST CHAMPI
#protocol = http
#URL = sb01.qpzgxtbx.mpit.ppe.miyowa.net
#port = 80
#path = /
#TEST SMS CIR 3UK
#protocol = http
#URL = 85.31.202.155
#port = 80
#path = /pub
#Application Parameter parameters
#---PARAMETERS---
#PhoneID = brand_model
#PhoneID = Samsung_I7500
#PhoneID = Bravo
# Phone ID = Version OS, Nom du mobile (I7500)
ApplicationID = IT5_Miyowa_3.01
Version = 0.2
Language = FRA
DeviceID = Android
#Application Parameter header HTML
#---HEADERS---
OsVersion = 1.5
Content-Type = application/x-www-form-urlencoded
connection = close
### Emulateur ###
#MSISDN_KEY = msisdn,X-Up-Calling-Line-Id
### Bytel ###
#MSISDN_KEY = msisdn,X-Msid
### 3UK not use in phase 2 ###
#MSISDN_KEY = X-NMCA-IDENTITY
#TEST CHAMPI
#MSISDN_KEY = X_MIYO_IMSI
#MSISDN_VALUE = QOS7777
#MSISDN_VALUE = 00447853082623
#MSISDN_VALUE = zte
Roaming-Test = true
#Roaming-Test = false
test-is-using-3G = true
#test-is-using-3G = false
#show-stay-alerted = true
show-stay-alerted = false
RessourcesLanguage = FR
typeofoffer = A
X-Nokia-BEARER = UMTS
roamingoutflag = 0
#Informations
MaxPDU = 16384
FileEncondingType = 0
ApplicationVersion = 0.2.33.0
IS_BIG_SCREEN = true
#IS_BIG_SCREEN = false
#SHOW_POPUP_FIRST_SIGN_IN = true
SHOW_POPUP_FIRST_SIGN_IN = false
#SHOW_TABS_IN_LANDSCAPE_MODE = true
SHOW_TABS_IN_LANDSCAPE_MODE = false
#TestMCCMNC = true
TestMCCMNC = false
#3UK MCC - MNC
MCCMNC = 23420,23410,23433,27205,24002,24004,23806,22299,23210,50506,45403,23594
Do you meen hack this APK to connect to MSN with any phone operators ?
Or do you know and MSN client full HTTP, and I don't must to register my account on a stupid website ?
Thanks.
Why on earth, would you rather use the web version than the HiMSN?
As far as I have experienced, HIMsn/MSNTalk works just fine.
Is there some reason, why you would not like to use an app from the market?
May you share wth us..i mean im searchin a WindowsLiveMessenger .apk non-javabased version..n cud not find yet...cuz dunno why java based one doesnt work ..cannot connect da server..i need a regular apk as windows live...

[Q] Error getting cellid

I am trying to get the cellid from a windows phone 7 program and the code I am using gives me an error when I call the RIL_Initialize function. The code it the standard c# that I have found in several places that everyone seems to be using.
When I try to run this code, I get an exception on the RIL_Initialize.
{"Attempt to access the method failed: CellInfo.RIL.RIL_Initialize(System.UInt32, CellInfo.RIL+RILRESULTCALLBACK, CellInfo.RIL+RILNOTIFYCALLBACK, System.UInt32, System.UInt32, System.IntPtr&)"}
Code:
public static string GetCellTowerInfo()
{
// initialise handles
IntPtr hRil = IntPtr.Zero;
IntPtr hRes = IntPtr.Zero;
// initialise result
celltowerinfo = "";
// initialise RIL
hRes = RIL_Initialize(1, // RIL port 1
new RILRESULTCALLBACK(rilResultCallback), // function to call with result
null, // function to call with notify
0, // classes of notification to enable
0, // RIL parameters
out hRil); // RIL handle returned
....etc.

SMS AT commands doesnt work on my android device C++ | Bluetooth | winsock

Hi there!
I'm creating windows application in C++, which connect's PC with mobile via bluetooth and winsock. Allow's you to call and send messages from mobile via computer.
I'm using AT command's to tell mobile what i want to do. Pair with mobile device and force a call with At command
ATD+420******;
works perfect, but all commands for handling SMS like
AT+CMGL, AT+CMGF, AT+CMGS etc.
return's ERROR.
Here is code which connects PC with mobile via bluetooth and socket:
SOCKADDR_BTH RemoteEndPoint;
RemoteEndPoint.port = 0;
RemoteEndPoint.addressFamily = AF_BTH;
RemoteEndPoint.btAddr = m_foundDevices[m_deviceIndex].Address.ullLong;
RemoteEndPoint.serviceClassId = HandsfreeServiceClass_UUID;
int BTHAddrLength = sizeof(RemoteEndPoint);
// Create the socket.
if ((m_localSocket = socket(AF_BTH, SOCK_STREAM, BTHPROTO_RFCOMM)) == INVALID_SOCKET)
{
// handle error.
}
// Connect the socket.
if ((iResult = connect(m_localSocket, (SOCKADDR *)&RemoteEndPoint, sizeof(RemoteEndPoint))) == INVALID_SOCKET)
{
// handle error.
}
Notice line
Hide Copy Code
RemoteEndPoint.serviceClassId = HandsfreeServiceClass_UUID
I think the problem is here, becouse u cant send sms from Handsfree, but when i use another UUID, it doesnt even pair with mobile.
=== Here is just for info, how am i sending and receiving data from mobile ===
char recvbuf[DEFAULT_BUFLEN] = "";
const char *sendbuf = "AT+CMGL\r";
int len = (int)strlen(sendbuf);
if ((iResult = send(m_localSocket, sendbuf, len, MSG_OOB)) == SOCKET_ERROR)
{
// handle error. return ~0
}
if ((iResult = recv(m_localSocket, recvbuf, recvbuflen, 0)) == SOCKET_ERROR)
{
// handle error. return ~0
}
// Here recvbuf == "\r\nERROR\r\n"
Thank you for any advices! If you have any question's about problem, i'll kindly explain.
Regards,
Ferina.

Software Development Developing an OBD2/Canbus data logger

So I wanted to implement something like TeslaMate for my UIS7862. The idea being to be able to visualize trips, and various vehicle stats from Grafana (and maybe a live location tracker).
My original plan was to use TorquePro to log vehicle stats + GPS location, and then to send those logs to a listening webserver for storage in Prometheus and display via Grafana. I found an Automate script to hook this into HomeAssistant here: here. However, I wanted a few additional items:
I don't have a SIM card in my radio and do not normally have it connected to my phone as a hotspot, so internet connection is intermittent and I didn't want to lose data
I wanted to be able to upload to different IP addresses depending on whether I'm connected to the home network (i.e. at home) or otspot (i.e I'm driving)
I wanted to be able to store stats from the media canbus (like fuel level) that don't seem to be available on OBD-II (at least I haven't found them for my GTI)
I wanted to learn Kotlin and write a 'real' Android app
I was successful in writing an app that would send all unsent Torque data to my home server once it connects via wifi (basically reproducing Rob's Automate script), but getting the canbus data out of the radio required more work.
I decompiled 190000000_com.syu.canbus.apk and set about learning how it worked, and trying to connect my own app.
What I found so far:
Unlike the MKC/D units which appear to communicate with the canbus module via a serial port, the FYT radios seem to use I2C
The com.syu.ms.apk is responsible for the hardware communication
the com.syu.canbus.apk connects to the com.syu.ms.toolkit Intent to access hardware data.
This Service provides a getRemoteModule() procedure which seems to provide 4 different interfaces:
0: the 'Main' interface
4: the Sound interface
7: the Canbus interface
14: the 'CanUp' interface (no idea what this is)
each interface (IRemoteModule) provides 4 commands: cmd, get, register, unregister
The 'register' command registers a callback to a specific ID. That callback will be called when the value at the ID changes.
For instance, on my GTI, ID '6' of the canbus module is the fuel-level. I can register a callback at ID=6, and that callback will be called whenever the value changes
I haven't spent time to look at the other modules, nor what the 'get' or 'cmd' functions do
With the above, I now have a rudimentay application that will fetch the Fuel level from the radio (via the Canbox). My plan is to incorporate this with the OBDII capture to create a composte data-set to upload to my prometheus database. Interestingly, the com.syu.ms.toolbox only responds back to me if I use the 'com.syu.ipc.[IModuleCallback|IRemoteModule|IRemoteToolkit' descriptor.
I will make everything above available on GitHub once I've cleaned it up a bit. It should be possible to extract any canbus data the radio has (along with other internal state depending on what the other modules expose). However, what I've learned is that every CanBox has a different interface and presents diferent data, so the effort to make a generic interface would be very high and beyond the scope of what I plan to do. There are about 2500 unique CanBoxes listed in FinalCanbus. I see about 600 unique classes implementing these modules, each of which implements a different set of registerable IDs.
I plan to add an interface to register any ID if you know what you are looking for to my app. I think @surfer63 could do the same to FytHwOneKey if they were so inclined, but without a table of which features are available it would only likely benefit programmers.
I'll update this post with a GitHub link once available, but I thought there might be some interest in the canbus analysis stuff.
Here is the GitHub repository for the Canbus access library: https://github.com/AxesOfEvil/FYTCanbusMonitor
The CanBox ID is specified by ID=1000.
The low 16 bits appear to specify the canbox type, and the upper 16bits seem to represent the car make/model. This mapping happens in syu.ms.module.canbus.HandlerCanbus with the name mapping in module.canbus.FinalCanbus
Here is an example of the IDs for (some) Reise RZS CanBox to give an idea of what type of data is available:
Code:
U_CUR_OIL_EXPEND 0
U_MISC_BEGIN 0
U_LOW_OIL_WARN 1
U_LOW_BATTERY_WARN 2
U_LIFE_BELT_WARN 3
U_CLEAN_FLUIT_WARN 4
U_HANDLE_BRAKE_WARN 5
U_RESIDUAL_OIL 6
U_BATTERY_VOLTAGE 7
U_DRIVE_MILE 8
U_PARK 9
U_RADAR_MUTE 10
U_CUR_SPEED 11
U_ENGINE_SPEED 12
U_OUT_TEMP 13
U_AIR_BEGIN 14
U_AIR_POWER 14
U_MISC_END 14
U_AIR_BIG_WIND_LIGHT 15
U_AIR_LITTLE_WIND_LIGHT 16
U_AIR_AC 17
U_AIR_MAX 18
U_AIR_CYCLE 19
U_AIR_DUAL 20
U_AIR_REAR 21
U_AIR_BLOW_UP 22
U_AIR_BLOW_BODY 23
U_AIR_SHOW 24
U_AIR_BLOW_FOOT 25
U_AIR_WIND_LEVEL 26
U_AIR_TEMP_LEFT 27
U_AIR_TEMP_RIGHT 28
U_AIR_AQS 29
U_AIR_SEAT_HEAT_LEFT 30
U_AIR_REAR_LOCK 31
U_AIR_AC_MAX 32
U_AIR_SEAT_HEAT_RIGHT 33
U_AIR_TEMP_OUT 34
U_AIR_AUTO 35
U_AIR_END 36
U_DOOR_BEGIN 37
U_DOOR_ENGINE 37
U_DOOR_FL 38
U_DOOR_FR 39
U_DOOR_RL 40
U_DOOR_RR 41
U_DOOR_BACK 42
U_DOOR_END 43
U_AIR_FRONT 44
U_AIR_BLOW_MODE 45
U_CNT_MAX 46
AxesofEvil said:
I plan to add an interface to register any ID if you know what you are looking for to my app. I think @surfer63 could do the same to FytHwOneKey if they were so inclined, but without a table of which features are available it would only likely benefit programmers.
Click to expand...
Click to collapse
Nice work you are doing here.
But I do not know what you mean with above statement.
For further reading: lbdroid did some reverse engineering in 2006.
You might take a look at some of his repos: https://github.com/lbdroid/MCUd
In that github/readme are 5 other repos. They are outdated, but might still give you some clues.
surfer63 said:
Nice work you are doing here.
But I do not know what you mean with above statement.
For further reading: lbdroid did some reverse engineering in 2006.
You might take a look at some of his repos: https://github.com/lbdroid/MCUd
In that github/readme are 5 other repos. They are outdated, but might still give you some clues.
Click to expand...
Click to collapse
Sorry, maybe that was inappropriate. I guess I was thinking about ways to give users access to the canbox data since Tasker doesn't seem able to hook into services this way. One use case would be direct access to steering wheel buttons from the canbox (my understanding is that in some cases FwHwOneKey can't handle canbus related buttons...maybe I'm wrong). Or, perhaps there isn't really any use at all for this info to trigger user applications.
I know there was a request to access Canbox data for widgets (for instance to be able to display the outside temperature on a custom screen). This method should be able to support something like that, but I have no idea if there is an existing app that could make use of it. Maybe I could write a proxy that would turn service updates into system broadcast events? Just spitballing here.
Wow, it’s really communicate with canbus from user apps?
May be there is way to read can data, like we can see in develop mode
Sdese2000 said:
Wow, it’s really communicate with canbus from user apps?
May be there is way to read can data, like we can see in develop mode
Click to expand...
Click to collapse
To be clear, I only have access to whatever the canbox has already decoded (and the radio has accepted), at least on my vehicle, thee is a lot more CAN traffic that is ignored. What CAN data do you see in develop mode? I am not aware of this.
AxesofEvil said:
Sorry, maybe that was inappropriate. I guess I was thinking about ways to give users access to the canbox data since Tasker doesn't seem able to hook into services this way. One use case would be direct access to steering wheel buttons from the canbox (my understanding is that in some cases FwHwOneKey can't handle canbus related buttons...maybe I'm wrong). Or, perhaps there isn't really any use at all for this info to trigger user applications.
Click to expand...
Click to collapse
Not inappropiate at all. I just didn't get what you meant.
And yes: The BT like commands are still a big misunderstanding (for me that is). I think that could very well be a combi of activity, canbus and "something else"
But as my unit doesn't have buttons anymore, and neither my previous one, I don't spend time on my own app anymore.
AxesofEvil said:
To be clear, I only have access to whatever the canbox has already decoded (and the radio has accepted), at least on my vehicle, thee is a lot more CAN traffic that is ignored. What CAN data do you see in develop mode? I am not aware of this.
Click to expand...
Click to collapse
In Head Unit settings there is trigger, if turn on it, can logs will appear on the screen.
If found some code in com/syu/util/DebugViev.jave that provide it
Spoiler
package com.syu.util;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.support.p000v4.internal.view.SupportMenu;
import android.view.View;
import android.view.WindowManager;
import java.util.Locale;
public class DebugView extends View {
private int CELL_HEIGHT = 35;
int[] COLOR = {SupportMenu.CATEGORY_MASK, -1, -16711936, -256, -16776961};
private final int MAX = 16;
private final int TEXT_SIZE = 23;
/* access modifiers changed from: private */
public int[] mColors = new int[16];
/* access modifiers changed from: private */
public int mCount;
private boolean mDbg = false;
/* access modifiers changed from: private */
public int mLastIndex;
private WindowManager.LayoutParams mLp = ToolkitApp.buildOverlayLayoutParams(-1, -1);
/* access modifiers changed from: private */
public int mMsgCnt;
/* access modifiers changed from: private */
public String[] mMsgs = new String[16];
private Paint mPaint = new Paint();
public DebugView(Context context) {
super(context);
init();
}
private void init() {
this.mPaint.setAntiAlias(true);
this.mPaint.setTextSize(23.0f);
this.mPaint.setColor(-1);
}
public void setDbg(boolean flag) {
this.mDbg = flag;
}
public boolean isDbg() {
return this.mDbg;
}
public WindowManager.LayoutParams getWindowLayoutParams() {
return this.mLp;
}
public void msg(String msg) {
if (this.mDbg && msg != null) {
HandlerUI.getInstance().post(new MessageHelper(msg));
}
}
public void msg2(String msg) {
if (this.mDbg && msg != null) {
HandlerUI.getInstance().post(new MessageHelper(msg));
}
}
public void msgHex(String str, byte[] data, int start, int length) {
if (this.mDbg && data != null) {
if (data.length - start < length) {
length = data.length - start;
}
String msg = String.valueOf(str) + " * ";
for (int i = 0; i < length; i++) {
String c = Integer.toHexString(data[start + i] & 255).toUpperCase(Locale.CHINA);
if (c.length() < 2) {
c = "0" + c;
}
msg = String.valueOf(msg) + c + " ";
}
HandlerUI.getInstance().post(new MessageHelper(msg));
}
}
public void msgHex(String str, int[] data, int start, int length) {
if (this.mDbg && data != null) {
if (data.length - start < length) {
length = data.length - start;
}
String msg = String.valueOf(str) + " * ";
for (int i = 0; i < length; i++) {
String c = Integer.toHexString(data[start + i] & 255).toUpperCase(Locale.CHINA);
if (c.length() < 2) {
c = "0" + c;
}
msg = String.valueOf(msg) + c + " ";
}
HandlerUI.getInstance().post(new MessageHelper(msg));
}
}
private class MessageHelper implements Runnable {
private String mMessage;
public MessageHelper(String msg) {
this.mMessage = msg;
}
public void run() {
DebugView debugView = DebugView.this;
debugView.mLastIndex = debugView.mLastIndex + 1;
DebugView debugView2 = DebugView.this;
debugView2.mCount = debugView2.mCount + 1;
if (DebugView.this.mLastIndex > 15) {
DebugView.this.mLastIndex = 0;
}
if (DebugView.this.mCount > 16) {
DebugView.this.mCount = 16;
}
DebugView debugView3 = DebugView.this;
debugView3.mMsgCnt = debugView3.mMsgCnt + 1;
DebugView.this.mMsgs[DebugView.this.mLastIndex] = String.format("%06d @ %s", new Object[]{Integer.valueOf(DebugView.this.mMsgCnt), this.mMessage});
DebugView.this.mColors[DebugView.this.mLastIndex] = DebugView.this.COLOR[DebugView.this.mLastIndex % DebugView.this.COLOR.length];
DebugView.this.invalidate();
}
}
/* access modifiers changed from: protected */
public void onDraw(Canvas canvas) {
if (this.mCount != 0) {
int count = this.mCount;
int firstIndex = (this.mLastIndex - count) + 1;
if (firstIndex < 0) {
firstIndex += 16;
}
if (firstIndex + count > 16) {
int rightCount = 16 - firstIndex;
int leftCount = count - rightCount;
for (int i = 0; i < rightCount; i++) {
int index = firstIndex + i;
this.mPaint.setColor(this.mColors[index]);
canvas.drawText(this.mMsgs[index], (float) 5, (float) ((i + 1) * this.CELL_HEIGHT), this.mPaint);
}
for (int i2 = 0; i2 < leftCount; i2++) {
this.mPaint.setColor(this.mColors[i2]);
canvas.drawText(this.mMsgs[i2], (float) 5, (float) ((rightCount + i2 + 1) * this.CELL_HEIGHT), this.mPaint);
}
return;
}
for (int i3 = 0; i3 < count; i3++) {
int index2 = firstIndex + i3;
this.mPaint.setColor(this.mColors[index2]);
canvas.drawText(this.mMsgs[index2], (float) 5, (float) ((i3 + 1) * this.CELL_HEIGHT), this.mPaint);
}
}
}
}
I have updated the OP with a link to the GitHub library (here). The library is not really meant to be used standalone, but instead to be incorporated into other projects. I haven't posted the code for the logger as there is still quite a bit more to do on that side.
The library repo does include an example application which will simply log every message received to the screen/logfile (in /Downloads). It is very inefficient since it just blindly asks for every possible ID regardless of whether it is actually available for a given CanBox or not, but is meant to give a quick idea of what data is available and a short example of how to use the library. The latest compiled APK can be found here: https://github.com/AxesOfEvil/FYTCanbusMonitor/releases
I found this interesting tidbit today:
It seems to be that arbitrary commands can be sent to the canbus through the radio via sys.ms by calling ToolkitDev.writeMcu(0xE3, PID, data-len, data0, data1, ...) (where data can be 1-8 bytes).
Edit: ToolkitDev.writeMcu(0xE3, ...) seems to write commands to the canbox module. As I don't have the source for teh module, I'm not sure how it handles these commands, but they don't g out verbatim on the canbus itself.
There is also ToolkitDev.writeCanbusDirect, but this may send commands via an OBDII dongle...Edit: this seems to just directly send raw commands to the CanBox. It is similar to the above but requires manually calculating the entire packet (including checksum)
I have not found a way to pass arbitrary data from an external app through an intent to allow other apps to send arbitrary canbus commands, but with a hacked syu.ms, it probably means I can eliminate the DynAudio AMP control box I had to make to get my audio working. And that with more hacking, it may be possible to send GPS directions and music info to the HUD.
AxesofEvil said:
The CanBox ID is specified by ID=1000.
The low 16 bits appear to specify the canbox type, and the upper 16bits seem to represent the car make/model. This mapping happens in syu.ms.module.canbus.HandlerCanbus with the name mapping in module.canbus.FinalCanbus
Here is an example of the IDs for (some) Reise RZS CanBox to give an idea of what type of data is available:
Code:
U_CUR_OIL_EXPEND 0
U_MISC_BEGIN 0
U_LOW_OIL_WARN 1
U_LOW_BATTERY_WARN 2
U_LIFE_BELT_WARN 3
U_CLEAN_FLUIT_WARN 4
U_HANDLE_BRAKE_WARN 5
U_RESIDUAL_OIL 6
U_BATTERY_VOLTAGE 7
U_DRIVE_MILE 8
U_PARK 9
U_RADAR_MUTE 10
U_CUR_SPEED 11
U_ENGINE_SPEED 12
U_OUT_TEMP 13
U_AIR_BEGIN 14
U_AIR_POWER 14
U_MISC_END 14
U_AIR_BIG_WIND_LIGHT 15
U_AIR_LITTLE_WIND_LIGHT 16
U_AIR_AC 17
U_AIR_MAX 18
U_AIR_CYCLE 19
U_AIR_DUAL 20
U_AIR_REAR 21
U_AIR_BLOW_UP 22
U_AIR_BLOW_BODY 23
U_AIR_SHOW 24
U_AIR_BLOW_FOOT 25
U_AIR_WIND_LEVEL 26
U_AIR_TEMP_LEFT 27
U_AIR_TEMP_RIGHT 28
U_AIR_AQS 29
U_AIR_SEAT_HEAT_LEFT 30
U_AIR_REAR_LOCK 31
U_AIR_AC_MAX 32
U_AIR_SEAT_HEAT_RIGHT 33
U_AIR_TEMP_OUT 34
U_AIR_AUTO 35
U_AIR_END 36
U_DOOR_BEGIN 37
U_DOOR_ENGINE 37
U_DOOR_FL 38
U_DOOR_FR 39
U_DOOR_RL 40
U_DOOR_RR 41
U_DOOR_BACK 42
U_DOOR_END 43
U_AIR_FRONT 44
U_AIR_BLOW_MODE 45
U_CNT_MAX 46
Click to expand...
Click to collapse
Where did these IDs come from? Did you find one for Illumination/Headlights?
The IDs came out of the source code for 190000000_com.syu.canbus.apk
The IDs are canbox and probably vehicle specific, so such info may be available, but you need to identify exactly what you are looking for.
Use JadX or BytecodeViewer or a similar application to analyze the apk file above, and look in app/src/main/java/module/canbus for the appropriate Canbox for your vehicle

Categories

Resources