4G_LTE Click Library Example for STM32

Discuss with MikroElektronika software developers about current library development.
Post Reply
Author
Message
DSPR
Posts: 28
Joined: 09 May 2013 14:32

4G_LTE Click Library Example for STM32

#1 Post by DSPR » 04 Jan 2019 22:58

Can anyone give me some pointers on how to make the 4G_LTE Click Libray SDK example designed for the STM107 work for the STM32 M4?

How do you set the i/o pins for a different mikroBus now they are all hidden in the SDK code???

For my test I want to use the Mikromeda for STM32 with a mikrobus shield on MikroBus 1- How do I configure the library code for that?

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: 4G_LTE Click Library Example for STM32

#2 Post by stefan.filipovic » 08 Jan 2019 17:35

Hi,

Please find the project for 4G LTE Click for STM32F407VG MCU in the attachment.

You can see every declaration and initialization in the mikroSDK code, just press Ctrl+D on each function you want to see.

Kind regards,
Attachments
STM.zip
(315.94 KiB) Downloaded 120 times
Stefan Filipović

DSPR
Posts: 28
Joined: 09 May 2013 14:32

Re: 4G_LTE Click Library Example for STM32

#3 Post by DSPR » 15 Jan 2019 16:05

Thanks I'll give it a go..

However looking at the SDK commands avaliable it won't work for large TCP transfers?

For example if I want to send a TCP string 512 chars long, usually I split it up to save on memory but each single send (c4glte_cmdSingle) will add the CR+LF which wont working this case?

This works (without the SDK):

eg:
UART2_Write_Text("AT+USOWR=0,512,\""); //TCP send + start "
UART2_Write_Text("Data0:00, ");
.
.
.
UART2_Write_Text("Datax:00"); //total 512 chars
UART2_Write('"'); //end "
UART2_Write(13);//CR
UART2_Write(10);//LF


How would you achieve this using the SDK?

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: 4G_LTE Click Library Example for STM32

#4 Post by stefan.filipovic » 16 Jan 2019 17:20

Hi,

You can use it with one string variable and strcpy-strcat functions from C_String library, as shown in our older examples in the example of AT command for SMS sending.
Here is the link to older examples.

Kind regards,
Stefan Filipović

DSPR
Posts: 28
Joined: 09 May 2013 14:32

Re: 4G_LTE Click Library Example for STM32

#5 Post by DSPR » 25 Jan 2019 04:18

Thanks for your reply, I can see this would work, however as I said you have to allocate a lot of memory in this case (512 in my case):

>>
char tmp[ 30 ];
char cmdContent[ 30 ];
char replyContent[ 256 ];

strcpy( cmdContent, "AT+CMGS=" );
strcat( cmdContent, "\"+38162570878\"" );
strcpy( replyContent, "4G LTE by MikroE rocks!" );
AT_cmdDouble( cmdContent, replyContent );
<<

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: 4G_LTE Click Library Example for STM32

#6 Post by stefan.filipovic » 25 Jan 2019 14:52

Hi,

You can modify the function sendText from AT_Parser.c, just remove \r\n from LOG text parameter. Or even better, copy this function, but with another name and call this new function in the AT_CmdSingle function body instead of sendText.

Kind regards,
Stefan Filipović

Post Reply

Return to “Library Development Discussion”