Coder Social home page Coder Social logo

supl's Issues

Server always returning -2

Hey, I've compiled and run the program with no errors, but the program seems to always returning -2.
This is the setups I have tried so far:
I've set up a currect location with the SUPL_FAKE_POS env, and took the mcc,mnc,lat,cid from my modem which still returned -2.
I tried to play with the configuration in your example which result with the same "SUPL protocol error -2"

It seems that the problem is in supl_ulp_encode fucntion at the supl.c file.
the function at uper_encode_to_buffer returns -1. which in the end result in E_SUPL_ENCODE_START
(which is the -2 error)

SSL problem

Good afternoon. I managed to build everything from source, but every time I try to start the proxy, I get an error
Error: Valid server certificate not found in srv-cert.pem

OpenSSl veriosn 1.1.1f
ubuntu 22.04

Compile Error

I get an error when trying to compile from source. It seems like the compiler is not generating the ENUMERATED.o file in the asn-supl directory. Here are the steps I took:

Steps to reproduce

./configure --enable-debug --enable-supl-debug
make

Expected
supl-client compiles

Actual
Error:

make[3]: *** No rule to make target 'ENUMERATED.o', needed by 'libasnsupl.a'.  Stop.

Environment
box: Ubuntu 16.04.6 LTS
asn1c: v0.9.27 (also tried on v0.9.28 and latest master)

I know I can configure with the --precompiled-asn1 option, but I'm trying to debug my SUPL connection and I believe that the precompiled doesn't include debugging? The reason being is a simple test like supl-client -t 3 <supl url> produces SUPL protocol error -1. This could happen for several reasons, which is why I would like the debugging statements.

IPV6 support

How to enable IPV6 support. supl server listen on ipv6.

always SUPL protocol error -2

Seems asn1 parser fails on ulp start but I can not understand what error is . Could you please assist?

Host info:

user@host:/work/temp/supl/src$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
user@host:
/work/temp/supl/src$ uname -a
Linux vs-lenovo-t15 5.19.0-38-generic #39~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 17 21:16:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Problem log:

