PPP with NNDK 3.0 and MODM7AE70

Discussion to talk about software related topics only.
Post Reply
ecasey
Posts: 153
Joined: Sat Mar 26, 2011 9:34 pm

PPP with NNDK 3.0 and MODM7AE70

Post by ecasey » Fri Mar 15, 2019 4:30 am

I am trying to integrate a GSM/GPRS (SIM868) working with PPP on the MODM7AE70.
So far, I have encountered the following issues.

1. In constants.h, PPP_PRIO is set to (44); CONFIG_SERVER_PRIO is also set to (44), so the OSTaskCreatewName in PPPDial() fails with no warning. Is there a reason for setting PPP_PRIO to the same priority as CONFIG_SERVER_PRIO? I set the PPP_PRIO to (46) and at least the task starts.

2. There seems to be several "endian" issues in ahdlc.cpp. I lost track of all of them, but here are the main ones:
a) In ahdlc.cpp - ahdlc_transmit() puts the two crc bytes into the packet in the wrong order.
b) In ahdlc.cpp - ahdlc_receive() at the //Adjust section, the compare if (*pWord != 0xFF03) always fails, it works if I change it to (*pWord != 0x03FF); same issue with the next compare if (*pWord & 0x0100) it works if I change it to if (*pWord & 0x0001).

3. There may also be some "endian" issues in PPP.cpp, but I lost track of changes because the iprintf(%X) function seems to print out in the wrong order. That confused me and I made a lot of changes, which I subsequently changed back. At some point, I will have to clean up my altered PPP.cpp file and do a compare to the original.

I have gotten the PPP running but still have issues.

After sending a config packet, reading the config packet from the GMRS, and sending back an ACK, there is a read of part of a packet from the GMRS, and then the Restart_Interval expires (not matter how high it is set) and a new config packet is sent. After that, the receive packet completes, but with a new id and I get a "Got ACK For wrong seq" message.

The negotiations progress until I get an IPADDR4 from the GMRS and then the connection drops.

I suspect that there is an endian issue that I missed, but I haven't been able to debug it yet.

Any help or advise would be appreciated.

Ed

User avatar
pbreed
Posts: 777
Joined: Thu Apr 24, 2008 3:58 pm

Re: PPP with NNDK 3.0 and MODM7AE70

Post by pbreed » Fri Mar 15, 2019 9:56 am

This has been on my todo list for awhile...
I've not gotten to it....so no specific advice.

For endian ness, for network protocol stuff we have been using the

beuint32_t
and beuint16_t

types, they correctly convert to/from big endian as appropriate for platform, ie they work for both the 3.0 coldfire and 3.0 Arm m7.

User avatar
pbreed
Posts: 777
Joined: Thu Apr 24, 2008 3:58 pm

Re: PPP with NNDK 3.0 and MODM7AE70

Post by pbreed » Fri Mar 15, 2019 10:03 am

Heres ia a ahdlc modfied to use beuint types...
Attachments
ahdlc.cpp
(12.3 KiB) Downloaded 10 times

ecasey
Posts: 153
Joined: Sat Mar 26, 2011 9:34 pm

Re: PPP with NNDK 3.0 and MODM7AE70

Post by ecasey » Fri Mar 15, 2019 10:12 am

Thanks, that looks promising.

Is it a problem to use priority 46 for PPP? That puts it lower than HTTP.

User avatar
pbreed
Posts: 777
Joined: Thu Apr 24, 2008 3:58 pm

Re: PPP with NNDK 3.0 and MODM7AE70

Post by pbreed » Fri Mar 15, 2019 10:29 am

No that priority should be fine.
(I checked in the prio change and the ahdlc changes in to our source...)
If you could open a ticket and attach your PPP I'll try to get to this next week.

Paul

Post Reply