Friday, 15 September 2017

ECUFix has been updated to v6.2.6.10


Recompiled with Microsoft's latest version of Visual Studio 2017.

Tested on Windows 10 down to Windows XP.

This version has added VAG binary 369321 since the last update. If you would like to give it a try, the new version can be downloaded direct from ECUFix's product page or from the download directory HERE.

Monday, 3 July 2017

Can't Send SMS Error 38 - Vodafone UK

I had a OnePlus 2 mobile phone here in the UK.

I really liked it but my Vodafone SIM wouldn't let me send SMS texts out. Since it's a dual SIM phone, I tried an EE SIM in the other slot and this worked fine.

Sending texts didn't really bother me much and, at the time in June 2017, the OnePlus 5 was due to be released so I wasn't much bothered.

OnePlus 5 in my hands and everything swapped over I randomly tried to send an SMS a few days later.... it failed with the error message "Could not send text Error 38"..... hmm, not good. I telephoned Vodafone and spent about 45 minutes on the phone with the technical chap. We tried all-sorts including disabling and re-enabling SMS from the Vodafone system app but all to no-avail. Then I found an article about a similar problem on the OnePlus 3T forums and thought I'd give it a go....

There's a (not so) secret menu available for Android phones that's accessed by typing *#*#4636#*#* from your phone's dialer. As soon as you enter the last "*", a menu pops up labelled "Testing".

Secret Menu 1
Tap on the Phone Information selection and you'll get this menu:
Secret Menu 2

In my phone, the SMSC: field was blank. The message centre for Vodafone UK is +447785016005 which needs to be added here. To add it, you must put the number in double quotes and then tap on the UPDATE button, e.g. "+447785016005" - tap UPDATE.

Tapping REFRESH should append the ",145" at the end.

Sending a test SMS to myself succeeded!
P.S. don't go changing anything else or you'll probably do more damage unless you know what you're doing. Ironically, if you know what you're doing, you wouldn't be here anyway 😃
Hope this helps someone, Andy

Sunday, 11 June 2017

ECUFix has been updated to v6.2.6.8


Recompiled with Microsoft's latest version of Visual Studio 2017.

Tested on Windows 10 down to Windows XP.

This version has added various extra binaries since the last update. If you would like to give it a try, the new version can be downloaded direct from ECUFix's product page or from the download directory HERE.

Sunday, 23 April 2017

ECUFix has been updated to v6.2.6.7

Probably should have gone up a slightly higher version number this time because of the work I had to put into this.


I've added two extra binaries for US/Canada VW Rabbits (Golfs), both Normally Aspirated (NA) which took some doing! 360930 and 372644

If you would like to give it a try, the new version can be downloaded direct from ECUFix's product page or from the download directory HERE.

However, over the past month or so, I updated my development environment to Visual Studio 2017 and all seemed well except I noticed some unusual behaviour only after the project was compiled into Release mode.

The bug? Well to make things try and autocomplete as much as possible, I have a small routine to try and search for a string of bytes in a binary. A snippet follows (Thanks to http://hilite.me/)

unsigned __int32 chksumBase::FindStringWithDontCareInBinary(unsigned char *szString, unsigned __int32 nSLength, unsigned __int32 nStartAddress) 
{
 unsigned __int32 nAddr = 0xffffffff, nIndexA, nIndexB;
 CString  csBuf;

 //Guard against overflows
 if(nSLength > m_nBSize)
 {
  nSLength = m_nBSize;
  csBuf.Format(_T("Warning! Function FindStringInBinary given nSLength of 0x%lx but the binary is only 0x%lx long"), (unsigned __int32)nSLength, (unsigned __int32)m_nBSize);
  DisplayErrorText(csBuf);
  return 0xffffffff;//Error
 }

 //Guard against overflows
 if((nStartAddress + nSLength) > m_nBSize)
 {
  csBuf.Format(_T("Warning! Function FindStringInBinary given a StartAddress of 0x%lx but length of 0x%lx when the binary is only 0x%lx long"), (unsigned __int32)nStartAddress, (unsigned __int32)nSLength, (unsigned __int32)m_nBSize);
  DisplayErrorText(csBuf);
  return 0xffffffff;//Error
 }

 for(nIndexA=nStartAddress; nIndexA < m_nBSize; nIndexA++)
 {
  if(*(m_pBinary+nIndexA) == *szString)
  {// We're matched for the 1st char, now check the rest
   for(nIndexB=0; nIndexB < nSLength; nIndexB++)
   {
    if(*(szString+nIndexB) != 0xff) //check for don't care flag
    {
     if(*(m_pBinary+nIndexA+nIndexB) != *(szString+nIndexB))
     {
      break;// No longer matched
     }
     
     if ((nIndexB + 1) == nSLength)
     {
      return nIndexA; // String completely matched
     }
    }
   }
  }
 }

 return nAddr;
}

That code has worked for the past few years but since the change to VS2017, it's stopped 😐 Therefore I've wrote the following instead and am just testing it for inclusion with the next version:

/*
* The memmem() function finds the start of the first occurrence of the
* substring 'needle' of length 'nSLength' in the memory area 'm_pBinary' of
* length 'binaryLength'.
*
* The return value is a pointer to the beginning of the sub-string, or
* NULL if the substring is not found.
* 
* From: http://stackoverflow.com/questions/2188914/c-searching-for-a-string-in-a-file
*/
unsigned __int32* chksumBase::memmem(unsigned char *needle, unsigned __int32 nSLength)
{
 int needle_first;
 unsigned char *p = m_pBinary;
 unsigned __int32 binaryLength = sizeof(m_pBinary);
 unsigned __int32 plen = nSLength;

 if (!nSLength)
  return nullptr;

 needle_first = *(unsigned char *)needle;

 while (plen >= nSLength && (p = (unsigned char *)memchr(p, needle_first, plen - nSLength + 1)))
 {
  if (!memcmp(p, needle, nSLength))
   return (unsigned __int32 *)p;

  p++;
  plen = binaryLength - (p - m_pBinary);
 }

 return nullptr;
}

Friday, 24 March 2017

ECUFix Has Been Updated to v6.2.6.6

ECUFix v6.2.6.6
Recompiled with Microsoft's latest version of Visual Studio 2017.

Tested on Windows 10 down to Windows XP.

This version has added various extra binaries since the last update. If you would like to give it a try, the new version can be downloaded direct from ECUFix's product page or from the download directory HERE.

Sunday, 11 September 2016

ECUFix Has Been Updated to v6.2.1.0

ECUFix Has Been Updated to v6.2.1.0

ECUFix has been updated to Version 6.2.1.0
This version adds support for a SEAT Ibiza 1.8T 150HP and also adds a few changes to the way it searches for binary information behind the scenes. The code remains to be able to run reliably on Windows 10.

This new ECUFix features a new licensing wrapper so hopefully be free of any "false triggers" with most of the anti-virus scanners out there.

If this has whetted your appetite, the new version can be downloaded direct from ECUFix's product page or from the download directory HERE.

Tuesday, 8 March 2016

UK BT to RJ11 for Draytek VOIP modems

Got a VOIP modem with an RJ11 socket?

If you are lucky enough to have either a wireless or cable connection to the internet, you can almost undoubtedly save money on line-rental by getting rid of your landline and move over to VOIP instead.

However, in the UK we have BT 431A plugs and most modems/adapters have RJ11 sockets on them. Therefore an adapter is needed but which one?

STOP Press - I found this useful post here - It shows us that the middle two pins (3 and 4) are line 1 and the next two pins (2 and 5) are line 2.

Speaking from my experience with my Draytek 2820Vn router you need to choose a crossover type. The information about how to connect a BT designed device to these things is difficult to find, mainly because you don't know what to type into the Google search box!

Useful information I found is available to browse HERE, with the most important paragraph being the last one. It states that pins 2 and 3 of the RJ11 plug need to be crossed-over to connect to pins 3 and 2 of the BT plug/socket. Similarly, pins 4 and 5 need to be crossed-over and connected to pins 5 and 4 of the BT plug/socket.

To quote the web-site: "NORMALLY the center two pins on the RJ11 are connected to the outer two (2 and 5) at the BT end.  No matter what coloured wire is used the two wires always go to pins 2 and 5 at the BT end however it isn't safe to assume they ALWAYS go to the center two at the RJ11 end."




Just to test, I ordered this from eBay - search for a "BT Socket to RJ11 Plug 4 Pin UK Telecom Telephone Phone Cable Adaptor Converter" and you shouldn't go far wrong.

For some nice VOIP information, have a look at this article and this one too for Draytek related information.