Vodafone K3770

17 Aug 2012

Thanks Ashley, yes is makes sense to me. COSM looks interesting, I've only had a quick look. Can you do any post processing with COSM? Some of the data I may wish to transmit may require processing after transmission but I might be able to shift this to the mbed if there isn't the option to do this with COSM. Websockets also looks interesting, most examples focus on server and browser, in the case with an mbed would this effectively become the browser that could relay information to the server?

Thanks, Tom

17 Aug 2012

Hi all,

As you might have seen I just pushed an update to the library.

It is now called "VodafoneUSBModem" as we now support the K3772-Z modem additionally to the K3770.

Also, you now can use the same Socket-based libraries than the EthernetInterface library!

Check out the library & the updated example programs:

Import libraryVodafoneUSBModem

Vodafone K3770/K3772-Z modems driver & networking library

Import programVodafoneUSBModemHTTPClientTest

Example demonstrating the use of the Vodafone USB Modem library with the HTTP Client

Import programVodafoneUSBModemNTPClientTest

NTP Client Test with the Vodafone USB Modem library

Import programVodafoneUSBModemWebsocketTest

Websocket client test with Vodafone USB Modems

Import programVodafoneUSBModemSMSTest

SMS test with the Vodafone library

Import programVodafoneUSBModemUSSDTest

Test of USSD commands transmission over the Vodafone network with the Vodafone library

Cheers,

Donatien

20 Aug 2012

Daniel,

Can you confirm that this new library works for your K3772-Z?

Ashley

20 Aug 2012

Tom Davies wrote:

Thanks Ashley, yes is makes sense to me. COSM looks interesting, I've only had a quick look. Can you do any post processing with COSM? Some of the data I may wish to transmit may require processing after transmission but I might be able to shift this to the mbed if there isn't the option to do this with COSM. Websockets also looks interesting, most examples focus on server and browser, in the case with an mbed would this effectively become the browser that could relay information to the server?

Thanks, Tom

Hi Tom,

I know you can access the data from elsewhere other than the COSM interface, so you could do the post-processing somewhere else. Doing some digging, there appears to be an attempt to connect to json-processing, buy a guy quite closely related to the COSM project:

https://github.com/jmsaavedra/Cosm-Processing-Library

Personally, I'd probably try and interface with a post-processing backend, perhaps something like this:

http://www.rforge.net/Rserve/doc.html

Looks pretty awesome, if you can overcome the barrier to learning R.

Ashley

20 Aug 2012

Ashley Mills wrote:

Daniel,

Can you confirm that this new library works for your K3772-Z?

Ashley

Hello Ashley, Thank you for your support. I was countryside during weekend. I had only 15 minutes this morning to make some tests. With sms test program I am receiving a lot of "<0>". somehow this is a good news since I don't receive anymore old error messages. I suppose that I should add code for pin code and to modify the APN.

I will keep you posted

Kind REgards, Daniel

20 Aug 2012

"It's alive master ! It's alive !"

YEs it's working. I have been able to test SMS with those comments: - console messages are sent now at 9600 (not at 115200 as in previous version) - I have disabled PIN code request.

IT seems that I receive some warnings :

[START] [INFO] Module VodafoneUSBModem.cpp - Line 501: Using a Vodafone K3772-Z Dongle [WARN] Module ATCommandsInterface.cpp - Line 730: Echo does not match output 1 SMS to read +40722XXXXXX : Reply !

20 Aug 2012

HTTP Client TEst it's working also with this line modified :

int ret = modem.connect("tobe.vodafone.ro");

[START] [INFO] Module VodafoneUSBModem.cpp - Line 501: Using a Vodafone K3772-Z Dongle Trying to fetch page... [HTTPClient : ERR]Could not read chunk length

[HTTPClient : ERR]Protocol error

Error - ret = 3 - HTTP return code = 200 Trying to post data... Executed POST successfully - read 386 characters Result: { "origin": "213.233.67.175", "files": {}, "form": { "test": "1234", "Hello": "World" }, "url": "http://httpbin.org/post", "args": {}, "headers": { "Content-Length": "21", "Host": "httpbin.org", "Content-Type": "application/x-www-form-urlencoded", "Connection": "keep-alive", "Cache-Control": "max-age=43200" }, "json": null, "data": "" }

21 Aug 2012

Probably I am doing something wrong. Should I import other libraries ?

Look at result of USSD test :

Sending *123# on USSD channel [START] [INFO] Module VodafoneUSBModem.cpp - Line 501: Using a Vodafone K3772-Z Dongle [WARN] Module ATCommandsInterface.cpp - Line 518: Incoming buffer is too short to process incoming line Send USSD command returned 6 Result of command:

