jbrunink / p2000scanner Goto Github PK
View Code? Open in Web Editor NEWA p2000 paging decoder
License: GNU General Public License v3.0
A p2000 paging decoder
License: GNU General Public License v3.0
I'm trying to compile this on ubuntu 14.04 but I get the following output:
$ ./build.sh
Building scanner
scanner.c: In function ‘FlexTIME’:
scanner.c:674:17: warning: variable ‘bDate’ set but not used [-Wunused-but-set-variable]
int bTime = 0, bDate = 0;
^
scanner.c:674:6: warning: variable ‘bTime’ set but not used [-Wunused-but-set-variable]
int bTime = 0, bDate = 0;
^
scanner.c:671:26: warning: variable ‘FLEX_date’ set but not used [-Wunused-but-set-variable]
static int FLEX_time=0, FLEX_date=0;
^
scanner.c:671:13: warning: variable ‘FLEX_time’ set but not used [-Wunused-but-set-variable]
static int FLEX_time=0, FLEX_date=0;
^
scanner.c:662:30: warning: variable ‘minutes’ set but not used [-Wunused-but-set-variable]
int year, month, day, hour, minutes;
^
scanner.c:662:24: warning: variable ‘hour’ set but not used [-Wunused-but-set-variable]
int year, month, day, hour, minutes;
^
scanner.c:662:19: warning: variable ‘day’ set but not used [-Wunused-but-set-variable]
int year, month, day, hour, minutes;
^
scanner.c:662:12: warning: variable ‘month’ set but not used [-Wunused-but-set-variable]
int year, month, day, hour, minutes;
^
scanner.c:662:6: warning: variable ‘year’ set but not used [-Wunused-but-set-variable]
int year, month, day, hour, minutes;
^
scanner.c: In function ‘frame_flex’:
scanner.c:1334:11: warning: variable ‘reflex’ set but not used [-Wunused-but-set-variable]
int reflex = 1;
^
/tmp/ccJNf69j.o: In function `req_socket_monitor':
scanner.c:(.text+0x348): undefined reference to `zmq_socket'
scanner.c:(.text+0x37d): undefined reference to `zmq_connect'
scanner.c:(.text+0x3b0): undefined reference to `zmq_msg_init'
scanner.c:(.text+0x3c8): undefined reference to `zmq_recvmsg'
scanner.c:(.text+0x3d6): undefined reference to `zmq_errno'
scanner.c:(.text+0x3eb): undefined reference to `zmq_strerror'
scanner.c:(.text+0x414): undefined reference to `zmq_strerror'
scanner.c:(.text+0x454): undefined reference to `zmq_msg_data'
scanner.c:(.text+0x579): undefined reference to `zmq_msg_close'
scanner.c:(.text+0x5a2): undefined reference to `zmq_close'
/tmp/ccJNf69j.o: In function `parseSingleMessage':
scanner.c:(.text+0x61f): undefined reference to `json_object_new_object'
scanner.c:(.text+0x62b): undefined reference to `json_object_new_object'
scanner.c:(.text+0x637): undefined reference to `json_object_new_object'
scanner.c:(.text+0x659): undefined reference to `json_object_object_add'
scanner.c:(.text+0x674): undefined reference to `json_object_object_add'
scanner.c:(.text+0x679): undefined reference to `json_object_new_array'
scanner.c:(.text+0x687): undefined reference to `json_object_new_string'
scanner.c:(.text+0x69e): undefined reference to `json_object_array_add'
scanner.c:(.text+0x6a8): undefined reference to `json_object_new_string'
scanner.c:(.text+0x6c4): undefined reference to `json_object_object_add'
scanner.c:(.text+0x6ce): undefined reference to `json_object_new_string'
scanner.c:(.text+0x6ea): undefined reference to `json_object_object_add'
scanner.c:(.text+0x6f4): undefined reference to `json_object_new_string'
scanner.c:(.text+0x710): undefined reference to `json_object_object_add'
scanner.c:(.text+0x71a): undefined reference to `json_object_new_string'
scanner.c:(.text+0x736): undefined reference to `json_object_object_add'
scanner.c:(.text+0x740): undefined reference to `json_object_new_boolean'
scanner.c:(.text+0x75c): undefined reference to `json_object_object_add'
scanner.c:(.text+0x769): undefined reference to `json_object_new_boolean'
scanner.c:(.text+0x785): undefined reference to `json_object_object_add'
scanner.c:(.text+0x7a7): undefined reference to `json_object_object_add'
scanner.c:(.text+0x7b6): undefined reference to `json_object_to_json_string'
scanner.c:(.text+0x7d7): undefined reference to `json_object_to_json_string'
scanner.c:(.text+0x85e): undefined reference to `zmq_msg_init_data'
scanner.c:(.text+0x879): undefined reference to `zmq_msg_send'
scanner.c:(.text+0x899): undefined reference to `json_object_put'
/tmp/ccJNf69j.o: In function `ConvertGroupcall':
scanner.c:(.text+0xa19): undefined reference to `json_object_new_object'
scanner.c:(.text+0xa25): undefined reference to `json_object_new_object'
scanner.c:(.text+0xa31): undefined reference to `json_object_new_object'
scanner.c:(.text+0xa53): undefined reference to `json_object_object_add'
scanner.c:(.text+0xa6e): undefined reference to `json_object_object_add'
scanner.c:(.text+0xa73): undefined reference to `json_object_new_array'
scanner.c:(.text+0xb07): undefined reference to `json_object_new_string'
scanner.c:(.text+0xb21): undefined reference to `json_object_array_add'
scanner.c:(.text+0xb8f): undefined reference to `json_object_new_string'
scanner.c:(.text+0xba9): undefined reference to `json_object_array_add'
scanner.c:(.text+0xbb3): undefined reference to `json_object_new_string'
scanner.c:(.text+0xbcf): undefined reference to `json_object_object_add'
scanner.c:(.text+0xbd9): undefined reference to `json_object_new_string'
scanner.c:(.text+0xbf5): undefined reference to `json_object_object_add'
scanner.c:(.text+0xbff): undefined reference to `json_object_new_string'
scanner.c:(.text+0xc1b): undefined reference to `json_object_object_add'
scanner.c:(.text+0xc25): undefined reference to `json_object_new_string'
scanner.c:(.text+0xc41): undefined reference to `json_object_object_add'
scanner.c:(.text+0xc4b): undefined reference to `json_object_new_boolean'
scanner.c:(.text+0xc67): undefined reference to `json_object_object_add'
scanner.c:(.text+0xc74): undefined reference to `json_object_new_boolean'
scanner.c:(.text+0xc90): undefined reference to `json_object_object_add'
scanner.c:(.text+0xcb5): undefined reference to `json_object_object_add'
scanner.c:(.text+0xcc4): undefined reference to `json_object_to_json_string'
scanner.c:(.text+0xcef): undefined reference to `json_object_to_json_string'
scanner.c:(.text+0xd10): undefined reference to `json_object_to_json_string'
scanner.c:(.text+0xd7a): undefined reference to `zmq_msg_init_data'
scanner.c:(.text+0xd95): undefined reference to `zmq_msg_send'
scanner.c:(.text+0xdb5): undefined reference to `json_object_put'
/tmp/ccJNf69j.o: In function `main':
scanner.c:(.text+0x263c): undefined reference to `zmq_ctx_new'
scanner.c:(.text+0x2657): undefined reference to `zmq_socket'
scanner.c:(.text+0x2688): undefined reference to `zmq_setsockopt'
scanner.c:(.text+0x269c): undefined reference to `zmq_bind'
scanner.c:(.text+0x26c9): undefined reference to `zmq_socket_monitor'
scanner.c:(.text+0x2b19): undefined reference to `zmq_unbind'
scanner.c:(.text+0x2b39): undefined reference to `zmq_close'
scanner.c:(.text+0x2b59): undefined reference to `zmq_ctx_destroy'
collect2: error: ld returned 1 exit status
I'm compiling with:
Env: CentOS 7.2 zerozmq 1.4.5 installed in /usr/local/lib (default)
./buid.sh results in:
scanner.c:287:2: error: unknown type name ‘zmq_event_t’
zmq_event_t event;
^
scanner.c:312:16: error: request for member ‘event’ in something not a structure or union
switch (event.event)
I hereby confirm to have your software working on a Raspberry Pi. There is no issue, but this seems the only way to let you know.
I've used the RS232 interface from discriminiator.nl, took out the MAX232, soldered in some resistors to make a voltage divider to bring the PIC's output down to 3.3 volt to be handled by the RasPi's UART input.
After some fiddling with the dependencies, your software worked right away :-)
In the other issue, you mentioned you'd want to receive some raw dumps. I you tell me how, I'd be happy to provide them.
I'd don't have to much experience with C, but I'll try to look into your code some more.
Hi, I was wondering if you could help with some compile errors. I'm attempting to compile this on a raspberry pi. libzmq1, libzmq-dev version 2.2.0
$ ./build.sh
Building scanner
scanner.c: In function 'req_socket_monitor':
scanner.c:287:2: error: unknown type name 'zmq_event_t'
scanner.c:300:3: warning: implicit declaration of function 'zmq_recvmsg' [-Wimplicit-function-declaration]
scanner.c:312:16: error: request for member 'event' in something not a structure or union
scanner.c:314:9: error: 'ZMQ_EVENT_CONNECTED' undeclared (first use in this function)
scanner.c:314:9: note: each undeclared identifier is reported only once for each function it appears in
scanner.c:315:52: error: request for member 'data' in something not a structure or union
scanner.c:316:75: error: request for member 'data' in something not a structure or union
scanner.c:319:9: error: 'ZMQ_EVENT_CLOSED' undeclared (first use in this function)
scanner.c:321:9: error: 'ZMQ_EVENT_ACCEPTED' undeclared (first use in this function)
scanner.c:322:37: error: request for member 'data' in something not a structure or union
scanner.c:323:56: error: request for member 'data' in something not a structure or union
scanner.c:326:9: error: 'ZMQ_EVENT_DISCONNECTED' undeclared (first use in this function)
scanner.c:327:39: error: request for member 'data' in something not a structure or union
scanner.c:328:59: error: request for member 'data' in something not a structure or union
scanner.c: In function 'parseSingleMessage':
scanner.c:396:2: warning: implicit declaration of function 'zmq_msg_send' [-Wimplicit-function-declaration]
scanner.c: In function 'FlexTIME':
scanner.c:674:17: warning: variable 'bDate' set but not used [-Wunused-but-set-variable]
scanner.c:674:6: warning: variable 'bTime' set but not used [-Wunused-but-set-variable]
scanner.c:671:26: warning: variable 'FLEX_date' set but not used [-Wunused-but-set-variable]
scanner.c:671:13: warning: variable 'FLEX_time' set but not used [-Wunused-but-set-variable]
scanner.c:662:30: warning: variable 'minutes' set but not used [-Wunused-but-set-variable]
scanner.c:662:24: warning: variable 'hour' set but not used [-Wunused-but-set-variable]
scanner.c:662:19: warning: variable 'day' set but not used [-Wunused-but-set-variable]
scanner.c:662:12: warning: variable 'month' set but not used [-Wunused-but-set-variable]
scanner.c:662:6: warning: variable 'year' set but not used [-Wunused-but-set-variable]
scanner.c: In function 'frame_flex':
scanner.c:1334:11: warning: variable 'reflex' set but not used [-Wunused-but-set-variable]
scanner.c: In function 'main':
scanner.c:1590:2: warning: implicit declaration of function 'zmq_ctx_new' [-Wimplicit-function-declaration]
scanner.c:1590:10: warning: assignment makes pointer from integer without a cast [enabled by default]
scanner.c:1594:25: error: 'ZMQ_IPV4ONLY' undeclared (first use in this function)
scanner.c:1603:2: warning: implicit declaration of function 'zmq_socket_monitor' [-Wimplicit-function-declaration]
scanner.c:1603:53: error: 'ZMQ_EVENT_ALL' undeclared (first use in this function)
scanner.c:1762:2: warning: implicit declaration of function 'zmq_unbind' [-Wimplicit-function-declaration]
scanner.c:1764:2: warning: implicit declaration of function 'zmq_ctx_destroy' [-Wimplicit-function-declaration]
I also saw that this only decodes FLEX 1600. Any plans on extending this to work with other FLEX modes (6400 is mainly in use where I am) and POCSAG?
any plans to make this work with usb sdr ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.