Author Topic: DIY sim modem  (Read 280 times)

0 Members and 1 Guest are viewing this topic.

Offline Enrico

  • Newbie
  • Posts: 4
  • Country: it
  • Country: it
DIY sim modem
« on: June 24, 2019, 06:25:58 pm »
I'm starting a new project in wich i'd like to make my own sim router since the commercial ones are getting quite expensive.

i was looking to lcsc website for modules that i can use and i was thinking of using a SIM800C for sim internet connectivity, and then using an esp32 to generate a wifi signal that a user can connect to to get to the wonders of internet.

I've already read trougth the full datasheet and i didn't find any explanations of how to get on the internet and such, so now i'm wondering if it's even possible . . .

Could you help me to understand?

And if you know some, shouw some sample code?


thanks

enrico
 

Offline GromBeestje

  • Contributor
  • Posts: 42
  • Country: nl
  • Country: nl
Re: DIY sim modem
« Reply #1 on: July 05, 2019, 11:38:47 am »
I suppose you could use something like lwip ( https://savannah.nongnu.org/projects/lwip/ ) which support PPPoS.
In this case you want to do a PPP session, rather then let the modem handle the sockets, as you want to forward data from the wifi.

Then, first you initialise your modem, (things like unlock the SIM, connect to the network, enable data, set the APN, etc)
Then do a dial to start a PPP session, and hand over the serial communication to lwip, and lwip should handle the internet connection.



I don't know much about the ESP32 network layer, but you should basically implement some router that routes between the WiFi and the connection handled by lwip. If the WiFi end of the ESP32 can be fed into lwip, lwip should be able to handle this for you. I recall reading the ESP8266 SDK contained some lwip fork, so I can imagine this possibility exists.

WHen googeling for this, I found https://github.com/loboris/ESP32-PPPOS-EXAMPLE It mentions
Quote
Start WiFi and AP Enable WiFi, configure AP, start WebServer to test local WiFi and Internet over GSM/PPPoS connection
so this might already do what you're looking for
If that is the case, it boils down to sending the modem the right initialisation commands, hand it over to lwip, and let lwip handle the routing.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf