Pages: [1]   Go Down
Author Topic: Original Arduino GSM Library - change RX / TX to Hardware Serial  (Read 2372 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hej guys,

is anybody of you familiar with the original Arduino library gsm.h and can help me?

I need to change the rx tx pins from software serial to hardware serial (channel 2 on the Arduino Mega).

Is it possible?
I already tried the Rxpin / Txpin from GSM3Softserial.cpp to 16/17 (pins of Serial2 on the Mega) but it did not work.

Regards!
Logged

Madrid (Spain)
Offline Offline
Full Member
***
Karma: 0
Posts: 135
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

GSM3SoftSerial was designed for emulate a serial port by software, not for hardware native serial port. You have to modify it or create a new code for it.
If you can use a serial port emulate by software, RX pin must be a pin with support for interruptions.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your replay. I would have guessed this.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

is it possible for me to use Original Arduino GSM Library with other GSM shield (not original GSM shield as well) for example from DFRobot? if it could, in which part i must adjust?
Logged

Madrid (Spain)
Offline Offline
Full Member
***
Karma: 0
Posts: 135
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can modify it. The most important things are software serial communication, commands compatibility, software flow control and responses times.
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could you solve the problem? I have got the same problem. I want to use hardwareserial.
Logged

Madrid (Spain)
Offline Offline
Full Member
***
Karma: 0
Posts: 135
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

In theory, you can replace all references to SoftwareSerial with Serial class.
Logged

Pages: [1]   Go Up
Jump to: