2

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?

Community
  • 1
  • 1
am3
  • 681
  • 2
  • 12
  • 30

1 Answers1

1

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.

Serge
  • 6,088
  • 17
  • 27
  • I was able to load the module and stuff. However, getting the gsm module to work in mux mode is an issue (see update 1). Any pointers? – am3 Jun 08 '16 at 03:12
  • Unfortunately, I have no such module, so I can't reproduce the scenario, sorry. – Serge Jun 09 '16 at 07:26