Bliss OS (Pinebook) 20170919 [Oct 13] | Bliss OS (PINE A64(+)) 20170919 [Oct 13] | Linux Images (ROCK64) 0.5.10-118 [Oct 2] | Android Images (ROCK64) 0.3.4-86 [Oct 2] | Android 6.0.1 (PINE A64-LTS / SOPINE) 20170726 [Sep 29] | Android 7.1 (Pinebook) 0.3.10-66 [Sep 19] | Android 7.1 (PINE A64(+)) 0.3.10-66 [Sep 19] | Android 7.1 (SOPINE) 0.3.10-66 [Sep 19] | PINE64 Installer v2.0.0-beta.3 [Sep 12]

Getting Started | Visit the WIKI | IRC Logs | Forum Rules/Policy

Using WiFi API
I am trying to use the WiFi api to connect the PADI to an access point. So far I have not had much luck, the documentation is a little difficult to follow and I have been unable to find an example that I can make work. My current program seems to get stuck when I call wifi_on() My program should print out a value on success or failure but instead it seems to hang. 

Has anyone had success using the WiFi api, or any ideas what might be going wrong? I have successfully used GPIO and Serial, I am using serial currently for simple debugging.

Note: I found an example that looks promising in the component/common/example/wlan_senario but I dont know how to compile and run this example on the padi. I am also confused by the printf statements in the program, where would these messages be printed to when using the PADI?

Any help would be appreciated

many times the printf sends info to serial device[what you use for serial info] but as far as padi you would do best to track down mark and the quickest method is to use the irc chat channel for pine64. easiest way is to click on chat on top of this page, otherwise use chat client.
Update: I have made some progress getting the WiFi api to work/using it, I can scan for networks with the API and connect to a secured access point. I am now running into an issue when trying to get a DHCP IP address.

I have a couple notes in case anyone sees this post and is trying something similar:
1. printf outputs to the UART_LOG serial port NOT the UART2 port that the quick start guide suggests to connect to. I probably should have realized/tried this earlier, but in case anyone else cant figure out where the debug output goes it is the UART_LOG port on the padi pinout diagram.

2. It seems WiFi API calls need to be made from within a task, I don't know if this is something obvious that I missed, but when trying to figure out why code from wifi examples was resulting in a stack overflow while the actual example code ran fine I discovered that the example code was executed from within a vTask. Once I executed my code in a vTask it mostly worked.

I am currently stuck while using LwIP to get a DHCP address, getting some message about being unable to allocate a pbuf for the packet. I will post more details or any solution I find after I have some more time to debug the issue.

Forum Jump:

Users browsing this thread: 1 Guest(s)