I want to connect a G120 to the internet via PPP over UART to a RPi. Is there a way to do this?
Is your RPi running Linux or Windows 10?
If Linux it should be possible to setup the serial port on the Pi to act as a PPP connection like they used to have for the old days when we used dial up modems. I am not familiar with the setup but Linux should have drivers for this. A quick search found this.
Ah I remember this. So I should treat it like dialup. Unfortunately its running Windows Iot. I’m not adverse to writing the code to support this function on IoT but I just don’t know where to begin. Looks like I’ve got to lookup some code to read from your link.
@ Mr. John Smith - No clue about Win10 IoT but Windows normally supports this natively. If you add a network connection in the network and sharing center, you can choose dialup using a com-port. Just tried on my Win10 machine, and its still there… :think:
@ njbuch - Not dial up, Dial In
@ Mr. John Smith - My point is the same, this is a part of windows natively. Take a look at this [url]Install and Configure RRAS on Windows Server 2012 R2 - YouTube for some inpiration as where to look…
The name of dial-in on windows is RAS.
I did some searches on Windows 10 IoT and could NOT find any hints to tell me that RAS is part of that…but not sure.
@ andre.m - Thanks for briefing the noobs! :whistle:
Sigh. This is why I want to write one; however I don’t know anything about how PPP works (I need a datasheet) nor how to actually route the data. I’m hoping that I can do low level packet manipulation on the RPi.
The link is: [url]http://ietf.org/rfc/rfc1661.txt[/url]
of course, PPP is one option. Or you could use your serial connection for sending data instead, and have the UWP on the Pi do the networking stuff on your behalf. Seems like you’re going down a path that has a use case of 1, which in my view means awfully low return on effort. Sure, networking from the G120 sounds great, and everyone should have it, but how much effort is it worth - versus throwing another wifi or Ethernet module on the thing?
I’m with Brett. If it absolutely MUST be Win10, I’d add Ethernet directly to the G120. I’d guess you could find a PPP implementation for Linux, but even then, you’re looking at a giant hassle, is my guess.
It’s because I want to be able to have an encrypted channel between the Cloud and the G120, and I don’t want to have to reinvent SSL.
Reinventing PPP isn’t going to be much of a smaller lift.
Hopefully, I’m not reinventing it but porting it. Also, if I did add another Ethernet jack to the solution, then what? I’d also need a switch or a hub, to connect the RPi and G120? That’s a hardware cost. Would that really be better?
My opinion? Yes. Without having done any research, it’s not obvious to me that it’s even possible to implement a PPP server in in .NET on Win10 IoT. I’m also skeptical you could get reasonable speeds.
More power to you if you can make it happen!
This may require low level access to the Ethernet chip. I wonder if Iot will allow a service that kind of access.
@ andre.m - Why would I need the Windows Driver Kit? It’s just for the IoT OS. Do I have to have that in order to make a driver for the IOT device?
@ Mr. John Smith - Yes, you’ll need the WDK, as described on the linked page.
So I switched the OS to Raspbarian and I followed some steps to setup PPP on the Host device (a RPi 2)
[url]Connect Model A to Model B via serial lines - Page 2 - Raspberry Pi Forums
The code that I’m using on the G120 has the following commands:
SendATCommand(port, "AT+CGDCONT=2,\"IP\",\"YOUR APN\""); SendATCommand(port, "ATDT*99***2#");
Would those be relevant in this scenario?