SIMcom SIM7906E

Hi there,

After 20 year break playing again with FreeBSD. I am trying to get SIMcom SIM7906E LTE PCIe module work on mini PC (witt 4x LAN). This module is using pretty much the same AT command set than SIM7600E (that is very close to SIM7100E). I have found a patch, where support for SIM7600E has been added:


What happens is, that I can see the SIM7906E during the boot as recognized USB device, but without any (com) ports. SIM7xxx they should to have 6x com/tty ports, where one of them (3rd I think) is interface for AT command. And when there is no tty ports found out, using the module with pfSense does not work.

I don't have SIM7100/7600E in my hand so that I could verify how does it look in FreeBSD. Any ideas what should to be done, check, patched, that this module could get online with FreeBSD.

I am now working with pfSense distribution with 11.2 FreeBSD.

All comments welcome!
 
If you look at the patch you found it adds VendorID(VID) and ProductID(PID).
So first you need to see if your module has the same VID and PID.
Start with finding the ugen address:
usbconfig
Then use that to probe the device:
usbconfig -d (ugen goes here) dump_device_desc
idProduct=PID
idVendor=VID

Code:
usbconfig -d ugen1.3 dump_device_desc
ugen1.3: <Sierra Wireless, Incorporated MC7700> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (0mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0000
  bMaxPacketSize0 = 0x0040
  idVendor = 0x1199
  idProduct = 0x68a3
  bcdDevice = 0x0006
  iManufacturer = 0x0003  <Sierra Wireless, Incorporated>
  iProduct = 0x0002  <MC7700>
  iSerialNumber = 0x0004  <012626000778678>
  bNumConfigurations = 0x0001
Drop off the '0x' prefix and you have the VID and PID.
You know that the VID is supported, so look at the PID and search the source code files u3g.c and usbdevs for the PID.
If it is not found you will need to add it and recompile the kernel.'

These instructions are for FreeBSD so you need to keep that in mind. pfSense could be different in some regards.
OPNSense is closer to base FreeBSD I suppose.
 
Thanks, it says like this, I will check u3g.c & usbdevs, how far they are from this.
reg. matti
Code:
ugen0.3: <SIMCom Wireless Solutions SIM7906 Serials> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0000
  bMaxPacketSize0 = 0x0040
  idVendor = 0x1e0e
  idProduct = 0x9001
  bcdDevice = 0x0310
  iManufacturer = 0x0001  <SIMCom Wireless Solutions>
  iProduct = 0x0002  <SIM7906 Serials>
  iSerialNumber = 0x0003  <0123456789ABCDEF>
  bNumConfigurations = 0x0001
 
I can see the SIM7906E during the boot as recognized USB device, but without any (com) ports.
Actually the message you see at boot is just what the hardware is reporting in as. It still needs to attach to the driver.
Do you see u3g on grepping dmesg?
Code:
u3g0 on uhub2
u3g0: <Sierra Wireless, Incorporated MC7700, class 0/0, rev 2.00/0.06, addr 3> on usbus1
u3g0: Found 6 ports.

Your module does have the VID & PID included with FreeBSD. It shares the same PID as the 7600E
 
It looks to me like you need to add the device to u3g.c and recompile kernel(or at least the u3g module).

/usr/src/sys/dev/usb/serial/u3g.c
Line 211
U3G_DEV(ALINK, SIM7600E, 0),

Add a new line below the above entry with the following:
U3G_DEV(ALINK, SIM7906, 0),

Then recompile u3g.
You could probably do this on FreeBSD and then copy the module to *Sense
 
There is a possibility you don't need to add anything to u3g.c
I see from this page that the modem uses several different protocols.
Notice that this page shows how to switch module to MBIM for Windows usage.
You might need to switch your module into DirectIP mode from MBIM.
FreeBSD needs DirectIP mode to work with serial consoles and PPP for connections.
Perhaps your module is in MBIM mode and you need to switch it. If so use a AT console in Windows.

These are the AT commands to switch it to MBIM, you need to find the numeric code (Not 9003,1,1) to switch it to other mode.
AT+CUSBPIDSWITCH=9003,1,1
AT+CRESET
Beware that Windows 10 can automatically switch modules to MBIM with a firmware update and that will not work on FreeBSD.
 
Looking at the PDF manual on page 75 your module is using the correct mode. When you switch modes the module PID changes.
Your module is PID=9001 and that is what is supported by FreeBSD.
From the manual:
9001: Diag, NMEA, At, Modem, Audio, Rmnet
Wheras the MBIM setting of 9003
9003: Diag, NMEA, At, Modem, Audio, MBIM
 
I am pretty sure my original prognosis was correct.
FreeBSD is expecting a SIM7600E device when it is presented with VID=1e0e / PID=9001
Your module is SIM7906 so it does not attach to u3g.
Like I wrote above you can add it to u3g.c and recompile.
There are other ways too. Perhaps a devd.conf setting or we have a new method in FreeBSD 12.
devmatch
 
I have a SIM7600E

ugen0.4: <SimTech, Incorporated SimTech, Incorporated> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0200
bDeviceClass = 0x0000 <Probed by interface class>
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x1e0e
idProduct = 0x9001
bcdDevice = 0x0318
iManufacturer = 0x0001 <SimTech, Incorporated>
iProduct = 0x0002 <SimTech, Incorporated>
iSerialNumber = 0x0003 <0123456789ABCDEF>
bNumConfigurations = 0x0001

I'm having an issue in Freebsd 12.0 p10 whereby I get the serial interfaces but it never connects to the mobile network. I've tried the card in Windows 10 and get the same issue. Its like there is a hardware switch and its turned off.

anyway changing to mode 9003: Diag, NMEA, At, Modem, Audio, MBIM in Windows then works, I can connect to Internet.

Obvious I can't use mode 9003 in Freebsd, is that correct?

Incidentally this is on pfsense 2.5.0
 
Back
Top