21 Aug 2012

WEbsokets seems to work :

[START] [WARN] Module ATCommandsInterface.cpp - Line 539: Previous command not processed! [INFO] Module VodafoneUSBModem.cpp - Line 501: Using a Vodafone K3772-Z Dongle [WebSocket : INFO]

ip_domain: sockets.mbed.org

path: /ws/demo/rw

port: 443

rcv: WebSocket Hello World over the Vodafone Network!

rcv: WebSocket Hello World over the Vodafone Network!

rcv: WebSocket Hello World over the Vodafone Network!

rcv: WebSocket Hello World over the Vodafone Network!

rcv: WebSocket Hello World over the Vodafone Network!

21 Aug 2012

Hi Daniel,

Thanks for that. I'm glad you got it working. And thank you for the useful feedback concerning the tests. Looks like there are only some small issues. We are doing some testing this week, so hopefully we can identify any problems and sort them out.

Ashley

21 Aug 2012

Just to add to Donatien's update,

We've also added stuff based on feedback from people at our talks, namely:

1. Get signal strength, see getLinkState(...)

2. Dual channel support (can check SMS whilst socket is open).

Cheers

Ashley

29 Aug 2012

Hi all,

Just for info I fixed a bug in the HTTP Client that was creating issues with chunked data reception, so if you're using it I'd advise you to update:).

Cheers,

Donatien

01 Sep 2012

[Statement is unreachable] [main.ccp] [Line: 52 / Col: 2] [Success]

Why's it that I'm getting this error?

I'm using the LPC1768 with the sms-test import

01 Sep 2012

I'm having a problem with your smstest import, it's not receiving texts to pc. serial

Line i added Serial pc(USBTX, USBRX);

Line i modified pc.printf("%s : %s\n", num, msg);

When i send a text to the devices number it does not serial print anything at all When i plug the dongle into the computer and go to the sms program it receives the message

So why's it not working on this device? The serial code works when i init the mbed with the reset button

01 Sep 2012

Ok i got it working, Code only gets 1 message then i have to reboot the mbed? Also the input buffer size for received messages is 12? and i get a line saying: Module ATCommandsInterface.cpp - Line 518: Incoming buffer is too short There is no ATCommandsInterface.cpp and no line 518?!?!?

03 Sep 2012

Hi Matthew,

There is a small bug which we identified last week concerning the SMS functionality under certain conditions. My apologies for this. A new release will be forthcoming to address this problem.

There is at present is no ATCommandsInterface.cpp in the beta as the code has not yet been open-sourced. The code is going to be open-sourced in a few month's time.

Regards

Ashley

29 Sep 2012

Hi, I have checked this modem personally on the USA area. So I can confirm it working fine (EDGE only, 3G is supported only on EUROPE,Africa, Oceania).

Chris Styles wrote:

Hi All,

This comment from the Vodafone page :

Will this device work in the US?

The answer is probably no. It might be possible to get it working in the long term with the right SIM, but for now that's not something we're working on. The UK first, then the US, then the world!!!

19 Oct 2012

I'd like to customize for the Huawei E220, doesn't the source code of vf_offline.ar open to the public?

19 Oct 2012

Hi Wakwak,

yes the code will be open sourced in the coming weeks.

We would like and encourage you to port for this particular Huawei modem. I'll look up the flip string and post here shortly to help you a little.

Kind regards, Nicholas.

19 Oct 2012

Hi Wakwak koba,

The source for this project is currently closed.

As announced yesterday in this blog article Vodafone USB Modem Almost ready to release, the source will be open at the end of the month.

Thanks, Chris

19 Oct 2012

Hi Wakwak,

further to my previous email - I don't think you will need a specific string to flip the modem from mass storage device mode.

Details for product and vendor ID are:

DefaultVendor= 0x12d1 DefaultProduct=0x1003 TargetClass=0xff

Kind regards, Nicholas.

22 Oct 2012

Thanks all, I'l wait at the end of October.

Trick or Source-code ?

Oh it's also my daughter's birthday !

23 Oct 2012

Has anyone had success ordering a K3772-z from Vodafone recently? I followed the link here and ordered a "Internet dongle K3772-z" I got an email confirmation my my order for a K3772-z, but they shipped me an R205. How do I order a K3772-z and actually get one delivered (in the UK).

12 Nov 2012

Hi,

I've been using the library on and off since the beta days after seeing the demo at the IoT London meetup. I'm now using the full release version successuflly with my project which is on a similar line to Ashleys SMS to printer application. I have a LED matrix display built on 4 Sure Electronics 8x32 displays in a 2x2 configuration giving a 64x16 display with the top row showing the received sms as a scrolling message, the lower row shows the current date and time from the RTC which is received set using the USSD time command.

