USING LINUX WITH EV3 DEVICES
MultiConnect
®
PCIe MTPCIE-EV3 Developer Guide
57
noauth
Step 2. Use a text editor to create a chat script containing the lines in the example below. In this example [APN]
should be replaced with the APN assigned by your cellular provider. Save the file as /etc/chatscripts/MAT1-chat.
Example chat script:
ABORT "ERROR"
ABORT "NO CARRIER"
ABORT "BUSY"
"" at+cgdcont=1,"IP","[APN]"
OK atd*99***1#
CONNECT ""
Step 3. Use the following command line to start pppd:
pppd debug call MAT1-peer
This command line enables logging of debug information and tells pppd to use the peer file referenced by the call
option. After 20-30 seconds, type ifconfig and check whether a ppp interface is listed. If it is not, then check syslog
for pppd and chat events. Normally pppd/chat logging is written to /var/log/syslog (could vary depending on syslog
configuration).
C Programming
The following topics show all the functions that can be used from C source code to perform read/write operations
on the serial devices.
open()
The
open()
function shall establish the connection between a file and a file descriptor. The file descriptor is used by
other I/O functions to refer to that file.
Header File
fcntl.h
Prototype:
int open(const char *pathname, int flags)
Parameters:
pathname – file name with its own path.
flags – is an
int
specifying file opening mode: is one of O_RDONLY, O_WRONLY or O_RDWR which request opening
the file read-only, write-only or read/write, respectively.
Returns
:
The new file descriptor
fildes
if successful, -1 otherwise.
Example
Open the /dev/ttyUSBx.
int fd; // file descriptor for the /dev/ttyUSBx entry
if((fd = open("/dev/ttyUSBx", O_RDONLY) < 0)
Summary of Contents for MultiConnect MTPCIE-EV3
Page 1: ...MultiConnect PCIe MTPCIE EV3 Developer Guide ...
Page 15: ...DEVELOPER BOARD MultiConnect PCIe MTPCIE EV3 Developer Guide 15 ...
Page 17: ...ASSEMBLY DIAGRAM MultiConnect PCIe MTPCIE EV3 Developer Guide 17 Bottom ...
Page 20: ...DEVELOPER BOARD SCHEMATICS 20 MultiConnect PCIe MTPCIE EV3 Developer Guide ...
Page 21: ...DEVELOPER BOARD SCHEMATICS MultiConnect PCIe MTPCIE EV3 Developer Guide 21 ...
Page 22: ...DEVELOPER BOARD SCHEMATICS 22 MultiConnect PCIe MTPCIE EV3 Developer Guide ...
Page 23: ...DEVELOPER BOARD SCHEMATICS MultiConnect PCIe MTPCIE EV3 Developer Guide 23 ...
Page 24: ...DEVELOPER BOARD SCHEMATICS 24 MultiConnect PCIe MTPCIE EV3 Developer Guide ...
Page 25: ...DEVELOPER BOARD SCHEMATICS MultiConnect PCIe MTPCIE EV3 Developer Guide 25 ...
Page 26: ...DEVELOPER BOARD SCHEMATICS 26 MultiConnect PCIe MTPCIE EV3 Developer Guide ...
Page 27: ...DEVELOPER BOARD SCHEMATICS MultiConnect PCIe MTPCIE EV3 Developer Guide 27 ...