Working with other features of the SARA U201 chip

Hey all,

Neat board! Really interested to start playing around with some of the other features on the embedded SARA-U201 chip. Looking at the MKRGSM lib, it seems only to concern itself with the operation of the onboard GSM modem (obviously!).

Wondering if anyone has any experience/seen any libs that'd work on the MKRGSM1400 for sending other AT commands down to the chip?

Alternatively, can one communicate via the U201's UART interface directly through pinouts exposed in the MKRGSM1400 board?

Hope this makes sense, and thanks!

Rik.

Whilst not quite what you wanted Sandeep gave in link in my post to the AT info.

Its really too early to see a lot for the 1400 but like you I am eager to play with it too.

Thanks, ballscrewbob. I've got a copy of the uBlox AT command reference and that's what prompted me to want 'lower-level' access to the U201 so that I could, essentially, build on Sandeep's excellent work on the MAKERGSM library and submitting a 'MAKERU201' library, for sending/working with other AT commands.

uBlox make a diagnostic utility (U-Center Windows) that needs a direct line of communication to the chip, i.e., through UART.

Overnight, I continued my research and stumbled across this page about SAMD. It suggests that pins 13 (RX) and 14 (RX) are configured as the onboard UART. I think that's the one I need to connect to in order to view the raw stream/AT command interface of the SARAU201.

So, now all I need is a 3.3v UART FTDI cable (I only have the 5v version to hand), and then I think that'll give me access to the chip directly so I can begin writing my own library and debugging etc.

If anyone thinks it'd be useful to share what I've done afterwards, let me know...

Cheers

Hi everyone,

The U201's UART pins are not exposed via the headers.

However, there's an example in the library of how to bridge the USB CDC port and the U201's UART. No need to deal with the nitty gritty details of the Sercom, everything can be accessed via SerialGSM.

SerialGSM will also take case of the flow control (CTS and RTS) pins connected. I'm not sure if it will work with U-Center, but please let us know if it works or not.

Out of curiosity, what features are you looking into? We'd be open to integrate them into the MKRGSM lib ...

Hi Sandeep,

Great, thanks for the quick reply. I'll give the SerialGSM class a shot.

Just checking, since the U201 pins aren't exposed via the headers, when you refer to "USB CDC" you're referring to the MKRGSM 1400's on-board USB serial?

With regards to the features I'm looking to work with, it's primarily the chip's GLONASS/CellLocate functions. The U201 is apparently very usable as a positioning device too, so coupled with the GSM connectivity in the MKR1400, this would be a really great feature to be able to work with.

Thanks

Rikp

Just checking, since the U201 pins aren't exposed via the headers, when you refer to "USB CDC" you're referring to the MKRGSM 1400's on-board USB serial?

Correct.

With regards to the features I'm looking to work with, it's primarily the chip's GLONASS/CellLocate functions. The U201 is apparently very usable as a positioning device too, so coupled with the GSM connectivity in the MKR1400, this would be a really great feature to be able to work with.

We might be one step ahead of you :slight_smile:

See the GsmLocation.ino example sketch. A new release of the library was released on Tuesday which contains this feature.

Functionality was added in pull request #5. Any feedback you have would be appreciated.

Firstly - awesome, you probably are one step ahead :wink:

Second - AMAZING! That looks great. Looking at the U201 docs though, there appear to be about a million different mechanisms the chip can be used to get location info (i.e. GLONASS - and variations - GSM location, combinations of these etc) and some of these will require a valid GSM connection to function while, presumably, GLONASS-only options will not.

This is why I wanted to look into sending custom AT commands to the chip to configure the location params needed.

But if you're already there great, I'll use that - or maybe expand it to take in params to configure which combination of sensors to use for location info?

Thanks!

The MKRGSM doesn't have an I2C GPS module connected to the U201 so from my understanding the GLONASS features will not work.

Please let us know the results of you experiments! Either here or via pull request on the MKRGSM lib's Github repo.

What location params and sensors were you looking at specifically?

The Sara utility fails here and crashes on win 7 x64 pro when you try to select a port.
Not traced the crash as didnt expect much from the utility although some neat looking features.

And for the download to the util it seems you can use a black hole email.

The Mcentre from UBlox however works just great.

Some of those examples rely on the "secret" function Sandeep and may need minor alterations for previous IDE's

I know a lot of users wont jump to the latest IDE until they are 100% sure about them or have other reasons to stick to earlier IDE's

Not sure if its needed but I loaded up the MKR1400 with the passthrough sketch Sandeep suggested.

Closed out the IDE
Fired up M-Centre
Whilst in the HOME screen.
Selected and set the same port I would use to upload sketches.
Clicked the "get info" button and away we went.

The AT terminal option is pretty nice too as there are trace and log options.
It shows almost all the commands you have tried even if you didnt know you had tried them.
Great for setting up an AT script too.

Think once you have an AT script it should not take much to copy / paste some things directly into a sketch to be able to get down and dirty with the 1400.

Clicking the WiFi page option allows you to query providers etc but on two occasions it also seemed to stall out MCentre.
Searching for networks takes about a minute.

EDIT...
Think I worked out the lock ups down to selecting a provider as the sim will not register being that it is a UK sim in Canada. I sort of expected some issues in this area but the utility itself is fantastic for first time users to set up the sim itself for time zones and all the other niceties without having to write a sketch to do so.

Very cool!

Not sure if its needed but I loaded up the MKR1400 with the passthrough sketch Sandeep suggested.

Yes, definitely needed!

The USB port on the MKR GSM1400 is connected to the SAMD21 MCU and not the SARA U-201. The sketch bridges the USB serial interface of the SAMD21 and the SARA U-201's UART. It also pulls the U-201 out of reset.

PC <-- USB --> SAMD21 <-- UART --> SARA U201

Some of those examples rely on the "secret" function Sandeep and may need minor alterations for previous IDE's

I know a lot of users wont jump to the latest IDE until they are 100% sure about them or have other reasons to stick to earlier IDE's

It should be backwards compatible with older IDE releases, there were no changes in Java IDE to support this feature. It's really just an extra file in the sketch folder that appears as a new tab. Create doesn't not display the file directly, but presents a more user friendly way to fill in the values.

If you have a specific sketch and IDE release that is causing issues, please let us know and we can look into it.

I may have been wrong or an update may have happened.
No seeing the SECRET tab is being made.

Didn't get that yesterday but I did some updates after that point for libs etc.

Also seeing the 15.0 update after deleting the original source folder yesterday too.
So you can ignore my other comment/post please about the lib issue or close it if you opened one.

Thanks guys, and sorry for the late reply as I have been travelling with work; less time for projects!

@ballscrewbob - that utility is absolutely great, I've been using it, thanks for sharing.

@sandeepmistry - good point about the MKR1400 not shipping with an onboard I2C GPS connected to the U201. I'm a little unclear about the process for connecting one to it, though, or whether that's actually possible, with the MKR1400. Any pointers you have here would be appreciated as it is such a neat little board, it would be great to be able to connect a GPS with minimum effort.

Thanks!

. I'm a little unclear about the process for connecting one to it, though, or whether that's actually possible, with the MKR1400. Any pointers you have here would be appreciated as it is such a neat little board, it would be great to be able to connect a GPS with minimum effort.

Unfortunately the I2C pins for the GPS connection are under the u-blox U201 module so this is not a possible for the average hobbyist to do. We'd recommend you get an external GPS module which can operate at 3.3V and connect it to the SAMD processor on board via the I2C or UART breakout pins.

Hey Guys,

Just found this thread, love that this chip has so many good example sketches and have been working on extending the Default SSL Sketch to do read and write operations to something like Thingspeak. Have a thread about it here: MKR GSM 1400 to thingspeak - Project Guidance - Arduino Forum

I've uploaded my code so far to here:

Hopefully I got the permissions right and you can see that example.

Still waiting for my SIM from Virgin GRRR