2
votes

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

  1. Using GPRS and GSM Simulatneously
  2. Sending AT commands to SIM900 whilst pppd is active

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

  1. I followed this tutorial and downloaded the right linux headers for my BBB.
  2. I tried to compile the module as a Linux LKM (Loadable kernel module) as follows

  3. I downloaded the n_gsm.c from here

  4. The n_gsm.c file had some includes which were missing in my BBB. So I downloaded them.
  5. I created a makefile. My directory had n_gsm.c and Makefile

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 n_gsm errors

  • 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

  1. kernel - Linux beaglebone 3.8.13-bone79
  2. Distro - Debian 7.9 (wheezy)

Edit 2 : Added details about GSM module

  1. This is the GSM breakout board I'm using.
  2. It uses this module and you can checkout the command manual and multiplexing application note.

Update 1

  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.
  2. AT+CMUX=?, AT+CMUX? and AT+CMUX= geneated an error on the sim800H module.
  3. Here's the de-bugging I have done
    1. Played around with hardware/software and no flow. Didnt work in any mode.
    2. Set TE-TA fixed local rate AT+IPR to auto, 115200 and still AT+CMUX generates an error
    3. Tested AT+CMUX? on another sim900 module and that works.

Any idea why it does not work with sim800H?

1
what distribution you are using at your BB?Serge
Debian wheezy. I'll edit the post shortly to add more details about the BBB.am3
how the module is connected: over uart or usb?Serge
Over uart. The AT commands and PPP work individually.am3
I see. then I have no advice other than to resolve issues with source code you are trying to compile. sorry.Serge

1 Answers

1
votes

The make issue in the question has been solved by downloading the n_gsm.c from beaglebone's kernel source repository for the kernel version in use.