Simcom SIM800 gprs data connection not working
Dear All,
I made a new project with the Simcom SIM800C GPRS chip.
The module has two serial port that are connected to a CP2016 USB-to-UART chip. After some work i get the module working with the sim900 driver that supports also the SIM800.
I can dial numbers read and sen SMS messages, etc, etc. I works fine.
Now, I have problem with the gprs connection.
I cannot use the official testing programs because they require python that is not available in my poor buildroot rootfs, but I have the dbus-send utility.
Here is the situation.
The modem is up and ruinning:
# dbus-send --system --print-reply --dest=org.ofono /
org.ofono.Manager.GetModems
method return time=1557938457.226027 sender=:1.3 -> destination=:1.22
serial=79 reply_serial=2
array [
struct {
object path "/sim900_0"
array [
dict entry(
string "Online"
variant boolean true
)
dict entry(
string "Powered"
variant boolean true
)
dict entry(
string "Lockdown"
variant boolean false
)
dict entry(
string "Emergency"
variant boolean false
)
dict entry(
string "Manufacturer"
variant string "SIMCOM_Ltd"
)
dict entry(
string "Model"
variant string "SIMCOM_SIM800C"
)
dict entry(
string "Revision"
variant string "Revision:1418B06SIM800C24"
)
dict entry(
string "Serial"
variant string "869270046863956"
)
dict entry(
string "SystemPath"
variant string
"/sys/devices/soc0/soc/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.1/1-1.1:1.1/ttyUSB1"
)
dict entry(
string "Interfaces"
variant array [
string "org.ofono.Phonebook"
string "org.ofono.SmartMessaging"
string "org.ofono.PushNotification"
string "org.ofono.MessageManager"
string "org.ofono.CallVolume"
string "org.ofono.VoiceCallManager"
string "org.ofono.ConnectionManager"
string "org.ofono.SupplementaryServices"
string "org.ofono.NetworkRegistration"
string "org.ofono.AllowedAccessPoints"
string "org.ofono.SimManager"
]
)
dict entry(
string "Features"
variant array [
string "sms"
string "gprs"
string "ussd"
string "net"
string "sim"
]
)
dict entry(
string "Type"
variant string "hardware"
)
]
}
]I created a new internet context with a working configuration (tested in another platform):
# dbus-send --system --print-reply --dest=org.ofono /sim900_0/context1 org.ofono.ConnectionContext.GetProperties method return time=1557937482.290288 sender=:1.3 -> destination=:1.17 serial=71 reply_serial=2 array [ dict entry( string "Name" variant string "Internet" ) dict entry( string "Active" variant boolean false ) dict entry( string "Type" variant string "internet" ) dict entry( string "Protocol" variant string "ip" ) dict entry( string "AccessPointName" variant string "tre.it" ) dict entry( string "Username" variant string "user" ) dict entry( string "Password" variant string "password" ) dict entry( string "AuthenticationMethod" variant string "pap" ) dict entry( string "Settings" variant array [ ] ) dict entry( string "IPv6.Settings" variant array [ ] ) ]
but when I try to Activate the context it gives me this error:
# dbus-send --system --print-reply --dest=org.ofono /sim900_0/context1 org.ofono.ConnectionContext.SetProperty string:"Active" variant:boolean:true Error org.ofono.Error.NotImplemented: Implementation not provided
and the "Active" property stay false.
What's wrong?
Any suggestion is very appreciated.
Hi Riccardo,
Quoted 5 lines
# dbus-send --system --print-reply --dest=org.ofono /sim900_0/context1 org.ofono.ConnectionContext.SetProperty string:"Active" variant:boolean:true Error org.ofono.Error.NotImplemented: Implementation not provided
This basically means that no gprs_context atom has been created by the modem driver or the driver initialization has failed. Briefly looking at plugins/sim900.c, I can see that only sim900 (not sim800) supports gprs. Given that you get this far, I assume you hacked this part to create gprs/gprs_context...
The other place to look is to see whether the 'atmodem' gprs_context driver is working properly. Perhaps you're missing the TUN/TAP support in your kernel? Run 'sudo modprobe tun' and see if that fixes things.
See drivers/atmodem/gprs-context.c for more details.
Regards,
-Denis
Thank you Danis for your support.
The problem was the missing TAP/TUN support in my kernel! Now everything is working.
The sim800 is similar to sim900, it has the same features. I've made this little fix to sim900.c:
420c420
< if (data->modem_type == SIM900) {
---
Quoted 1 line
if ((
data->modem_type== SIM900) || (data->modem_type== SIM800)) {
to enable sms and gprs for the SIM800.
Regards
Da: "Denis Kenzior" denkenz(a)gmail.com
A: "Riccardo Sala" riccardo.sala(a)springtech.it, ofono(a)ofono.org Cc:
Data: Thu, 16 May 2019 10:39:59 -0500
Oggetto: Re: Simcom SIM800 gprs data connection not working
Hi Riccardo,
Quoted 5 lines
# dbus-send --system --print-reply --dest=org.ofono /sim900_0/context1 org.ofono.ConnectionContext.SetProperty string:"Active" variant:boolean:true Error org.ofono.Error.NotImplemented: Implementation not provided
This basically means that no gprs_context atom has been created by the modem driver or the driver initialization has failed. Briefly looking at plugins/sim900.c, I can see that only sim900 (not sim800) supports gprs. Given that you get this far, I assume you hacked this part to create gprs/gprs_context...
The other place to look is to see whether the 'atmodem' gprs_context driver is working properly. Perhaps you're missing the TUN/TAP support in your kernel? Run 'sudo modprobe tun' and see if that fixes things.
See drivers/atmodem/gprs-context.c for more details.
Regards,
-Denis