Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
1,870 Views

3G shield didn't work on Intel Edison

Hi

I have the Intel Edison and a 3G shield design by cooking hacks(SIM 5215E version),I connect the 3G shield with Intel Edison as the picture below:

https://drive.google.com/open?id=0B_9cxClOYF8taEdJdWZPbVRkcTA https://drive.google.com/open?id=0B_9cxClOYF8taEdJdWZPbVRkcTA

I have typed 2 Linux command to check the status of serial device

-dmesg | grep ttyMFD1:

[ 0.698163] 0000:00:04.2: ttyMFD1 at MMIO 0xff010100 (irq = 29) is a hsu_uart1_port_p

- stty -F /dev/ttyMFD1 -a:

speed 9600 baud; rows 0; columns 0; line = 0;

After that I upload my code

# include

char data[512];

int x;

void setup() {

Serial.begin(115200);

Serial1.begin(115200);

Serial.println("Hello");

Serial1.println("AT+CSQ");

Serial1.flush();

x=0;

do

{

while(Serial1.available()!=0);

data[x]=Serial1.read();

x++;

Serial.println(data[x-1]);

}

while (!(data[x-1]=='K'&&data[x-2]=='O'));

for (int i=0;i<=x;i++)

{Serial.println(data[i]);

delay(1000);

}

}

But when I open the serial monitor,It seem that it only appear:

Hello

ÿ

ÿ

...

Does anyone can help me fix this problem?

Thanks and regard

0 Kudos
8 Replies
Highlighted
Community Manager
11 Views

Hi Khoi,

 

 

Are you aware if this shield is compatible with the Edison board? I was looking at the Shield Test Report for the Edison and Galileo for similar shields to the one you are using, and I found one, the LinkSprote 3G + GPS Shield, and while it works well with the Galileo Gen 1 and 2 board it doesn't work with the Edison board. You can look at this here http://www.intel.com/content/dam/support/us/en/documents/Galileo-Edison_ShieldTestReport_330937-002.... http://www.intel.com/content/dam/support/us/en/documents/Galileo-Edison_ShieldTestReport_330937-002...., on page 125 and on. So I would first suggest you to check with the manufacturer.

 

Regarding your code, have you tried changing the baudrate to a lower value just to see what you get?

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Beginner
11 Views

Thanks for your answer,But now I have another problem : I have downloaded the "screen" package and I typed the following command:

-screen /dev/ttyMFD1 115200

But after that the serial screen go lag and nothing response to that command

Can you help me?

Thanks and regard

0 Kudos
Highlighted
Community Manager
11 Views

I suggest to use the standardized functions of (almost) every cellular module

For example take a look at the node-modem npm package: https://github.com/brugnara/node-modem/blob/master/examples/text_message.js node-modem/text_message.js at master · brugnara/node-modem · GitHub

It is really basic and just uses AT commands, but that should be enough for a first try

Remember to unlock your SIM, you may use the command

AT+CLCK="SC" , 0 , "1234"(insert your pin here)

to disable the pin permanent

Another page for getting started with the basics:

http://www.smssolutions.net/tutorials/gsm/sendsmsat/ Send SMS using AT commands

Flo1991

0 Kudos
Highlighted
Community Manager
11 Views

Hi Khoi,

 

 

Have you tried Flo's suggestion? Did you get better results with AT commands?

 

 

Regards,

 

-Pablo

 

0 Kudos
Highlighted
Beginner
11 Views

I have tried your suggestion and it work.Thanks you very much

0 Kudos
Highlighted
Beginner
11 Views

About the first question,I try to read AT from Serial0 by this program

"void loop() {

while (Serial.available())

{

Serial1.print((char)Serial.read());

Serial1.flush();

}

while (Serial1.available())

{

Serial.print((char)Serial1.read());

}

}"

It worked,I type AT command on Serial monitor and it response to me

But when I write another program similarity with the above,It doesn't response

void loop() {

delay(1000);

sendATcommand("AT+CSQ");

}

void sendATcommand(char* AT){

Serial1.print(AT);

Serial1.flush();

Serial.println((char)Serial1.read());

}

Help me pls,I am newbie to this

0 Kudos
Highlighted
Community Manager
11 Views

Hi Khoi,

 

 

What behavior are you getting? Are you getting any response when running this last code?

 

Have you tried to enter the AT+CSQ command manually by using your first code? The one that works fine. Do you get the expected signal quality report?

 

Also, check this post, you might get to some ideas from it, check ricovi's code, /thread/67707 https://communities.intel.com/thread/67707.

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Community Manager
11 Views

Hi Khoi,

 

 

Do you have updates on this case?

 

 

Regards,

 

-Pablo
0 Kudos