$ LD_LIBRARY_PATH=$PWD ./supl-client -t 3
uper_encode_to_buffer
Encoding "ULP-PDU" using UNALIGNED PER (per_encoder.c:40)
Encoding ULP-PDU as SEQUENCE (UPER) (constr_SEQUENCE.c:1312)
ext_after = -1, ec = 4, eb = -1 (constr_SEQUENCE.c:1362)
About to encode INTEGER (constr_SEQUENCE.c:1373)
Encoding ULP-PDU->length (constr_SEQUENCE.c:1395)
Encoding NativeInteger INTEGER 0 (UPER) (NativeInteger.c:282)
Value 0 (00/1) lb 0 ub 65535 fix (INTEGER.c:712)
Encoding integer with range 16 bits (INTEGER.c:730)
[PER put 16 bits 0 to 0x7ffee6430668+0 bits] (per_support.c:277)
[PER out 16 0/0 (t=0,o=16) 90&0=0] (per_support.c:315)
[PER out 0/0 => 00 buf+0] (per_support.c:344)
Freeing INTEGER as a primitive type (asn_codecs_prim.c:125)
About to encode Version (constr_SEQUENCE.c:1373)
Encoding ULP-PDU->version (constr_SEQUENCE.c:1395)
Encoding Version as SEQUENCE (UPER) (constr_SEQUENCE.c:1312)
ext_after = -1, ec = 3, eb = -1 (constr_SEQUENCE.c:1362)
About to encode INTEGER (constr_SEQUENCE.c:1373)
Encoding Version->maj (constr_SEQUENCE.c:1395)
Encoding NativeInteger INTEGER 1 (UPER) (NativeInteger.c:282)
Value 1 (01/1) lb 0 ub 255 fix (INTEGER.c:712)
Encoding integer with range 8 bits (INTEGER.c:730)
[PER put 8 bits 1 to 0x7ffee6430668+16 bits] (per_support.c:277)
[PER out 8 1/1 (t=0,o=8) 5c&0=0] (per_support.c:315)
[PER out 1/1 => 01 buf+2] (per_support.c:344)
Freeing INTEGER as a primitive type (asn_codecs_prim.c:125)
About to encode INTEGER (constr_SEQUENCE.c:1373)
Encoding Version->min (constr_SEQUENCE.c:1395)
Encoding NativeInteger INTEGER 0 (UPER) (NativeInteger.c:282)
Value 0 (00/1) lb 0 ub 255 fix (INTEGER.c:712)
Encoding integer with range 8 bits (INTEGER.c:730)
[PER put 8 bits 0 to 0x7ffee643066a+8 bits] (per_support.c:277)
[PER out 8 0/0 (t=0,o=8) dd&0=0] (per_support.c:315)
[PER out 0/0 => 00 buf+3] (per_support.c:344)
Freeing INTEGER as a primitive type (asn_codecs_prim.c:125)
About to encode INTEGER (constr_SEQUENCE.c:1373)
Encoding Version->servind (constr_SEQUENCE.c:1395)
Encoding NativeInteger INTEGER 0 (UPER) (NativeInteger.c:282)
Value 0 (00/1) lb 0 ub 255 fix (INTEGER.c:712)
Encoding integer with range 8 bits (INTEGER.c:730)
[PER put 8 bits 0 to 0x7ffee643066b+8 bits] (per_support.c:277)
[PER out 8 0/0 (t=0,o=8) ef&0=0] (per_support.c:315)
[PER out 0/0 => 00 buf+4] (per_support.c:344)
Freeing INTEGER as a primitive type (asn_codecs_prim.c:125)
About to encode SessionID (constr_SEQUENCE.c:1373)
Encoding ULP-PDU->sessionID (constr_SEQUENCE.c:1395)
Encoding SessionID as SEQUENCE (UPER) (constr_SEQUENCE.c:1312)
Element ptr wtv SessionID->setSessionID is present (constr_SEQUENCE.c:1351)
[PER put 1 bits 1 to 0x7ffee643066c+8 bits] (per_support.c:277)
[PER out 1 1/1 (t=0,o=1) 7f&0=0] (per_support.c:315)
[PER out 128/80 => 80 buf+5] (per_support.c:344)
Element ptr wtv SessionID->slpSessionID is absent (constr_SEQUENCE.c:1351)
[PER put 1 bits 0 to 0x7ffee643066d+1 bits] (per_support.c:277)
[PER out 1 0/0 (t=1,o=2) 80&80=80] (per_support.c:315)
[PER out 0/0 => 80 buf+5] (per_support.c:344)
ext_after = -1, ec = 2, eb = -1 (constr_SEQUENCE.c:1362)
About to encode SetSessionID (constr_SEQUENCE.c:1373)
Encoding SessionID->setSessionID (constr_SEQUENCE.c:1395)
Encoding SetSessionID as SEQUENCE (UPER) (constr_SEQUENCE.c:1312)
ext_after = -1, ec = 2, eb = -1 (constr_SEQUENCE.c:1362)
About to encode INTEGER (constr_SEQUENCE.c:1373)
Encoding SetSessionID->sessionId (constr_SEQUENCE.c:1395)
Encoding NativeInteger INTEGER 1 (UPER) (NativeInteger.c:282)
Value 1 (01/1) lb 0 ub 65535 fix (INTEGER.c:712)
Encoding integer with range 16 bits (INTEGER.c:730)
[PER put 16 bits 1 to 0x7ffee643066d+2 bits] (per_support.c:277)
[PER out 16 1/1 (t=2,o=18) 80&c0=80] (per_support.c:315)
[PER out 64/40 => 80 buf+5] (per_support.c:344)
Freeing INTEGER as a primitive type (asn_codecs_prim.c:125)
About to encode SETId (constr_SEQUENCE.c:1373)
Encoding SetSessionID->setId (constr_SEQUENCE.c:1395)
Encoding SETId as CHOICE (constr_CHOICE.c:919)
Encoding SETId CHOICE element 3 (constr_CHOICE.c:941)
[PER put 1 bits 0 to 0x7ffee643066d+18 bits] (per_support.c:277)
[PER out 1 0/0 (t=2,o=3) 40&c0=40] (per_support.c:315)
[PER out 0/0 => 40 buf+7] (per_support.c:344)
[PER put 3 bits 3 to 0x7ffee643066f+3 bits] (per_support.c:277)
[PER out 3 3/3 (t=3,o=6) 40&e0=40] (per_support.c:315)
[PER out 12/c => 4c buf+7] (per_support.c:344)
Encoding OCTET STRING into 8 units of 8 bits (8..8, effective 0) (OCTET_STRING.c:1568)
Encoding 8 bytes (0), length in 0 bits (OCTET_STRING.c:1601)
Squeezing 8 characters into (0..0):8 (1 bpc) (OCTET_STRING.c:1264)
[PER put 24 bits ffff91 to 0x7ffee643066f+6 bits] (per_support.c:277)
[PER out 24 16777105/ffff91 (t=6,o=30) 4c&fc=4c] (per_support.c:315)
[PER out 67108420/3fffe44 => 4f buf+7] (per_support.c:344)
[PER put 24 bits 944845 to 0x7ffee643066f+30 bits] (per_support.c:277)
[PER out 24 9717829/944845 (t=6,o=30) 44&fc=44] (per_support.c:315)
[PER out 38871316/2512114 => 46 buf+10] (per_support.c:344)
[PER put 16 bits 8398 to 0x7ffee6430672+30 bits] (per_support.c:277)
[PER out 16 33688/8398 (t=6,o=22) 14&fc=14] (per_support.c:315)
[PER out 134752/20e60 => 16 buf+13] (per_support.c:344)
About to encode SlpSessionID (constr_SEQUENCE.c:1373)
Element slpSessionID 1 not present (constr_SEQUENCE.c:1379)
About to encode UlpMessage (constr_SEQUENCE.c:1373)
Encoding ULP-PDU->message (constr_SEQUENCE.c:1395)
Encoding UlpMessage as CHOICE (constr_CHOICE.c:919)
Encoding UlpMessage CHOICE element 1 (constr_CHOICE.c:941)
[PER put 1 bits 0 to 0x7ffee6430675+22 bits] (per_support.c:277)
[PER out 1 0/0 (t=6,o=7) 60&fc=60] (per_support.c:315)
[PER out 0/0 => 60 buf+15] (per_support.c:344)
[PER put 3 bits 1 to 0x7ffee6430677+7 bits] (per_support.c:277)
[PER out 3 1/1 (t=7,o=10) 60&fe=60] (per_support.c:315)
[PER out 64/40 => 60 buf+15] (per_support.c:344)
Encoding SUPLSTART as SEQUENCE (UPER) (constr_SEQUENCE.c:1312)
[PER put 1 bits 0 to 0x7ffee6430677+10 bits] (per_support.c:277)
[PER out 1 0/0 (t=2,o=3) 40&c0=40] (per_support.c:315)
[PER out 0/0 => 40 buf+16] (per_support.c:344)
Element ptr wtv SUPLSTART->qoP is absent (constr_SEQUENCE.c:1351)
[PER put 1 bits 0 to 0x7ffee6430678+3 bits] (per_support.c:277)
[PER out 1 0/0 (t=3,o=4) 40&e0=40] (per_support.c:315)
[PER out 0/0 => 40 buf+16] (per_support.c:344)
ext_after = 2, ec = 3, eb = 4 (constr_SEQUENCE.c:1362)
About to encode SETCapabilities (constr_SEQUENCE.c:1373)
Encoding SUPLSTART->sETCapabilities (constr_SEQUENCE.c:1395)
Encoding SETCapabilities as SEQUENCE (UPER) (constr_SEQUENCE.c:1312)
[PER put 1 bits 0 to 0x7ffee6430678+4 bits] (per_support.c:277)
[PER out 1 0/0 (t=4,o=5) 40&f0=40] (per_support.c:315)
[PER out 0/0 => 40 buf+16] (per_support.c:344)
ext_after = 2, ec = 3, eb = 4 (constr_SEQUENCE.c:1362)
About to encode PosTechnology (constr_SEQUENCE.c:1373)
Encoding SETCapabilities->posTechnology (constr_SEQUENCE.c:1395)
Encoding PosTechnology as SEQUENCE (UPER) (constr_SEQUENCE.c:1312)
[PER put 1 bits 0 to 0x7ffee6430678+5 bits] (per_support.c:277)
[PER out 1 0/0 (t=5,o=6) 40&f8=40] (per_support.c:315)
[PER out 0/0 => 40 buf+16] (per_support.c:344)
ext_after = 6, ec = 7, eb = 8 (constr_SEQUENCE.c:1362)
About to encode BOOLEAN (constr_SEQUENCE.c:1373)
Encoding PosTechnology->agpsSETassisted (constr_SEQUENCE.c:1395)
[PER put 1 bits 0 to 0x7ffee6430678+6 bits] (per_support.c:277)
[PER out 1 0/0 (t=6,o=7) 40&fc=40] (per_support.c:315)
[PER out 0/0 => 40 buf+16] (per_support.c:344)
uper_encode_internal -1
Failed to encode element ULP-PDU (per_encoder.c:153)
Freeing ULP-PDU as SEQUENCE (constr_SEQUENCE.c:958)
Freeing INTEGER as INTEGER (1, 0x5568a213f400, Native) (NativeInteger.c:325)
Freeing Version as SEQUENCE (constr_SEQUENCE.c:958)
Freeing INTEGER as INTEGER (1, 0x5568a213f408, Native) (NativeInteger.c:325)
Freeing INTEGER as INTEGER (1, 0x5568a213f410, Native) (NativeInteger.c:325)
Freeing INTEGER as INTEGER (1, 0x5568a213f418, Native) (NativeInteger.c:325)
Freeing SessionID as SEQUENCE (constr_SEQUENCE.c:958)
Freeing SetSessionID as SEQUENCE (constr_SEQUENCE.c:958)
Freeing INTEGER as INTEGER (1, 0x5568a213f600, Native) (NativeInteger.c:325)
Freeing SETId as CHOICE (constr_CHOICE.c:1038)
Freeing OCTET STRING as OCTET STRING (OCTET_STRING.c:1725)
Freeing UlpMessage as CHOICE (constr_CHOICE.c:1038)
Freeing SUPLSTART as SEQUENCE (constr_SEQUENCE.c:958)
Freeing SETCapabilities as SEQUENCE (constr_SEQUENCE.c:958)
Freeing PosTechnology as SEQUENCE (constr_SEQUENCE.c:958)
Freeing PrefMethod as a primitive type (asn_codecs_prim.c:125)
Freeing PosProtocol as SEQUENCE (constr_SEQUENCE.c:958)
Freeing LocationId as SEQUENCE (constr_SEQUENCE.c:958)
Freeing CellInfo as CHOICE (constr_CHOICE.c:1038)
Freeing WcdmaCellInformation as SEQUENCE (constr_SEQUENCE.c:958)
Freeing INTEGER as INTEGER (1, 0x5568a213f4f8, Native) (NativeInteger.c:325)
Freeing INTEGER as INTEGER (1, 0x5568a213f500, Native) (NativeInteger.c:325)
Freeing INTEGER as INTEGER (1, 0x5568a213f508, Native) (NativeInteger.c:325)
Freeing Status as a primitive type (asn_codecs_prim.c:125)
SUPL protocol error -2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.