Setup BlueZ GATT Server with random address? - bluez

I followed GATT_Server example and advertisment example provided in BlueZ and built a GATT server in Python and it works fine.
I wanted to setup GATT server to use Random address instead of public address. adapter-api and device-api has AddressType field but it is read-only and I can't change it to Random.
Is it possible to setup BlueZ GATT server with Random address?

I think I was having a similar problem. Here's how I solved my problem:
After a lot of searching, I found that PyBluez just uses gattlib for all ble stuff: documentation
I was able to connect to my device with the following: (python 2.7)
import gattlib
requester = gattlib.GATTRequester('EF:76:B5:CC:36:A0', False)
reqer.connect(True, channel_type='random')
I know it's not the same as your problem, but I'm hoping it might help anyways.

Related

Using 'connmanctl config' to set static IP without wired connection

I am currently using 'connmanctl config' to set static and DHCP settings with a wired connection. I'm curious if anyone has been successful with applying settings with the wire unplugged?
I would typically use 'connmanctl services' for a list of services then perform a string.match(blah, "ethernet_%w+_cable") to use that wired service name. I have been able to find and apply that service name with the ethernet cable unplugged BUT now when using 'connmanctl config':
connmanctl config ethernet_f8dc7a04ea82_cable --ipv4 manual 192.168.91.108 255.255.255.0 192.168.91.1 --nameservers 8.8.8.8
I get this error:
Error ethernet_f8dc7a04ea82_cable: Method "SetProperty" with signature "sv" on interface "net.connman.Service" doesn't exist
As you can see I have the service applied to the command and this is the same service name as when the cable is plugged in. This feature would be nice for equipment that needs to be pre-programmed before reaching the customer. I have also researched this error but can't find it being an issue with others the same as it is with my situation. Have also read many blogs, articles, etc...on trying to achieve this with nothing that jumps out at me.
...Any ideas ?
I had to perform this action via back-end with the code that I am using to configure. Just an example...settings are applied to /var/lib/connman/ethernet_?????cable/settings. I created the adapter name with the MAC address because it does not exist until the network is detected, created the directory /ethernet?????_cable then created an empty settings file on the fly. When programming and saving the settings via the equipment I am using I just insert the settings manually. When a network cable is plugged in and detected the settings you have applied work wonderfully.

IMC Module in kamailio

As I am trying to install new imc module to my kamailio sip server, I also followed the documentation of it. But unfortunately, I could not run kamailio sip server.
The error which is coming while running it is on this line:
modparam("imc","db_mysql","DBURL")
Where
DBURL = "mysql://kamailio:kamailiorw#localhost/kamailio"
The errors are like syntax error and invalid arguments
What could be the possible chances of this kind of error?
In last what can be the best imc testing software or client?
Please help.
You've set db_mysql instead of db_url while defining a module parameters. please change it to.
modparam("imc","db_url", DBURL)
Also make sure you're loading this module after db_mysql and tm module.
http://www.kamailio.org/docs/modules/3.2.x/modules_k/imc.html#idp1754096
And as it follows the architecture of IRC channels you can use many IRC chat clients to connect such as Pidgin, mIRC and Icechat for Windows, Limechat for Mac OS X, Irssi, WeeChat or XChat for Unix-like systems, ChatZilla for Mozilla browsers or any other standard IRC program.

OpenGTS platform

I have been currently working with OpenGTS platform, I would like to help me with something.
I want to connect a GPS to the platform is the "GPS TRACKER 103ab" this GPS works under the protocol "TK-103". To see if they could help me connect this device to the platform. I followed the documentation to activate the devicenter code heree through SMS to my cell with commands like:
Begin123456 = to start the device.
IMEI123456 = so that the device will return the 15 digits.
adminip123456 109.0.0.9 = 8080 to set the ip + port that I am using.
The problem is that still can not get connect with the platform, help me.
Facts:
Opengts
GPS TRACKER 103ab
Protocol "TK-103"
You can use Traccar GPS server to receive data from your device and integrate it with OpenGTS if you want to access the data from OpenGTS web interface. Traccar supports more communication protocols than OpenGTS.
The correct command to set ADMINIP is :
adminip123456 [xxx.xxx.xxx.xxx] [xxxx]
where the first field is the IP address of your server, must be an address public and accessible from the outside.
and the second field (note that they are only separated by a space) is the port where the server expects the connection , the default is 31272 for tk10x protocol. NEVER 8080 , this is the port where Tomcat listens.
After setting the ' adminp ' , use the command:
fix001m***123456
to start position reports every minute.
it is also necessary to set the APN,APNuser,APNpassword from the mobile service provider's of the device.
use the commands:
apn123456 datos.personal.com
apnuser123456 gprs
apnpasswd123456 gprs
(This is an example using the appropriate data to the service provider's Personal.ar)

how can we create connection to Asterisk using SIPml5

I want to implement a WebRTC application to be able to make calls over VoIP. My client is running the SIPml5 and in the server side I have installed and confiured the asterisk.
Asterisk was tested with softphone.
Please help??
You will have to configure asterisk with SRTP support.
The below guide will help you
https://wiki.asterisk.org/wiki/display/AST/WebRTC+tutorial+using+SIPML5
Also in the function createSipStack(), place the value of realm, impu and websocket_proxy_url matching with the values.
Let me know if you find any difficulty.
Thanks
Anil

SIP Application on standalone Red5 Server does not connect to Asterisk Server

I have tried for days now trying to find the right version of red5phone, but to no avail. Also, I need red5 and asterisk to be on different servers. I have followed all instructions described in the various tutorials on web, but nothing helps. I have downloaded 2 different versions of red5phone: sip1, sip_47 from the red5phone google code site, but none of them worked!
When I use:
a) sip1 - shows the correct parameters being passed on the red5 server console, but connection is stuck up with the console displaying the following error:
[NioProcessor-1] ERROR o.r.server.service.ServiceInvoker - Method login with parameters [<sip user>, <sip user>,<sip user>,<sip user pwd>, <asterisk server i/p>, <asterisk server i/p>] not found in org.red5.server.webapp.sip.Application#2d0c94a7
b) sip47 - when I type in the values in the flex interface and check the red5 server console, I see all parameters correct(the ones I passed) except for asterisk server ip that i m trying to connect. Instead, it shows 127.0.0.1 by default and completely ignores the passed ip and regsitration fails.
I am using:
red5 server version: 0.9.1, centos: 4.8(final), red5phone used: sip_47 (tried sip1 as well)
As a desperate measure I tried debugging the source code for red5phone (java and flex files) myself. but when I try to create the environment on my local system, I get several compile errors for missing java packages such as javax.media, org.slf4j, org.red5, etc. really confused and desperate for some guidance. Any tips highly appreciated.
Sunil, I'm also new to this, I would try red5-voicebridge installed in your red5 server.
red5-voicebridge Please let me know if you got it to work.