It also responds to a number of single word sms commands such as 'balance' to use the USSD balance check command. I have also used a service called IFTTT (If This Then That!) to send other messages to the display, for example it can send weather alerts or details of Foursquare checkins so they are seen on the display. I have now ordered one of the thermal printers to add to this project to provide a record of the messages received. This all works fine up to a point.

The whole lot is powered from an external source via a 5v regulator and connected as in the examples.

The issue I am having is that this all works fine when the mbed is connected to my laptop but it wont initialise the dongle and start receiving sms when the laptop is disconnected. However, if I then re-connect and open up a terminal emulator a load of debug text is received and it starts to work. I'm wondering if there is some buffering issue or debug commands issue in the library that is stopping this working on its own or if anyone else had come across a similar issue? In standalone mode it sometimes starts working after a few resets but not always.

I'm going to do further tests with a simple sms receiver application once I receive my printer an hook it up.

Finally, after reading the code in the library it looks like I can turn on and off the dongle by using a suitable transistor in the 5V supply to the dongle and connected to one of the output pins. Has anyone actually used this functionality?

Any ideas?

Cheers

Andy

12 Nov 2012

Hi Andy,

Great to hear you are doing something with the library.

We've ran quite a few applications on external power supplies for days at a time without issue (printer,camera,lamp,webgame,door), so we can say that under certain circumstances this issue does not arise. The problem is in discerning exactly what is different in your case.

Having said that our demos work, I am of a high suspicion that sometimes the dongle doesn't initialise properly, as I've seen anomalies during testing. I think this has something to do with the internal state of the modem. The problem in this case is to find a replicable use case.

I didn't write the library code, and up until recently, I had no intention of fully auditing it. But I'm now considering that as a course of action, because I want to be absolutely sure that I've done everything in my power to check for bugs.

--

AFAIK, nobody has used the power-gating functionality. The reasoning for the power gating was twofold:

1. For low-power scenarios, where a shutdown...wakeup-on-work policy is followed. 2. A few people we spoke to were of the opinion that dongles were not so reliable.

I'm not sure if the latter point is actually true, but I suppose it is true that dongles are primarily designed with laptop's in mind, where perhaps the average use duration is a few hours.

I really need to setup a soak test to do some mythbusting on this one.

--

But back to your problem. Can you please answer me the following question:

1. Which dongle are you using?

It does seem strange that you'd need to plug the USB cable back in. Whilst this might have something to do with buffering in a debug library, I do wonder if power is not the culprit?

2. What external power supply are you using? 3. Have you tried more than one power supply?

BTW, we do actually have a test suite, which I've written the framework and some of the tests, (be careful if you try it, it sends and receives LOTs of SMS and data):

https://mbed.org/users/ashleymills/code/VodafoneTestSuite/

I'm not sure it's going to help in this case, but I thought I'd mention it. And whilst on the subject, the test suite actually uses debug output as a logging facility. So I think it is an interesting point that you have raised: even if your problem turns out to be something else, we should have a test (probably a separate program), that does NOT use the serial output, but logs to a website or something.

Ashley

12 Nov 2012

Hi Ashley,

Its the K3770 I have. I'll have to check exact spec of the power supply but I think its about 9V, then use regular 7805 regulator plus couple of capacitors. I'll check the rating and try a different one if its not beefy enough.

I'll check this out when I get home and report back. thanks for a speedy response. much appreciated.

Cheers

Andy

12 Nov 2012

Connect the ground of the external powersupply to the ground on The mbed

12 Nov 2012

. . wrote:

Connect the ground of the external powersupply to the ground on The mbed

Stating the obvious here, it wouldn't work otherwise!

12 Nov 2012

Hi,

Had chance to look at a couple of things, the psu originally used was rated at 650mA. Now using one that's about 8V at 1200mA. PSU label says its 5V, but multimeter says different, hence the 8V!

Now I'm trying to redirect the debug output to one of the alternative uarts so that it doesnt depend on the usb cable being connected. Initial tests indicate that the code is stopping here and not moving on:

[START]
[DBG] Module ATCommandsInterface.cpp - Line 794: AT Thread started
[DBG] Module ATCommandsInterface.cpp - Line 797: AT Processing on hold

But when the usb cable is connected it pauses slightly here then continues.

Still investigating though...

Thanks

Andy

13 Nov 2012

Hi! I would like to use this VodafoneUSBModem stack in a prototype gadget. Is there any chance to get a version that can be compiled offline (for GCC ARM Embedded)? The current version seems to have issues with c++ compilation and libraries.

Br KL