Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD #11

Closed
beam opened this issue Jan 19, 2016 · 11 comments
Closed

FreeBSD #11

beam opened this issue Jan 19, 2016 · 11 comments

Comments

@beam
Copy link

beam commented Jan 19, 2016

Hi, can you add FreeBSD support?

@john30
Copy link
Owner

john30 commented Jan 20, 2016

ebusd should already be compilable under FreeBSD.
AFAIK you need to use the "--with-argp-lib" and "--with-argp-include" options of configure pointing to argp-standalone directories.

@beam
Copy link
Author

beam commented Jan 20, 2016

Hi, i installed https://www.freshports.org/devel/argp-standalone/ and no extra options needed for argp.
But i have to make some patches for code compilation:

diff --git a/src/ebusd/network.cpp b/src/ebusd/network.cpp
index 7d586c6..13e9505 100644
--- a/src/ebusd/network.cpp
+++ b/src/ebusd/network.cpp
@@ -28,6 +28,10 @@
 #include <poll.h>
 #endif

+#ifndef POLLRDHUP
+#define POLLRDHUP 0x2000
+#endif
+
 using namespace std;

 int Connection::m_ids = 0;
diff --git a/src/lib/ebus/device.h b/src/lib/ebus/device.h
index 3a8892e..71b0047 100644
--- a/src/lib/ebus/device.h
+++ b/src/lib/ebus/device.h
@@ -23,6 +23,8 @@
 #include <iostream>
 #include <fstream>
 #include <arpa/inet.h>
+#include <netinet/in.h>
+#include <sys/socket.h>
 #include <netdb.h>
 #include "result.h"

diff --git a/src/lib/utils/tcpsocket.cpp b/src/lib/utils/tcpsocket.cpp
index 27ed4a8..81ef810 100644
--- a/src/lib/utils/tcpsocket.cpp
+++ b/src/lib/utils/tcpsocket.cpp
@@ -20,6 +20,7 @@
 #include <cstdlib>
 #include <fcntl.h>
 #include <arpa/inet.h>
+#include <netinet/in.h>
 #include <netdb.h>
 #include <string.h>

Now i can run ebusd, but can't read from /dev/ttyU2.
When i start ebusd TX and RX LEDs on adapter are on (which is diferrent from when i connect it to linux, where only incoming LED is blinking), but nothing is shown in ebusd.
No idea what to do now.. :/

@beam
Copy link
Author

beam commented Jan 21, 2016

Any idea?

@john30
Copy link
Owner

john30 commented Jan 23, 2016

which interface are you using?

@beam
Copy link
Author

beam commented Jan 23, 2016

I bought this https://www.mikrocontroller.net/topic/346833#4405093 .
Scheme is at the begging of threat. It's eBUS<->USB (FT232R) adapter.

@john30
Copy link
Owner

john30 commented Jan 23, 2016

well, the interface works, I know that.
I can only assume that you have problems with the serial communication to the device.
I'm not familiar with BSD, so I guess you'll have to find out yourself...

@beam
Copy link
Author

beam commented Jan 23, 2016

Yes, when i boot on same PC linux it works, but under FreeBSD :(

@john30
Copy link
Owner

john30 commented Jan 24, 2016

It'll probably be a difference in the handling of terminal devices in BSD compared to Linux.

@john30
Copy link
Owner

john30 commented Jun 8, 2017

closed due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants