Vodafone K3770

07 Jul 2012

Hello Andrew,

LPC11U24 based mbed can not act as USB host, only as USB device. So If You want to use any dongle, You will need LPC1768 mbed.

09 Jul 2012

Javier Gonzalez wrote:

Hi,

Will this library work with dongles connected to Vodafone networks in other countries such as Spain? I happen to have a K3770 and a Vodafone SIM, but I have not succeeded in setting everything up yet. APN settings for Vodafone Spain require username and password. I also wonder if SIM PIN should be disabled beforehand.

Regards,

Javier

It should work, as the only difference is the APN AFAIK.

It sounds like the SIM PIN problem could be the issue. Can you try disabling the SIM PIN and try to connect again?

We can add SIM PIN functionality into the feature roadmap.

10 Jul 2012

Hi,

I have got Vodafone K3770-Z. But it is not able to connect with MBED. I tried Vodafone India sim card and TATA DOCOMO sim card. But RED LED of K3770 keep blinking and never gets connected. Any specific reason ? Only Vodafone network allowed ? Mine is factory unlocked K3770-z.

Thank you, Vatsal

10 Jul 2012

Vatsal Shah wrote:

Hi,

I have got Vodafone K3770-Z. But it is not able to connect with MBED. I tried Vodafone India sim card and TATA DOCOMO sim card. But RED LED of K3770 keep blinking and never gets connected. Any specific reason ? Only Vodafone network allowed ? Mine is factory unlocked K3770-z.

Thank you, Vatsal

Hi Vatsal,

The K3770-Z uses a ZTE chipset, whereas the K3770 uses a Huawei chipset.

There are subtle differences in these products which means that the current library is unlikely to work with the former, as you have yourself discovered.

So at this moment in time, we can say that only the K3770 is officially supported and not the K3770-Z.

We would like a range of modems to work however, so will make a note of your request and, should budget permit, get this dongle into the roadmap.

Cheers

Ashley

10 Jul 2012

Hi Martin,

further to my message - It's not possible for me to post the documents for those modems as we are under NDA. However, when we eventually get round to it we will hopefully support as many modems as possible. You will be able to look at the code to determine the correct AT command sequence for legacy modems when it's open sourced in October.

I'm sorry about this, but it's not under my control! :-( ....

Kind regards, Nicholas.

Nicholas Herriot wrote:

Hi Martin,

I'll have a look at the spec today on that particular modem and what we are allowed to disclose under NDA with our suppliers and what is proprietary to Vodafone.

The reason why I chose this modem is that it's the lowest cost GSM/GPRS/3G modem in the portfolio - which we think is what an M2M application wants. We are of the opinion that someone building M2M connectivity would not be interested in getting the highest bandwidth possible - just something solid and at the correct price point for low bandwidth telemetry applications.

I'll get back to you shortly on this modem type - however if there are big differences it would have to be the community that do this themselves as we do not have the bandwidth to test and support all the modems in the Vodafone portfolio.

Kind regards, Nicholas.

Martin Schmidt wrote:

Hi Chris,

Chris Styles wrote:

Hi, I have a couple of 3G modems. Is it possible that this library will work with them?

Unless it is a K3770, it is not likely to work. A lot of these modems are very similar, and so in the future (when Beta is over) it might well be possible to make small modifications to the Modem driver code to make it work for other modems too.

But for now, I'd expect not.

I have a Vodafone K3765 3G/HSPA USB modem, is there a chance that this one will work, too? Can we get the specifications from Vodafone concerning the differences between these two models?

Thanks, Martin

10 Jul 2012

Thanks a lot for information. Yes i checked. There is significant difference between Vodafone K3770 and Vodafone K3770-z. I will buy K3770 from Tesco and will try it again. Is there any restriction if I buy unlocked K3770 directly from ZTE and put different sim cards ?

Thank you, Vatsal Shah

Ashley Mills wrote:

Vatsal Shah wrote:

Hi,

I have got Vodafone K3770-Z. But it is not able to connect with MBED. I tried Vodafone India sim card and TATA DOCOMO sim card. But RED LED of K3770 keep blinking and never gets connected. Any specific reason ? Only Vodafone network allowed ? Mine is factory unlocked K3770-z.

Thank you, Vatsal

Hi Vatsal,

The K3770-Z uses a ZTE chipset, whereas the K3770 uses a Huawei chipset.

There are subtle differences in these products which means that the current library is unlikely to work with the former, as you have yourself discovered.

So at this moment in time, we can say that only the K3770 is officially supported and not the K3770-Z.

We would like a range of modems to work however, so will make a note of your request and, should budget permit, get this dongle into the roadmap.

Cheers

Ashley

10 Jul 2012

Hi Andy,

further to your questions on SIM type and messages from the network for PAYT SIM's.

1) Yes a data SIM will not have SMS enabled. This is a marketing requirement. Data supplied to 3G datacards (dongles) is cheaper than data purchased for 3G smart phones. So to segment the market they have supplied a SIM and dongle that only does data. Hence the price point of approx £15 for 3Gig. You could use an SMS API to deliver text - I'll look into that for you. The data cost for smart phones with SMS is peanuts anyway when you look at telemetry data requirements for a sensor, so in the short term a PAYT SIM is fine with an SMS + data bundle.

2) An easy way to work out how much data and SMS you have on a SIM is to do from your phone (with your SIM in! :-) ..) the USSD command *#1345# . You will get a message that will either say "Not applicable" - in which case you have a contract SIM, or something like "Your balance is #0.40. To check any remaining allowances please call 1345, for free, Thank you."

It may give you more details on exact number of text messages remaining and data bundle.

In the coming months we will hopefully be building this kind of intelligence into the API to allow the developer to just call a function up to get remaining credit or what type of SIM is in the device to allow the embedded device to have some intelligence.

Hope this helps and sorry for my late reply.

Kind regards, Nicholas.

Andrew Lindsay wrote:

Hi Chris,

I think it is due to the sim provided with the dongle only allowing data and not sms. Ordered a couple of free data and sms sims to try. At least I can implement a sms to LED Matrix message display now.

Thanks.

Andy

27 Jul 2012

hi,

Is it possible to run MYSQL Client on K3770 ? I just want to push some data to MYSQL

#include "mbed.h"
#include "MySQLClient.h"

#define SQL_SERVER   ""
#define SQL_USER     ""
#define SQL_PASSWORD ""
#define SQL_DB       ""

MySQLClient sql;
MySQLResult sqlLastResult;

void onMySQLResult(MySQLResult r)
{
  sqlLastResult = r;
}

int main()
{
  printf("Start\n");

  printf("Setting up...\n");
  EthernetErr ethErr = eth.setup();
  if(ethErr)
  {
    printf("Error %d in setup.\n", ethErr);
    return -1;
  }
  printf("Setup OK\n");
  
  Host host(IpAddr(), 3306, SQL_SERVER);
  
  //Connect
  sqlLastResult = sql.open(host, SQL_USER, SQL_PASSWORD, SQL_DB, onMySQLResult);
  while(sqlLastResult == MYSQL_PROCESSING)
  {
    Net::poll();
  }
  if(sqlLastResult != MYSQL_OK)
  {
    printf("Error %d during connection\n", sqlLastResult);
  }
  
  //SQL Command
  //Make command
  char cmd[128] = {0};
  const char* msg="Hello World!";
  sprintf(cmd, "INSERT INTO Test (Test) VALUES('%s')", msg);
  
  //INSERT INTO DB
  string cmdStr = string(cmd); 
  sqlLastResult = sql.sql(cmdStr);
  while(sqlLastResult == MYSQL_PROCESSING)
  {
    Net::poll();
  }
  if(sqlLastResult != MYSQL_OK)
  {
    printf("Error %d during SQL Command\n", sqlLastResult);
  }
  
  sql.exit();
  
  while(1)
  {
  
  }
  
  return 0;
}

What would be the alternative of net::poll ?

Thanks,

Vatsal

27 Jul 2012

Hi Vatsal,

This implementation of the MySQL client is using the old networking stack (NetServices) so it is incompatible with the Vodafone K3770 library. Modifying it for the present libraries could be a great project.

Cheers,

Donatien

31 Jul 2012

Hi,

Here in Romania I can find only K3772. would it worth to try ?

Kind regards, Daniel

31 Jul 2012

Does it say:

K3772-Z on the back? As this is being tested at the minute.

Kind regards, Nicholas Herriot

31 Jul 2012

I didn't bought it yet. That's why I am asking.

Should be "-Z" or without any suffix ?

Thanks Daniel

01 Aug 2012

Yes it should be the one with the "-Z" suffix.

Kind regards, Nicholas.

01 Aug 2012

Well , it seems that here in stores the package it's sealed and I cannot verify if it has a -Z at end or not (since external box mention only K3772 without any details).

Probably a solution would be to look over first numbers from IMEI. Those should tell the manufacturer.

Would you please tell me what would have to be first numbers from IMEI in order to be sure that the modem has been made by ZTE ?

Kind regards, Daniel

02 Aug 2012

The TAC code is: 86912200.

Is this shown from the box?

03 Aug 2012

YEs IMEI and some kind other serials are on right side of box. Thank you for info. Now I will chase stores for right one.

03 Aug 2012

Hi Stupid question probably, but how do I see the DBG output. Is it over UART and iff so what baud rate (is it 115200,8,n,1)?

03 Aug 2012

Answering my own question here but DBG is via a USB COM port for which you must install the mbed driver. See:

http://mbed.org/handbook/SerialPC http://mbed.org/handbook/Windows-serial-configuration

You can then use a terminal program like HTerm or Putty to view the output coming from that COM port (see Device Manager under Ports you'll see something like 'mbed Serial Port (COM)'

03 Aug 2012

Hi Chris,

for me I use a Linux box. I attach to the console DBG using an application called "cutecom" which is extreamly good compared to what you can get on Windows.

My seetings are baud rate: 9600 and I attache to dev/ttyACM0.

Works fine for me.

Hope things are working for you now.

Kind regards, Nicholas

06 Aug 2012

Hi Chris,

By the way DBG has some other options which are only documented in the header:

DBG_SET_SPEED(115200);

DBG_SET_NEWLINE("\r\n");

The latter is useful when using gnu screen on linux to view the serial stream.

Alternatively if you don't want to use the DBG calls, then you use fprintf(stdout,"string") which defaults to the pc serial.

I don't agree with Nick when he says that cutecom "is extreamly (sic) good compared to what you can get on Windows.". I think the terminal emulators for serial comms are much better on windows.

On Linux you basically have:

TUI:

screen ($screen /dev/ttyUSB0 115200) <- This is what I usually use.

cu ($cu -l /dev/ttyUSB0 -s 115200)

minicom (never used it, guide here: bit.ly/PzdEBa)

GUI:

cutecom (http://cutecom.sourceforge.net/)

On Windows you have:

PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)

RealTerm (realterm.sourceforge.net)

Terminal (http://braypp.googlepages.com/Terminal20080315.zip)

MTTTY (http://www.netburner.com/support/public_downloads.html)

Portmon (http://technet.microsoft.com/en-us/sysinternals/bb896644.aspx)

I'm sure there are probably more. But I would argue the GUI based terminals are much better on Windows at present.

06 Aug 2012

Thanks Nicholas and Ashley, very useful!

14 Aug 2012

Finally I have found a K3772-Z and last evening I have made some tests .

I have loaded Donatien's code : http://mbed.org/users/donatien/code/VodafoneK3770SMSTestBeta/

I receive on serial : ......... Module WANDongle.cpp - Line 54: Trying to connect device[DBG] Module WANDongle.cpp - Line 65: Found one device, reset it[DBG] Module WANDongle.cpp - Line 68: Enumerate[DBG] ............

This one it's repeating to infinite.

Any hints ?

Daniel

14 Aug 2012

I have tried also : http://mbed.org/users/donatien/code/VodafoneK3770HTTPClientTestBeta/

I have tryed also other modems : K3565 K3571-Z

same output !

14 Aug 2012

Hi Daniel,

Don't worry, it's going to be OK :)

What Nicholas didn't mention, and I failed to pick up on, is that K3770-Z support is available only in the bleeding-edge version of the library. This crucial information is a glaring omission in the thread above, for which I apologize.

Donatien controls access to the bleeding edge version, and it is currently private. I have access so I could however just fork it and make it public for you. I'll talk to the other guys this morning to understand when those changes are going to be pushed into the "official" beta code and get back to you later today, I think some things might need to be cleaned up first. Worst case scenario, I'll fork a version for you for temporary use in the meantime.

Cheers

Ashley

14 Aug 2012

Daniel,

It turns out Donatien is back from holiday tomorrow, so if you can hold on for a bit, I think it will be best if I ask him when he gets in if he can make a precompiled version of the bleeding edge library.

Sorry I couldn't get you a working library today.

Ashley

14 Aug 2012

Thank you Ashley for support.

Following your explanations it seems that you are building a library or some adaptations for K3770-Z and K3772-Z meaning ZTE.

There it's any point to buy and test this library with a K3772 (probably Hua) ?

I am asking since now in shops are available only K3772.

Anyway since I have bought already 2 pieces of K3772-Z I am highly interested to make them work.

Kind REgards, Daniel

14 Aug 2012

Hi Daniel,

The K3772-Z works. I'm using it today on my desk. All you need is the library. I want to make that available to you as soon as possible, hopefully tomorrow. But that part is not in my direct control.

But you can rest assured that the K3772-Z does work, and that you have spent your money wisely.

Ashley

15 Aug 2012

What options are available now if I wanted to use this to data log? Could I use it to FTP a .txt file to a server? From the libraries available it would seem I could only pass data through a webpage's URL? I understand the principle of BSD sockets but don't know how to use them or implement them, are there any good resources on this? Thanks.

15 Aug 2012

Daniel,

Donatien is going to push the K3772-Z code into the official beta, as well as other enhancements. So you'll be up and running shortly.

Ashley

15 Aug 2012

Tom,

This is one of the areas we are constructing some tutorials for at present, so in some time we'll have a good resource. But until that happens, you could upload to something like COSM (formerly called Pachube):

http://mbed.org/cookbook/Pachube

COSM just uses HTTP requests so all you'd need is the HTTPClient:

http://mbed.org/cookbook/Vodafone-K3770

http://mbed.org/users/donatien/code/VodafoneK3770HTTPClientTestBeta/

You could also use another HTTP service like twitter, or pastebin if you were feeling particular bohemian/adventurous.

If you want to use sockets, then you can either use the BSD sockets or the c++ sockets API:

http://mbed.org/handbook/Socket

The C++ api is easier in the sense that it is more abstracted, but the BSD sockets is more directly portable.

Now of course, if you use sockets, then you need to have some endpoint to talk to.

This could be an existing service you want to talk to. You can search the cookbook to see if there is a client for your service else you'd have to write your own. For example, you could connect to an SMTP server and send emails, you could connect to FTP and upload a file. Looks like there is an SMTP client:

http://mbed.org/cookbook/SMTPClient

But I wouldn't use that personally as it doesn't support TLS. Having said that, we don't currently have HTTPS either, so there is a security issue unless you write your own authentication, encryption, and integrity routines. I guess it depends what you are logging and whether you care if others can see it/mess with it/spoof it (where "others" here means people with the resources to compromise a router or machine in the path that your packets take, or inject spoofed packets into your stream).

You could also abuse the websockets API:

http://mbed.org/cookbook/Websockets-Server

Now, for writing your own simple server, for example to log to a file, something like nodejs is easy to pickup. Again, without encryption etc the security is going to be effectively null. But whatever language you use you will need to have a somewhere to host the server program.

You could even host the server on your own machine at home, and use a dynamic dns service to map your ISP-allocated IP to a static domain name. You'd have to configure your DSL router firewall (or equiv) to let through and NAT incoming connections, but its a cheap alternative if you don't have access to a hosting environment.

Hope I haven't been too skittish. If that all went over your head, you'd be best to wait for a good tutorial to come along :)

Cheers

Ashley

You need to log in to post a reply