|
|
Hi All, I’m trying to get the device name changed on the Bug base so that it can report itself to a server. I can get the name changed temporarily by doing this: 1. vi /etc/hosts and change the name 2. do a hostname ‘name’ from the command line 3. vi /etc/hostname and change the name 4. check this with cat /proc/sys/kernel/hostname However when I reboot the device name changes to ‘localhost’. I suspect there is probably another file somewhere that I need to change. Any advice? Thanks! -Jer |
|
|
Hi Jer, Your steps seem right to me. Here’s what I did just now and verified it renames my BUG: 1. vi /etc/hostname and change BUG to something else. Let’s say we rename to “myBUG.” 2. vi /etc/hosts and change “localhost bug” to “localhost mybug”. This basically allows you ping your BUG’s web server with a friendly name.
After you restart your BUG and ssh in, you should see root@myBUG at the prompt. Let me now if you have any issues.
Thanks, |
|
|
I’ll try it again. It might be I’m retrieving the device name wrong in my app: try{ InetAddress ownIP=InetAddress.getLocalHost(); mName = ownIP.getHostName(); }catch (Exception e){ System.out.println(“Couldn’t set device name =”+e.getMessage()); } This code sends the correct device name after I change the device name with the steps above, but it doesn’t ‘stick’ after restart. I’ll poke around and see if I can figure it out. Thanks. -Jer
|
|
|
Hi Jer, If I remember correctly you’re using a Angstrom build from jconnolly? If this is the case this might be a defect. I will email this thread to JC and see if he has any ideas. Thanks, Brian |
|
|
Works for me:
|
|
|
Thanks, John… This all seems to be working, now. One of the devices early on switched to ‘localhost’ for a device name but I may have just done something wrong. We’re one day away from the opening here and things are almost under control. The big issue is with WiFi – getting the bugs to ‘smartly’ connect to the right network is still a manual process, which is somewhat irritating. But, all in all, we are in good shape. Cheers, -Jer |
|
|
I’ll try to get into that today. I’ll keep it within this thread and let you know |
|
|
Thanks again. In the case where a device loses signal, and then moves into another zone, it does appear to pick up a signal eventually, but after a long delay. I wonder if the frequency of checking networks can be increased? Just a thought. -Jer |
|
|
I think I’ve found where to change the scan interval: In the /var/lib/connman/ directory, there is a set of config files. It looks like there’s one master config file (in my case it’s called dev_001988202648.conf) which has some global settings: [Configuration] Policy=auto Priority=100 ScanInterval=300 And then it looks like it saves config files with connection information for the remembered networks. For example, I have a file called dev_00198810fd01.conf which contains a set of entries for the networks that I’ve added: [06_12_CF_D3_67_73] Remember=true WiFi.Security=wpa WiFi.Passphrase= [06_12_CF_CB_91_25] Remember=true WiFi.Security=wpa WiFi.Passphrase= I am going to try to copy the network info onto another bug and see if it will then ‘know’ all of the networks. I will also change the ScanInterval in the first file to something smaller (300 is in seconds, I am assuming – so 5 minutes between scans) -Jer |
|
|
Yeah that makes sense:
<a href="http://docs.enlightenment.org/api/e_dbus/html/e__connman__device_8c.html">http://docs.enlightenment.org/api/e_dbus/html/e...</a>
I don’t have access to “many” AP’s in the office so it would be difficult to test your scenario. Let me know how it goes. |
|
|
Changing the interval doesn’t seem to help. Even selecting networks manually has always been problematic. Half the time, there are no networks listed in the drop down. I will continue forward and see what I can do. |
|
|
You may want to try some of the artifacts built with connman… there are test utilities that may be of some value even for use by your application: http://bugcommunity.com/downloads/files/connman… One thing to try is using the GUI to list networks, then at the same time try the command line utility in that tarball. This should tell you if it’s just a crappy GUI problem. connman-gnome support has been pretty much dropped by their community so I wouldn’t doubt that there are quirks and unfixed bugs. |
|
|
Connman…
Personally I am using wpa-supplicant directly and store common used networks in it’s config: /etc/wpa-supplicant.conf. But it works just because I do not use connman and my bug devices are always connected by Ethernet. |
|
|
Is there a way to scan and auto-connect to nearest networks though? I think that’s the clincher |
|
|
jc: no idea how connman solves that but wpa-supplicant can be told to which networks it has to connect, which ones are more preferred then others etc. http://blog.jasondonenfeld.com/248 is nice read |
|
|
This sounds like exactly what you need Jer. I would definitely try using wpa_supplicant and disabling or removing connman entirely. |
|
|
OK. I will maybe get the chance to dig into this. Our show is up and running in 2 hours so there’s not much I can do for now! We’ll take and post a bunch of photos. |