minicom from raspberry pi

94 views
Skip to first unread message

Osman Gutiérrez

unread,
Oct 9, 2014, 10:27:57 AM10/9/14
to via...@googlegroups.com
From vehiclepi's raspberry pi I am trying to connecting to ttyAMA0 with "minicom" command

$ minicom -o -b 500000 -D /dev/ttyAMA0


Welcome to minicom 2.6.1

OPTIONS: I18n 
Compiled on Apr 28 2012, 19:24:31.
Port /dev/ttyAMA0

Press CTRL-A Z for help on special keys

+GPS=$GPGGA,,,,,,0,00,,,M,0.0,M,,0000*48
+GPS=$GPGSA,A,1,,,,,,,,,,,,,,,*1E
+GPS=$GPGSV,3,1,12,01,00,000,,02,00,000,,03,00,000,,04,00,000,*7C
+GPS=$GPGSV,3,2,12,05,00,000,,06,00,000,,07,00,000,,08,00,000,*77
+GPS=$GPGSV,3,3,12,09,00,000,,10,00,000,,11,00,000,,12,00,000,*71
+GPS=$GPRMC,,V,,,,,,,,,,N*53
+GPS=$GPGGA,,,,,,0,00,,,M,0.0,M,,0000*48
+GPS=$GPGSA,A,1,,,,,,,,,,,,,,,*1E

I am receiving only +GPS and +TERM output, Is that nomal? What about +GSM?

Regards

Kalin Nakov

unread,
Oct 9, 2014, 10:36:56 AM10/9/14
to via...@googlegroups.com
By default the GSM is switched off. You need to enable it first.

Step 1:
Turn on the GSM's power supply
AT+CPU=GSM:ON
... wait for a couple of seconds

Step 2:
Switch on the GSM (activate it)
AT+CPU=GSM:SWITCH
... wait for a couple of seconds

Step 3:
Send a command to the GSM
AT+GSM=ATZ


When power saving is needed, you can switch off the GPS by
AT+CPU=GPS:SWITCH

Take a look at the VehiclePiDemoTCPConnectAsyncTask.java demo code to see how the GSM module is enabled and how to establish a bidirectional TCP connection. Note the timeouts when booting the GSM module.

Note: You have to provide 12V power supply, at least 1.5A on the mains plug to be able to use the GSM and ECU connectivity.

Osman Gutiérrez

unread,
Oct 10, 2014, 12:26:12 AM10/10/14
to via...@googlegroups.com
Hello Kalin,

Thanks for the hint. I changed VehiclePiDemoTCPConnectAsyncTask.java for launch it on Raspberry using /dev/ttyAMA0, I am getting this error.

>>> AT+CPU=GSM:SWITCH
An error has occurred: ?AT+CPU=GSM:SWITCH
Accelerometer horizontal acceleration: -0.232 m/s2
>>> AT+CPU=GSM:OFF
>>> AT+CPU=GSM:ON
>>> AT+CPU=GSM:SWITCH
>>> AT+GSM=ATZ

The same if I send these commands using minicom.

Note: I am using the raspberrypi with AC Power Supply.

Regars

Kalin Nakov

unread,
Oct 10, 2014, 2:52:43 AM10/10/14
to via...@googlegroups.com
Take a look at this topic: https://groups.google.com/forum/embed/?place=forum/viacont&showsearch=true&showpopout=true&parenturl=https%3A%2F%2Fwww.viacont.com%2Fsupport.html#!topic/viacont/EByh8uxhseo

The demo example did not reflect the work around for this Raspbian kernel bug. We will update the example in the next SDK release. In the meanwhile, you need to send a dummy command as the first command ever after opening the serial port. For example, send a plain vanilla empty string with IVehicleDriver.send("") or when in the minicom console, press Enter after opening the port. This will scoop out the garbage character and after that each command will work.


Reply all
Reply to author
Forward
0 new messages