I'm using simcom 800H cellular module with my BeagleBone Black which is very similar to the popular simcom 900. I want to do two main things with the simcom module
- Use AT commands to configure settings and send and receive messages
- Use ppp to enable internet access on the BBB through GPRS.
Now the obvious problem is that I cannot do both at the same time. I did a web search and found the following posts
The 2nd link has been particularly useful where one of the user has used the code on this repository.
The common theme has been to use the n_gsm
module. I tried to load the module using modprobe n_gsm
and it failed. Like the user mentioned the BBB also doesn't include the n_gsm module as default so I had to go and build a new kernel with n_gsm added as a module. However I'm having issues with including the n_gsm
as a module. Here are the steps I followed
- I followed this tutorial and downloaded the right linux headers for my BBB.
I tried to compile the module as a Linux LKM (Loadable kernel module) as follows
I downloaded the n_gsm.c from here
- The
n_gsm.c
file had some includes which were missing in my BBB. So I downloaded them. - I created a makefile. My directory had
n_gsm.c
andMakefile
Makefile
obj-m += n_gsm.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
This generated errors as shown in figure
I was able to successfully load a different module as shown in this (the hello world of kernel modules). I also dont understand why I need to recompile the entire linux kernel to create a LKM.
I feel I'm making some obvious errors as it looks we people were able to load this module successfully.
Is this the right way to load a module and specifically
n_gsm
. There isn't much document/tutorial on this.Is there a simpler way to do this multiplexing in case all thisdoes not workout? I really like the idea of AT commands for SMS and PPP for GPRS (instead of AT commands for both).
Any tips and suggestions will be really helpful!
Edit1 : Details about my BBB
- kernel - Linux beaglebone 3.8.13-bone79
- Distro - Debian 7.9 (wheezy)
Edit 2 : Added details about GSM module
- This is the GSM breakout board I'm using.
- It uses this module and you can checkout the command manual and multiplexing application note.
Update 1
- Thanks to @Serge, I was able to build the
n_gsm
module and add it without re-compiling the kernel. However, I still haven't been able to get the GSM module into mux mode. AT+CMUX=?
,AT+CMUX?
andAT+CMUX=
geneated an error on the sim800H module.- Here's the de-bugging I have done
- Played around with hardware/software and no flow. Didnt work in any mode.
- Set TE-TA fixed local rate
AT+IPR
to auto, 115200 and stillAT+CMUX
generates an error - Tested
AT+CMUX?
on another sim900 module and that works.
Any idea why it does not work with sim800H?